Bug 1859692 - Reload functionality is broken
Summary: Reload functionality is broken
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-glance
Version: 16.0 (Train)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: z2
: 16.1 (Train on RHEL 8.2)
Assignee: Cyril Roelandt
QA Contact: Mike Abrams
Chuck Copello
URL:
Whiteboard:
Depends On:
Blocks: 1861854
TreeView+ depends on / blocked
 
Reported: 2020-07-22 17:14 UTC by Cyril Roelandt
Modified: 2020-10-28 15:39 UTC (History)
3 users (show)

Fixed In Version: openstack-glance-19.0.4-0.20200729143424.2773225.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-28 15:38:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1855708 0 None None None 2020-07-22 17:17:14 UTC
OpenStack gerrit 713076 0 None MERGED Remove usages of SSL related config options in utils 2020-10-28 07:22:16 UTC
OpenStack gerrit 713720 0 None MERGED Fix reloading under PY3 2020-10-28 07:22:16 UTC
Red Hat Product Errata RHEA-2020:4284 0 None None None 2020-10-28 15:39:22 UTC

Description Cyril Roelandt 2020-07-22 17:14:51 UTC
Taken from https://bugs.launchpad.net/glance/+bug/1855708: 

"We have removed ssl support [1] this cycle which results in removing some ssl related config options, but we didn't removed all of its usage and two config options 'key_file' and 'cert_file' are still used in reload functionality [2] which is causing error when SIGHUP is sent to parent process and results in termination due to error and childs remaining stale.

If I comment/remove those two options from [2] then SIGHUP works just fine.

[1] https://review.opendev.org/#/c/697969/5/glance/common/wsgi.py
[2] https://github.com/openstack/glance/blob/master/glance/common/utils.py (L560, L561, L562)

I have verified the same by adding new store to enabled_backends config option and it is crating the new store (file) as well as adding image to this newly created store."

Comment 1 Cyril Roelandt 2020-07-23 20:38:54 UTC
The patch from stable/train was automagically picked up downstream and a package was created.

Comment 8 Cyril Roelandt 2020-10-14 21:01:40 UTC
@Abhishek: Can you confirm it's normal that the PID are changing? Does Glance kill and recreate its children upon reloading the configuration?

Comment 9 Abhishek Kekane 2020-10-15 05:14:01 UTC
(In reply to Cyril Roelandt from comment #8)
> @Abhishek: Can you confirm it's normal that the PID are changing? Does
> Glance kill and recreate its children upon reloading the configuration?

Cyril, Yes PID changes during reload/sighup.
This is how reloading on sighup works.

For example there are 3 glance api children are running and someone issues sighup signal, then it checks whether any of the children is processing any request. If not then it kills that children and spawns new children which contains the new configuration changes. If any of the children is processing request then it waits until that request is processed (graceful shutdown) and once request is completed then it kills that process (child) and spwans new one with ne w PID.

There are logs in glance-api which telles child process is killed and new one is popped.

Comment 14 errata-xmlrpc 2020-10-28 15:38:39 UTC
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 (Red Hat OpenStack Platform 16.1 bug fix and enhancement 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-2020:4284


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