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

Slave does not start if the temp dir is not set to anything after upgrade to 1.25

    XMLWordPrintable

Details

    Description

      After updating the plugin I can no longer provision EC2 machines.
      It connects with success but it fails with
      "Could not find /init.sh"
      I've fixed by reverting to previous version.

      Attachments

        Issue Links

          Activity

            fonsecas72 hugo fonseca created issue -
            fonsecas72 hugo fonseca made changes -
            Field Original Value New Value
            Description After updating the plugin I can no longer provision EC2 machines.
            It connects with success but it fails with
            "Could not find /init.sh"
            I've fixed by reverting to previous version.
            francisu Francis Upton added a comment -

            Which version are you running?

            francisu Francis Upton added a comment - Which version are you running?
            francisu Francis Upton added a comment -

            Is there a stack trace? Can you attach the complete log?

            francisu Francis Upton added a comment - Is there a stack trace? Can you attach the complete log?
            fonsecas72 hugo fonseca added a comment -

            Node dem (i-cc)(i-cc) is still pending/launching, waiting 5s
            Node dem (i-cc)(i-) is ready
            Connecting to ec2.compute-1.amazonaws.com on port 22, with timeout 10000.
            Waiting for SSH to come up. Sleeping 5.
            Connected via SSH.
            bootstrap()
            Getting keypair...
            Using key: dom
            Authenticating as dam
            take over connection
            Creating tmp directory () if it does not exist
            mkdir: missing operand
            Try `mkdir --help' for more information.
            Executing init script
            bash: /init.sh: No such file or directory
            init script failed: exit code=127

            fonsecas72 hugo fonseca added a comment - Node dem (i-cc)(i-cc) is still pending/launching, waiting 5s Node dem (i-cc)(i-) is ready Connecting to ec2.compute-1.amazonaws.com on port 22, with timeout 10000. Waiting for SSH to come up. Sleeping 5. Connected via SSH. bootstrap() Getting keypair... Using key: dom Authenticating as dam take over connection Creating tmp directory () if it does not exist mkdir: missing operand Try `mkdir --help' for more information. Executing init script bash: /init.sh: No such file or directory init script failed: exit code=127
            fonsecas72 hugo fonseca added a comment -

            Jenkins 1.580.2
            Amazon EC2 plugin 1.25

            fonsecas72 hugo fonseca added a comment - Jenkins 1.580.2 Amazon EC2 plugin 1.25
            fonsecas72 hugo fonseca added a comment -

            No stacktrace at Jenkins log.

            fonsecas72 hugo fonseca added a comment - No stacktrace at Jenkins log.
            fonsecas72 hugo fonseca added a comment -

            Ubuntu slave
            No fancy configurations. Almost default.

            fonsecas72 hugo fonseca added a comment - Ubuntu slave No fancy configurations. Almost default.
            fonsecas72 hugo fonseca added a comment -

            If I set temp dir it works.
            Maybe some "null - empty string" issue?

            fonsecas72 hugo fonseca added a comment - If I set temp dir it works. Maybe some "null - empty string" issue?
            francisu Francis Upton added a comment -

            @Hugo, yes, it should probably handle the empty temp dir better. Thanks for looking more deeply.

            francisu Francis Upton added a comment - @Hugo, yes, it should probably handle the empty temp dir better. Thanks for looking more deeply.
            francisu Francis Upton made changes -
            Priority Blocker [ 1 ] Major [ 3 ]
            Summary Weird "Could not find /init.sh" after update Slave does not start if the temp dir is not set to anything after upgrade to 1.25
            fonsecas72 hugo fonseca added a comment -

            Thank you @Francis and sorry the delay. Great job BTW.

            fonsecas72 hugo fonseca added a comment - Thank you @Francis and sorry the delay. Great job BTW.
            stevedonie Steve Donie made changes -
            Link This issue is duplicated by JENKINS-26559 [ JENKINS-26559 ]

            > yes, it should probably handle the empty temp dir better

            +1 on that hunch.

            So, https://github.com/francisu/ec2-plugin/commit/716497f3df642a3e0df097ce05364213179bbb88 is a commit which introduce breakage. Specific line with the issue appers to be: https://github.com/francisu/ec2-plugin/commit/716497f3df642a3e0df097ce05364213179bbb88#diff-634d86776ce3255b6bbd6d5eacf0680aR105 , and the issue is that ".tmpDir != null" construct should be "fixEmpty(....tmpDir) != null" (possibly, fixEmptyAndTrim()).

            @Francis Upton : Please let everyone know if you're working on fixing this critical issue and on driving 1.26 release with the fix ASAP, or if you expect someone else to do that (or something else). Thanks.

            pfalcon Paul Sokolovsky added a comment - > yes, it should probably handle the empty temp dir better +1 on that hunch. So, https://github.com/francisu/ec2-plugin/commit/716497f3df642a3e0df097ce05364213179bbb88 is a commit which introduce breakage. Specific line with the issue appers to be: https://github.com/francisu/ec2-plugin/commit/716497f3df642a3e0df097ce05364213179bbb88#diff-634d86776ce3255b6bbd6d5eacf0680aR105 , and the issue is that ".tmpDir != null" construct should be "fixEmpty(....tmpDir) != null" (possibly, fixEmptyAndTrim()). @Francis Upton : Please let everyone know if you're working on fixing this critical issue and on driving 1.26 release with the fix ASAP, or if you expect someone else to do that (or something else). Thanks.

            Code changed in jenkins
            User: Francis Upton IV
            Path:
            src/main/java/hudson/plugins/ec2/ssh/EC2UnixLauncher.java
            http://jenkins-ci.org/commit/ec2-plugin/535704775e2505f29a98596884ce4b8ae7c8ee75
            Log:
            JENKINS-26531 Slave does not start if the temp dir is not set to
            anything after upgrade to 1.25

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Francis Upton IV Path: src/main/java/hudson/plugins/ec2/ssh/EC2UnixLauncher.java http://jenkins-ci.org/commit/ec2-plugin/535704775e2505f29a98596884ce4b8ae7c8ee75 Log: JENKINS-26531 Slave does not start if the temp dir is not set to anything after upgrade to 1.25
            francisu Francis Upton made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            francisu Francis Upton made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Resolved [ 5 ]
            francisu Francis Upton added a comment -

            All done, version 1.26 released. Sorry for the trouble.

            francisu Francis Upton added a comment - All done, version 1.26 released. Sorry for the trouble.
            francisu Francis Upton made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

            Thumbs up, thanks for quick turnaround. Confirming that upgrading from 1.24 directly to 1.26 works as expected, without any additional actions.

            pfalcon Paul Sokolovsky added a comment - Thumbs up, thanks for quick turnaround. Confirming that upgrading from 1.24 directly to 1.26 works as expected, without any additional actions.
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 160601 ] JNJira + In-Review [ 208360 ]

            People

              francisu Francis Upton
              fonsecas72 hugo fonseca
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: