Bug 1391484

Summary: Service graceful shutdown not working
Product: [Community] RDO Reporter: Gorka Eguileor <geguileo>
Component: openstack-cinderAssignee: Gorka Eguileor <geguileo>
Status: CLOSED ERRATA QA Contact: nlevinki <nlevinki>
Severity: high Docs Contact:
Priority: unspecified    
Version: trunkCC: chris.brown, eharney, jschluet, srevivo
Target Milestone: ---   
Target Release: trunk   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1391489 (view as bug list) Environment:
Last Closed: 2017-06-22 15:56:09 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:
Bug Depends On:    
Bug Blocks: 1391489    

Description Gorka Eguileor 2016-11-03 12:20:52 UTC
Description of problem:

  When requesting the cinder-volume and the cinder-api services to stop they will not do a graceful shutdown as expected, instead they will be abruptly terminated.

  Scheduler and backup services do not have this issue.

Version-Release number of selected component (if applicable):

  This affects all versions since oslo service implemented graceful shutdown on v1.3.0.

How reproducible:
  It happens every time.

Steps to Reproduce:

- For the API:
  1. Slow down the attach process on the cinder-volume service (introducing a delay, this is only to be able to simulate the problem)
  2. Send the attach request
  3. systemctl stop openstack-cinder-api

- For the volume:
  1. Slow down the create process on the cinder-volume service (introducing a delay, this is only to be able to simulate the problem)
  2. Send the volume creation request
  3. systemctl stop openstack-cinder-volume

Actual results:
  Status of the resource is attaching or creating, depending on the operation.

Expected results:
  Status should be in-use or available, depending on the operation.

Additional info:
  The problem is that systemd.kill is sending the SIGTERM signal to all processes instead of just sending it to the main process and letting oslo.service propagate this signal to child processes.

  Since scheduler and backup don't have child processes they are safe.

Comment 1 Gorka Eguileor 2016-11-03 12:27:29 UTC
Proposed fix: http://review.rdoproject.org/r/3486

Comment 2 Jon Schlueter 2017-01-11 20:47:32 UTC
patch is landed on rpm-master and newton-rdo, patch for mitaka not yet landed that I could tell.

Comment 3 Christopher Brown 2017-06-22 15:56:09 UTC
Patches landed, closing.