-
Notifications
You must be signed in to change notification settings - Fork 689
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JENKINS-23792] Do not terminate stopped EC2 nodes that were just boo…
…ted (#632) * regression, do not terminate stopped EC2 nodes that were just booted again when a node just booted it is not connected, and simultaneously its idle start time could still be set to the last time the node was booted. If the instance is checked by the plugin while in this phase, the plugin will erroneously decide to terminate it again. The change in this PR adds a safety check to ensure that idle time is calculated from the greatest of idle time as returned by jenkins or the node uptime, as returned by EC2. Fixes: https://issues.jenkins.io/browse/JENKINS-23792 * get launch time the right way * move test into its own test case * remove old test case, which was moved into its own method a few lines below * rename launchedAtMs to getLaunchTime * provide valid test case for issue fixed by this PR https://issues.jenkins.io/browse/JENKINS-23792 * wording * fix reason for assertion
- Loading branch information
Showing
3 changed files
with
94 additions
and
16 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
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