-
Notifications
You must be signed in to change notification settings - Fork 1.2k
server: run the vm scheduler poll task on only one management server #11573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 4.20
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 4.20 #11573 +/- ##
=========================================
Coverage 16.17% 16.17%
+ Complexity 13286 13284 -2
=========================================
Files 5656 5656
Lines 498015 498019 +4
Branches 60406 60407 +1
=========================================
+ Hits 80538 80539 +1
- Misses 408515 408518 +3
Partials 8962 8962
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good. One comment
@@ -190,6 +197,11 @@ public boolean start() { | |||
final TimerTask schedulerPollTask = new ManagedContextTimerTask() { | |||
@Override | |||
protected void runInContext() { | |||
ManagementServerHostVO msHost = managementServerHostDao.findOneInUpState(new Filter(ManagementServerHostVO.class, "id", false, 0L, 1L)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a method named findOneByLongestRuntime()
. Could that be used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shwstppr
yes, sure.
actually I considered both and decided to usefindOneInUpState
as it is being used in more files
@blueorangutan package |
@shwstppr 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]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 14843 |
@blueorangutan package |
@weizhouapache 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]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 14849 |
@@ -190,6 +196,11 @@ public boolean start() { | |||
final TimerTask schedulerPollTask = new ManagedContextTimerTask() { | |||
@Override | |||
protected void runInContext() { | |||
ManagementServerHostVO msHost = managementServerHostDao.findOneInUpStateByLongestRuntime(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we require a GLOBAL_LOCK ? (I'm commenting here, but I don't know what's the best place to put it; generally global lock should wrap code which needs to run only at most in one mgmt ...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point
just checked the same file, there is a global lock in the poll
method (line 225)
@blueorangutan test |
@shwstppr a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
Description
This PR fixes #11564
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?