ironic-dbsync fails due to permissions on undercloud upgrade

Bug #1685765 reported by Julie Pichon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Unassigned

Bug Description

I'm not sure if there is a bug open for this already, I couldn't find one. I've seen this locally when running an undercloud upgrade with latest DLRN and also noticed it on CI (e.g. http://logs.openstack.org/59/458859/2/check/gate-tripleo-ci-centos-7-undercloud-upgrades-nv/a911290/logs/var/log/undercloud_upgrade.txt.gz#_2017-04-24_08_31_57_000 ).

2017-04-24 10:06:47,462 INFO: Error: ironic-dbsync --config-file /etc/ironic/ironic.conf returned 1 instead of one of [0]
2017-04-24 10:06:47,462 INFO: Error: /Stage[main]/Ironic::Db::Sync/Exec[ironic-dbsync]/returns: change from notrun to 0 failed: ironic-dbsync --config-file /etc/ironic/ironic.conf returned 1 instead of one of [0]

$ ironic-dbsync --config-file /etc/ironic/ironic.conf
Traceback (most recent call last):
  File "/bin/ironic-dbsync", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/site-packages/ironic/cmd/dbsync.py", line 102, in main
    service.prepare_service(sys.argv)
  File "/usr/lib/python2.7/site-packages/ironic/common/service.py", line 30, in prepare_service
    config.parse_args(argv)
  File "/usr/lib/python2.7/site-packages/ironic/common/config.py", line 29, in parse_args
    default_config_files=default_config_files)
  File "/usr/lib/python2.7/site-packages/oslo_config/cfg.py", line 2380, in __call__
    self._namespace._files_permission_denied)
oslo_config.cfg.ConfigFilesPermissionDeniedError: Failed to open some config files: /etc/ironic/ironic.conf

Tags: ci upgrade
Julie Pichon (jpichon)
tags: added: upgrade
Revision history for this message
Emilien Macchi (emilienm) wrote :

I think it was fixed in https://review.openstack.org/#/c/457478/ - can you confirm please?

Revision history for this message
Dan Sneddon (dsneddon) wrote :

@emilienm, I manually applied the patch in https://review.openstack.org/#/c/457478/ and reran "openstack undercloud upgrade" successfully, so I think this will be fixed in the packages that include this patch.

Note that I also had to *manually* run "sudo rm /var/log/ironic/ironic-dbsync.log" to delete the empty log before I could re-run the upgrade. If you have previously upgraded when the files were set to use the root user, you may have to delete this file to continue with the patched version.

Revision history for this message
Julie Pichon (jpichon) wrote :

Ah, indeed, sorry for the noise and thank you for all the pointers! I was able to upgrade the undercloud after manually deleting the log file and making sure the patch was included.

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.