Bug 848410 - [RFE] alternate method for service shutdown
[RFE] alternate method for service shutdown
Status: CLOSED CURRENTRELEASE
Product: oVirt
Classification: Community
Component: ovirt-engine-dwh (Show other bugs)
unspecified
Unspecified Unspecified
medium Severity low
: ---
: 3.4.0
Assigned To: Alon Bar-Lev
Barak Dagan
integration
: CodeChange, Improvement, Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-15 10:03 EDT by Alon Bar-Lev
Modified: 2014-07-13 19:18 EDT (History)
8 users (show)

See Also:
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: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 22445 None None None Never

  None (edit)
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.

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