Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-33443

Init script fails to create ~/.hudson-run-init on completion and runs multiple times



    • Bug
    • Status: Resolved (View Workflow)
    • Minor
    • Resolution: Fixed
    • ec2-plugin
    • None
    • Jenkins 1.625.3
      Amazon EC2 plugin 1.31
      Master and slaves running Ubuntu 14.04


      I noticed my Unix slaves on EC2 do not have a ~/.hudson-run-init file, despite running the init script (and following setup steps) successfully. As a result, when they're brought back up from a stopped state, they run the init script again, wasting ~20 minutes.

      Some relevant AMI configuration:

      • Remote FS root: /home/ubuntu
      • Remote user: ubuntu
      • AMI Type: unix
      • Root command prefix: sudo
      • Init script is essentially: sudo $HOME/init_script.sh

      On a successfully connected slave, I expect to see /home/ubuntu/.hudson-run-init, but there's no such file. I took a quick look at EC2UnixLauncher.java, and everything looks reasonable. My only question is why touch ~/.hudson-run-init would need to be run as root. But both touch ~/.hudson-run-init and sudo touch ~/.hudson-run-init produce the expected file when run manually as the ubuntu user. So I'm a bit stumped.

      I'm testing out touching the file myself in the init script as a workaround.



          mihelich Patrick Mihelich created issue -
          rtyler R. Tyler Croy made changes -
          Field Original Value New Value
          Workflow JNJira [ 169361 ] JNJira + In-Review [ 183465 ]
          raihaan Raihaan Shouhell made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]


            francisu Francis Upton
            mihelich Patrick Mihelich
            0 Vote for this issue
            4 Start watching this issue