Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mikeSimonson
Copy link
Contributor

Apparently there is no reason to have upper-case in the first place as the dns records are case insensitive

@naxhh
Copy link
Contributor

naxhh commented Dec 4, 2014

Can you provide more info about why it breaks?

@mikeSimonson
Copy link
Contributor Author

The ansible output

TASK: [mariadb | mariadb | Update root password for all root accounts] ******** 
failed: [192.168.33.99] => (item=Default) => {"failed": true, "item": "Default", "parsed": false}
invalid output was: SUDO-SUCCESS-lscrmpovsmrjuppikcfropqdxbbtbmhs
Traceback (most recent call last):
  File "/home/vagrant/.ansible/tmp/ansible-tmp-1417685988.27-271678323726266/mysql_user", line 1822, in <module>
    main()
  File "/home/vagrant/.ansible/tmp/ansible-tmp-1417685988.27-271678323726266/mysql_user", line 466, in main
    changed = user_add(cursor, user, host, password, priv)
  File "/home/vagrant/.ansible/tmp/ansible-tmp-1417685988.27-271678323726266/mysql_user", line 164, in user_add
    cursor.execute("CREATE USER %s@%s IDENTIFIED BY %s", (user,host,password))
  File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute
    self.errorhandler(self, exc, value)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
_mysql_exceptions.OperationalError: (1396, "Operation CREATE USER failed for 'root'@'default'")

changed: [192.168.33.99] => (item=127.0.0.1)
changed: [192.168.33.99] => (item=::1)
changed: [192.168.33.99] => (item=localhost)

FATAL: all hosts have already failed -- aborting

PLAY RECAP ******************************************************************** 
           to retry, use: --limit @/home/mike/playbook.retry

192.168.33.99              : ok=22   changed=18   unreachable=0    failed=1   

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

As you can see mysql/mariadb is creating a user with "Default" in lowercase and then try to change the passowrd with the uppercase version and that's why it breaks.

@InFog
Copy link
Contributor

InFog commented Dec 4, 2014

This is a simple PR and makes a lot of sense. I mean, why should we allow uppercase letters for hostname if no one should use it?

It's ok to merge, IMO.

@naxhh
Copy link
Contributor

naxhh commented Dec 4, 2014

yes. for me is a merge.
I just wanted to understand better the error with maria db.

naxhh added a commit that referenced this pull request Dec 4, 2014
making sure that the hostname is in lowercase otherwise mariadb breaks
@naxhh naxhh merged commit c62a47d into phansible:master Dec 4, 2014
@mikeSimonson mikeSimonson deleted the mariadb-hostname branch February 1, 2015 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants