forked from armadaproject/armada
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix scheduler initialisation startup race (armadaproject#4132)
* Fix scheduler initialisation startup race Currently the SubmitCheck.Run loads all the queues from the queue cache + executors from the database, this relies on QueueCache already having the queues loaded As SubmitCheck.Run and QueueCache.Run are called at the same time in separate go routines, sometimes SubmitCheck.Run happens first and can't find the queues - When this happens, it blocks scheduling for 1 minute (until next SubmitCheck executor refresh) I've added an Initialise method to QueueCache so we can call this during component creation, preventing the race described above Signed-off-by: JamesMurkin <jamesmurkin@hotmail.com> * Change executor update frequency - test if this fixes CI * Fix ci Signed-off-by: JamesMurkin <jamesmurkin@hotmail.com> * Make sure queue cache and submit check are initialise on startup Signed-off-by: JamesMurkin <jamesmurkin@hotmail.com> * Revert config changes Signed-off-by: JamesMurkin <jamesmurkin@hotmail.com> * Respect JobLeaseRequestTimeout, reduce CI JobLeaseRequestTimeout to 5s, remove 70s sleep Signed-off-by: JamesMurkin <jamesmurkin@hotmail.com> * Format Signed-off-by: JamesMurkin <jamesmurkin@hotmail.com> * Set scheduler depending on server Signed-off-by: JamesMurkin <jamesmurkin@hotmail.com> * Wait for postgres to start running Signed-off-by: JamesMurkin <jamesmurkin@hotmail.com> * Remove server dependency Signed-off-by: JamesMurkin <jamesmurkin@hotmail.com> * Improve startup tests Signed-off-by: JamesMurkin <jamesmurkin@hotmail.com> * Fix func calls Signed-off-by: JamesMurkin <jamesmurkin@hotmail.com> * Move to separate funcs for checking running/ready Signed-off-by: JamesMurkin <jamesmurkin@hotmail.com> * Add timeouts + log errors on startup rather than exit Signed-off-by: JamesMurkin <jamesmurkin@hotmail.com> * Pass in timeout Signed-off-by: JamesMurkin <jamesmurkin@hotmail.com> * Set longer timeout Signed-off-by: JamesMurkin <jamesmurkin@hotmail.com> --------- Signed-off-by: JamesMurkin <jamesmurkin@hotmail.com> Signed-off-by: Rich Scott <richscott@sent.com>
- Loading branch information
1 parent
a3efe6a
commit 0c3e28c
Showing
11 changed files
with
172 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
ARMADA_EXECUTORAPICONNECTION_ARMADAURL="scheduler:50052" | ||
ARMADA_EXECUTORAPICONNECTION_FORCENOTLS=true | ||
ARMADA_APPLICATION_JOBLEASEREQUESTTIMEOUT=5s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters