Bug 848410

Summary: [RFE] alternate method for service shutdown
Product: [Community] oVirt Reporter: Alon Bar-Lev <alonbl>
Component: ovirt-engine-dwhAssignee: Alon Bar-Lev <alonbl>
Status: CLOSED CURRENTRELEASE QA Contact: Barak Dagan <bdagan>
Severity: low Docs Contact:
Priority: medium    
Version: unspecifiedCC: acathrow, iheim, jkt, pstehlik, Rhev-m-bugs, sbonazzo, ydary, yeylon
Target Milestone: ---Keywords: CodeChange, Improvement, Reopened
Target Release: 3.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: integration
Fixed In Version: ovirt-3.4.0-alpha1 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-31 11:04:02 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Alon Bar-Lev 2012-08-15 10:03:34 EDT
CURRENT STATUS

Due to limitation within the dwh framework, the service pulls for file existence in order to shutdown nicely.

Using file as trigger is not recommended, as it performs IO (every X seconds), file needs to be maintained during package lifecycle.

SUGGESTED SOLUTION

Use jvm java agent technology.

Implement java agent that registers for signals (SIGHUP) and produce internal jvm event, load agent when running the java.

Modify the existing file pull loop to wait for a specific event within the jvm.

Alter service to use SIGHUP in order to stop java process.
Comment 10 Alon Bar-Lev 2013-12-19 14:56:15 EST
Solution was simple as the dwh framework can call external java functions, so a singleton that have listener to SIGTERM signal is sufficient, 10 lines of code as replacement to directory scan in intervals.
Comment 11 Sandro Bonazzola 2014-01-13 08:56:21 EST
oVirt 3.4.0 alpha has been released including the fix for this issue.
Comment 12 Barak Dagan 2014-02-24 09:50:14 EST
verified on ovirt-3.4.0-beta3


# service ovirt-engine-dwhd start
Starting oVirt Engine Dataware House: 

# service ovirt-engine-dwhd start
Starting oVirt Engine Dataware House: 

# service ovirt-engine-dwhd status
ovirt-engine-dwhd (pid  18802) is running...

# service ovirt-engine-dwhd stop
Stopping oVirt Engine Dataware House:                      [  OK  ]

# service ovirt-engine-dwhd stop
Stopping oVirt Engine Dataware House:                      [FAILED]

# service ovirt-engine-dwhd stop
Stopping oVirt Engine Dataware House:                      [FAILED]

# service ovirt-engine-dwhd start
Starting oVirt Engine Dataware House:                      [  OK  ]

# service ovirt-engine-dwhd start
Starting oVirt Engine Dataware House: 

# service ovirt-engine-dwhd start
Starting oVirt Engine Dataware House:
Comment 13 Sandro Bonazzola 2014-03-31 11:04:02 EDT
This is an automated message: moving to Closed CURRENT_RELEASE since oVirt 3.4.0 has been released.