Status: Closed (View Workflow)
Hudson v1.348 and Hudson Amazon EC2 plugin v1.6
the Amazon EC2 Plugin requires root access - either by ssh'ing to to root or requiring the non-root user to have sudo. Our slave AMI's are designed to use the user "hudson" - no root access is required for the slave to do it's work.
The solution here is to use the "Remote user" dir if no "Root command prefix" is given (rather than assuming root).
Code changed in jenkins
User: Frank Bille
[FIXED JENKINS-12539] Convert to Amazon AWS libraries
[FIXED JENKINS-5867] Allow Amazon EC2 Plugin to not require root access
I've recently started using the EC2 plugin and I can't get it to log in as a user other than root. Looking through the code, it seems like the patch that is assigned to this ticket was never implemented.
EDIT - I'm only seeing the issue on Spot Instances.
Hi, I can confirm what nvitius said. I am using the EC2 plugin and having problem to build from a non-root user on a spot instance.
Updated: I retract what I said, it could be managed by controlling the user executing the userdata script.
One annoying effect of this bug is that non-EC2 machines have a different environment than EC2 instances due to being root.
The patch fixes this issue by only re-connecting as root if "root Command Prefix" is specified in the configuration, else it returns SAMEUSER.