Bug 1859692

Summary: Reload functionality is broken
Product: Red Hat OpenStack Reporter: Cyril Roelandt <cyril>
Component: openstack-glanceAssignee: Cyril Roelandt <cyril>
Status: CLOSED ERRATA QA Contact: Mike Abrams <mabrams>
Severity: medium Docs Contact: Chuck Copello <ccopello>
Priority: medium    
Version: 16.0 (Train)CC: akekane, athomas, eglynn
Target Milestone: z2Keywords: Triaged
Target Release: 16.1 (Train on RHEL 8.2)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-glance-19.0.4-0.20200729143424.2773225.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-28 15:38:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1861854    

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