Bug 1412622 - Glance-manage db purge not remove rows that was created less then one day
Summary: Glance-manage db purge not remove rows that was created less then one day
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-glance
Version: 10.0 (Newton)
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: async
: 10.0 (Newton)
Assignee: Cyril Roelandt
QA Contact: Avi Avraham
URL:
Whiteboard:
Depends On: 1396794
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-12 13:07 UTC by Cyril Roelandt
Modified: 2023-02-22 23:02 UTC (History)
12 users (show)

Fixed In Version: openstack-glance-13.0.0-2.el7ost
Doc Type: Enhancement
Doc Text:
Clone Of: 1396794
Environment:
Last Closed: 2018-03-22 13:26:56 UTC
Target Upstream Version:
Embargoed:
scohen: needinfo+
scohen: needinfo+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1643287 0 None None None 2017-01-12 13:07:33 UTC
OpenStack gerrit 407177 0 None None None 2017-01-12 13:07:33 UTC
OpenStack gerrit 418993 0 None None None 2017-03-10 16:54:11 UTC

Comment 6 Lon Hohberger 2018-03-07 13:52:46 UTC
According to our records, this should be resolved by openstack-glance-13.0.0-2.el7ost.  This build is available now.

Comment 7 Tzach Shefi 2018-03-12 08:36:34 UTC
Hi Cyril, 

Failed to verify on:
openstack-glance-13.0.0-2.el7ost.noarch

1. Uploaded Glance image
2. Deleted ^Glance image
3. Upload new image again 

Glance DB before purge

+--------------------------------------+---------+----------+---------+-----------+---------------------+---------------------+---------------------+---------+-------------+------------------+----------------------------------+----------------------------------+----------+---------+-----------+--------------+
| id                                   | name    | size     | status  | is_public | created_at          | updated_at          | deleted_at          | deleted | disk_format | container_format | checksum                         | owner                            | min_disk | min_ram | protected | virtual_size |
+--------------------------------------+---------+----------+---------+-----------+---------------------+---------------------+---------------------+---------+-------------+------------------+----------------------------------+----------------------------------+----------+---------+-----------+--------------+
| 51eea0a2-4493-447f-b4d3-f99a4ca52a29 | cirros2 | 12716032 | active  |         0 | 2018-03-12 08:30:09 | 2018-03-12 08:30:10 | NULL                |       0 | qcow2       | bare             | 443b7623e27ecf03dc9e01ee93f67afe | 4da28605e15146009a6d4bed82c7eb46 |        0 |       0 |         0 |         NULL |
| db6807fd-9362-4b42-b3e4-3c40dc250efc | cirros  | 12716032 | deleted |         0 | 2018-03-12 08:19:34 | 2018-03-12 08:20:53 | 2018-03-12 08:20:53 |       1 | qcow2       | bare             | 443b7623e27ecf03dc9e01ee93f67afe | 4da28605e15146009a6d4bed82c7eb46 |        0 |       0 |         0 |         NULL |
+--------------------------------------+---------+----------+---------+-----------+---------------------+---------------------+---------------------+---------+-------------+------------------+----------------------------------+----------------------------------+----------+---------+-----------+--------------+

$glance-manage db purge --age_in_days=0
Option "verbose" from group "DEFAULT" is deprecated for removal.  Its value may be silently ignored in the future.
Traceback (most recent call last):
  File "/usr/bin/glance-manage", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/site-packages/glance/cmd/manage.py", line 322, in main
    config.parse_args(default_config_files=cfg_files)
  File "/usr/lib/python2.7/site-packages/glance/common/config.py", line 679, in parse_args
    default_config_files=default_config_files)
  File "/usr/lib/python2.7/site-packages/oslo_config/cfg.py", line 2255, 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

Failing to run command.

Comment 10 Cyril Roelandt 2018-03-14 16:46:20 UTC
Hello Mike,

I'm not too worried about the deprecation warnings. I think we should check the contents of the database to see whether the rows have been purged.

There is a Polarion testcase that should be helpful to verify this bug: https://polarion.engineering.redhat.com/polarion/#/project/RHELOpenStackPlatform/testrun?id=20170319-0816

I cannot seem to login there though :/


Note You need to log in before you can comment on or make changes to this bug.