60-mysql-secure breaks 50-mysql-users

Bug #1307511 reported by Michael Kerrin
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Unassigned

Bug Description

It looks like the changes to add 60-mysql-secure have made os-refresh-config non idempotent so it wont run again.

On the second run we get the following error:

dib-run-parts Mon Apr 14 09:47:26 UTC 2014 Running /opt/stack/os-config-refresh/post-configure.d/50-mysql-users
Traceback (most recent call last):
  File "/opt/stack/os-config-refresh/post-configure.d/50-mysql-users", line 33, in <module>
    conn = MySQLdb.Connect(read_default_file=os.path.expanduser('~/.my.cnf'))
  File "/usr/lib/python2.7/dist-packages/MySQLdb/__init__.py", line 81, in Connect
    return Connection(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 187, in __init__
    super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: NO)")
[2014-04-14 09:47:26,552] (os-refresh-config) [ERROR] during post-configure phase. [Command '['dib-run-parts', '/opt/stack/os-config-refresh/post-configure.d']' returned non-zero exit status 1]

[2014-04-14 09:47:26,553] (os-refresh-config) [ERROR] Aborting...
2014-04-14 09:47:26.563 1303 ERROR os-collect-config [-] Command failed, will not cache new data. Command 'os-refresh-config' returned non-zero exit status 1
2014-04-14 09:47:26.564 1303 WARNING os-collect-config [-] Sleeping 30.00 seconds before re-exec.

Ben Nemec (bnemec)
Changed in tripleo:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Haiwei Xu (xu-haiwei) wrote :

I got a similar error. When deploying a baremetal machine using devtest, got these logs in /var/log/upstart/os-collect-config.log

Found 'compress' tags in:
        /opt/stack/venvs/openstack/local/lib/python2.7/site-packages/horizon/templates/horizon/_scripts.html
        /opt/stack/venvs/openstack/local/lib/python2.7/site-packages/horizon/templates/horizon/_conf.html
        /opt/stack/venvs/openstack/local/lib/python2.7/site-packages/openstack_dashboard/templates/_stylesheets.html
Compressing... CommandError: An error occured during rendering /opt/stack/venvs/openstack/local/lib/python2.7/site-packages/openstack_dashboard/templates/_stylesheets.html: Error parsing block:
    1
2$icon-font-path: "/static/bootstrap/fonts/bootstrap/";
3$font-size-base: 13px;
4$modal-md: 732px;
6@import "/bootstrap/scss/bootstrap";
7@import "/bootstrap/scss/_datepicker";
8@import "_variables";
9@import "_accordion_nav";

......
From <string u'// bootstrap overrides:\n$icon-font-path: "/static/'...>:0
Traceback:
  File "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/scss/__init__.py", line 498, in manage_children
    self._manage_children_impl(rule, scope)
  File "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/scss/__init__.py", line 548, in _manage_children_impl
    self._do_import(rule, scope, block)
  File "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/django_pyscss/scss.py", line 118, in _do_import
    source_file = self._find_source_file(name, relative_to)
  File "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/django_pyscss/scss.py", line 89, in _find_source_file
    with storage.open(full_filename) as f:
  File "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/django/core/files/storage.py", line 33, in open
    return self._open(name, mode)
  File "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/django/core/files/storage.py", line 160, in _open
    return File(open(self.path(name), mode))
IOError: [Errno 21] Is a directory: u'/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/openstack_dashboard/static/bootstrap/scss/bootstrap'
[2014-07-29 06:14:07,118] (os-refresh-config) [ERROR] during post-configure phase. [Command '['dib-run-parts', '/opt/stack/os-config-refresh/post-configure.d']' returned non-zero exit status 1]

ERROR:os-refresh-config:during post-configure phase. [Command '['dib-run-parts', '/opt/stack/os-config-refresh/post-configure.d']' returned non-zero exit status 1]

[2014-07-29 06:14:07,118] (os-refresh-config) [ERROR] Aborting...
ERROR:os-refresh-config:Aborting...
2014-07-29 06:14:07.123 1649 ERROR os-collect-config [-] Command failed, will not cache new data. Command 'os-refresh-config' returned non-zero exit status 1
2014-07-29 06:14:07.124 1649 WARNING os-collect-config [-] Sleeping 30.00 seconds before re-exec.

Revision history for this message
James Polley (tchaypo) wrote :

"the changes to add 60-mysql-secure" seems to refer to http://git.openstack.org/cgit/openstack/tripleo-image-elements/commit/elements/mysql-common/os-refresh-config/post-configure.d/60-mysql-secure?id=640f7b9ff235c73658b2b5e5cf726305bc96badd

Shortly after this bug was raised, https://review.openstack.org/#/c/89520/ was landed. I haven't examined it in detial, from from the commit message it seems to address this issue.

I'm going to mark this as "fix released" as I think https://review.openstack.org/#/c/89520/ is the fix for this.

Changed in tripleo:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.