Bug 848410 - [RFE] alternate method for service shutdown
Summary: [RFE] alternate method for service shutdown
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-dwh
Version: unspecified
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: 3.4.0
Assignee: Alon Bar-Lev
QA Contact: Barak Dagan
URL:
Whiteboard: integration
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-15 14:03 UTC by Alon Bar-Lev
Modified: 2014-07-13 23:18 UTC (History)
8 users (show)

Fixed In Version: ovirt-3.4.0-alpha1
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-03-31 15:04:02 UTC
oVirt Team: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 22445 0 None None None Never

Description Alon Bar-Lev 2012-08-15 14:03:34 UTC
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 19:56:15 UTC
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 13:56:21 UTC
oVirt 3.4.0 alpha has been released including the fix for this issue.

Comment 12 Barak Dagan 2014-02-24 14:50:14 UTC
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 15:04:02 UTC
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.