glance/glance
Dan Smith 8e8072c16a Make wait_for_fork() more robust against infinite deadlock
There is something about the process handling in the functional test base
that opens the scenario where we might signal our API master child,
waitpid() on it and never return (see bug 1891190). Specifically the
test_reload() case, where the API master is being sent SIGHUP various times,
which may cause it to temporarily mask out SIGTERM or something, which
means it ignores our request. Either way, a deadlock in the tests can
occur when the cleanup() routine goes to waitpid() on that master,
forever.

This change makes our wait_for_fork() helper call waitpid() with WNOHANG
and progressively ramp up the aggression on asking it to stop. First, it
waits for the original signal to be honored, then it starts sending SIGTERM,
followed by SIGKILLs until the overall timeout expires, after which it
fails the test. The latter should only ever happen if something gets
wedged in uninterruptible sleep.

Related-Bug: #1891190
Change-Id: Ie0e91e2ee86f33bcdb63eed74f2d9948108acfd4
2020-08-12 06:55:06 -07:00
..
api Add "stores" to disallowed properties 2020-07-30 19:30:17 +00:00
async_ Fix active image without data 2020-08-05 06:02:21 +00:00
cmd Make glance-api able to do async tasks in WSGI mode 2020-07-24 11:13:45 -07:00
common Stream-friendly disk format inspection module 2020-08-05 08:41:55 -07:00
db Change database migration version to victoria 2020-07-30 15:58:42 +00:00
domain Add image_set_property_atomic() helper 2020-07-16 13:15:55 +01:00
hacking Cleanup remove api v1 and registry code 2020-07-14 10:38:19 +00:00
image_cache Stop to use the __future__ module. 2020-06-02 20:14:31 +02:00
locale Imported Translations from Zanata 2020-06-16 07:47:50 +00:00
policies Remove unused "copy_from" policy rule 2020-07-15 13:01:58 -07:00
quota Add ability to import image into multi-stores 2020-02-10 09:39:01 +01:00
tests Make wait_for_fork() more robust against infinite deadlock 2020-08-12 06:55:06 -07:00
__init__.py Empty files shouldn't contain copyright nor license 2013-12-24 22:39:05 -06:00
context.py Add context.elevated() helper for getting admin privileges 2020-07-10 08:59:53 -07:00
gateway.py Refactor TaskFactory and Executor to take an admin ImageRepo 2020-07-10 08:59:53 -07:00
i18n.py Raise hacking to latest 2.0.0 release 2020-03-27 14:11:08 -05:00
location.py Inspect upload/import stream and set virtual_size 2020-08-05 08:42:04 -07:00
notifier.py Add ability to import image into multi-stores 2020-02-10 09:39:01 +01:00
opts.py Add new config options in sample config generator 2020-07-28 16:06:43 +00:00
schema.py Import i18n functions directly 2015-12-07 18:20:43 +03:00
scrubber.py Fix string interpolation to delay by logging 2020-01-09 08:53:55 -06:00
version.py Add support for oslo.reports 2019-09-20 05:17:58 +00:00