[JIRA] (JENKINS-61304) EC2 Plugin terminates instances temporarily offline

5 views
Skip to first unread message

umberto.nicoletti@gmail.com (JIRA)

unread,
Mar 3, 2020, 2:19:02 AM3/3/20
to jenkinsc...@googlegroups.com
Umberto Nicoletti created an issue
 
Jenkins / Bug JENKINS-61304
EC2 Plugin terminates instances temporarily offline
Issue Type: Bug Bug
Assignee: FABRIZIO MANFREDI
Components: ec2-plugin
Created: 2020-03-03 07:18
Environment: Jenkins 2.204.2
EC2 Plugin 1.49.1
Priority: Minor Minor
Reporter: Umberto Nicoletti

The latest version of the plugin added code to catch instances that were started, and then failed to connect to Jenkins. Previously such instances would stay up forever incurring unnecessary costs. The code block that adds this functionality is: https://github.com/jenkinsci/ec2-plugin/blob/master/src/main/java/hudson/plugins/ec2/EC2RetentionStrategy.java#L167-L185

 

Note hos whe termination branch is guarded by the clause `computer.isOffline()` which is unfortunately too broad. Looking up the definition of `computer.isOffline()` yields this code:

{{ @Exported public boolean isOffline() {}}
return temporarilyOffline || getChannel()==null;
}

 

This reveals that temporarilyOffline is considered too: as a result an instance that has sucessfully connected, but is, for example, under temporary maintenance will be abruptly terminated by the plugin.

AFAICT there is no simple workaround, besides perhaps rewriting `if (computer.isOffline()){` to `if (computer.getChannel()==null){`

 

I'll try to submit a patch asap

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

ayapejian@centeredgesoftware.com (JIRA)

unread,
Apr 22, 2020, 11:39:03 PM4/22/20
to jenkinsc...@googlegroups.com
Ara Yapejian commented on Bug JENKINS-61304
 
Re: EC2 Plugin terminates instances temporarily offline

Just wondering if anyone else is experiencing this?  We ran into the same symptoms, rolling back to EC2 Plugin 1.47 resolved the problem without any other changes being made.  The fact that the issue hasn't got more traction has me second guessing what else could be the issue if it's only happening to a select few. 

umberto.nicoletti@gmail.com (JIRA)

unread,
Apr 23, 2020, 1:16:02 AM4/23/20
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages