Add a shutdownhook to remove jobs owned by the process#8896
Add a shutdownhook to remove jobs owned by the process#8896DaanHoogland merged 2 commits intoapache:4.18from
Conversation
|
@blueorangutan package |
|
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
If you remove the last record (which, in my head is some kind of protection mechanism, but I might be wrong) - don't we run into risk if the following happens:
? |
|
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9212 |
Yes, this is correct. The issue is when you stop the Usage server owning the job, it will no longer have an owner and no server will ever execute a job anymore. Therefore the owning process should remove their job on exit. In the current situation, you have to delete the record manually and the risk is the same. There is just a manual action needed that you need to be aware off. |
|
@blueorangutan test alma9 kvm-alma9 |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (alma9 mgmt + kvm-alma9) has been kicked to run smoke tests |
|
[SF] Trillian Build Failed (tid-9781) |
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
|
@blueorangutan package |
|
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9215 |
|
[SF] Trillian test result (tid-9787)
|
|
Not sure if this can be avoided but when the usage server is killed (with -9, simulating crash), this machanism no longer works - the old entry stays in the db and a new one (with the new pid) is not created when the server is started again. |
|
@vladimirpetrov I don't think it can but I'll have a google. does it lgty otherwise? We can create an improvement later. |
vladimirpetrov
left a comment
There was a problem hiding this comment.
LGTM based on manual testing
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
* 4.18: protect against null-path (apache#8915) UI: Fix missing locale strings for Status widget (apache#8792) Add a shutdownhook to remove jobs owned by the process (apache#8896)
* 4.19: protect against null-path (apache#8915) UI: Fix missing locale strings for Status widget (apache#8792) Add a shutdownhook to remove jobs owned by the process (apache#8896)
Description
This PR...
Fixes: #8590
by adding a shutdown hook that removes the last planned usage job on exit, if owned by the current process.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?