Red Hat Bugzilla – Bug 1396794
Glance-manage db purge not remove rows that was created less then one day
Last modified: 2017-05-17 15:47:28 EDT
Description of problem: The value of glance-manage db purge --age_in_days can not be 0. A request for Adding an option --age_in_days=0 will allow to remove rows from db of deleted images that took place less then 1 day ago, The motivation to add this ability will allow testing db purge other functionalities. Version-Release number of selected component (if applicable): python-glance-tests-13.0.0-1.el7ost.noarch python-glanceclient-2.5.0-1.el7ost.noarch python-glance-store-0.18.1-0.20161003180701.4e144bb.el7ost.noarch openstack-glance-13.0.0-1.el7ost.noarch How reproducible: Steps to Reproduce: glance-manage db purge --age_in_days 0
Upstream patch merged, moving to POST
The following command is failed to run on overcloud and undercloud glance-manage db <Any sub command> due to configuration file permission denied error Option "verbose" from group "DEFAULT" is deprecated for removal. Its value may be silently ignored in the future. Traceback (most recent call last): File "/bin/glance-manage", line 10, in <module> sys.exit(main()) File "/usr/lib/python2.7/site-packages/glance/cmd/manage.py", line 439, in main config.parse_args(default_config_files=cfg_files) File "/usr/lib/python2.7/site-packages/glance/common/config.py", line 680, in parse_args default_config_files=default_config_files) File "/usr/lib/python2.7/site-packages/oslo_config/cfg.py", line 2359, in __call__ self._namespace._files_permission_denied) oslo_config.cfg.ConfigFilesPermissionDeniedError: Failed to open some config files: /etc/glance/glance-registry.conf,/etc/glance/glance-api.conf python-glance-14.0.1-0.20170222152138.13f96bf.el7ost.noarch puppet-glance-10.3.0-0.20170220180438.4ec5c5c.el7ost.noarch python-glanceclient-2.6.0-0.20170208132836.9afb56c.el7ost.noarch python-glance-store-0.20.1-0.20170210090113.3646e91.el7ost.noarch openstack-glance-14.0.1-0.20170222152138.13f96bf.el7ost.noarch
@Avi: did you also test with a different user (ie root or using sudo)? On the overcloud this might be related to the fact that the default "heat-admin" user is not allowed to read the Glance config files because they are owned by the glance user. Same for the undercloud and the stack user. Can you please retry with "sudo glance-manage db ..."?
(In reply to Christian Schwede (cschwede) from comment #9) > @Avi: did you also test with a different user (ie root or using sudo)? > > On the overcloud this might be related to the fact that the default > "heat-admin" user is not allowed to read the Glance config files because > they are owned by the glance user. Same for the undercloud and the stack > user. > > Can you please retry with "sudo glance-manage db ..."? [stack@undercloud-0 ~]$ . overcloudrc [stack@undercloud-0 ~]$ sudo glance-manage db version Option "verbose" from group "DEFAULT" is deprecated for removal. Its value may be silently ignored in the future. /usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py:1241: OsloDBDeprecationWarning: EngineFacade is deprecated; please use oslo_db.sqlalchemy.enginefacade expire_on_commit=expire_on_commit, _conf=conf) BTW there is a separate bug for this issue that I opened few weeks ago https://bugzilla.redhat.com/show_bug.cgi?id=1416494
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2017:1245