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

vSphere cloud plugin 2.19, Shutdown gracefully option is always unchecked when opening Configuration

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: vsphere-cloud-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.176.1
      vSphere cloud plugin 2.19
    • Similar Issues:

      Description

      In a non-scripted pipeline, a vSphere Build Step set to vSphere Action 'Power-Off VM', the 'Shutdown gracefully' option is always shown unchecked when opening a job Configuration.

      When the option is enabled and the configuration saved, the Job Config History shows:
      <shutdownGracefully>true</shutdownGracefully>

      If the Configuration is reopened and resaved without re-enabling this option, the Job Config History shows:
      <shutdownGracefully>false</shutdownGracefully>

       Note:  version 2.18 works correctly.

      Reproduction:

      1. Create a job with vSphere Build Step set to vSphere Action 'Power-Off VM', the 'Shutdown gracefully' option enabled, and save the configuration
      2. Reopen Configuration for this job>  'Shutdown gracefully' option is incorrectly shown as disabled
      3. Save Configuration without modifying this option> The shutdownGracefully option has been set to false in job configuration

        Attachments

          Issue Links

            Activity

            cheduro Che Duro created issue -
            cheduro Che Duro made changes -
            Field Original Value New Value
            Description In a non-scripted pipeline, a vSphere Build Step set to vSphere Action 'Power-Off VM', the 'Shutdown gracefully' option is always shown unchecked when opening a job Configuration.

            When the option is enabled and the configuration saved, the Job Config History shows:
            {color:#333333}<shutdownGracefully>true</shutdownGracefully>{color}

            {color:#333333}{color:#172b4d}If the Configuration is reopened and resaved without re-enabling this option, the Job Config History shows:
            <shutdownGracefully>false</shutdownGracefully>
            {color}{color}

             

            {color:#333333}{color:#172b4d}Reproduction:{color}{color}
             # {color:#333333}{color:#172b4d}Create a job with vSphere Build Step set to vSphere Action 'Power-Off VM', the 'Shutdown gracefully' option enabled, and save the configuration{color}{color}
             # {color:#333333}{color:#172b4d}Reopen Configuration for this job{color}{color}{color:#333333}{color:#172b4d}>  'Shutdown gracefully' option is incorrectly shown as disabled{color}{color}
             # Save Configuration without modifying this option> The shutdownGracefully option has been set to false in job configuration
            In a non-scripted pipeline, a vSphere Build Step set to vSphere Action 'Power-Off VM', the 'Shutdown gracefully' option is always shown unchecked when opening a job Configuration.

            When the option is enabled and the configuration saved, the Job Config History shows:
             {color:#333333}<shutdownGracefully>true</shutdownGracefully>{color}

            {color:#333333}If the Configuration is reopened and resaved without re-enabling this option, the Job Config History shows:
             <shutdownGracefully>false</shutdownGracefully>{color}
             
             Note:  version 2.18 works correctly.
             
             Reproduction:
             # Create a job with vSphere Build Step set to vSphere Action 'Power-Off VM', the 'Shutdown gracefully' option enabled, and save the configuration
             # Reopen Configuration for this job>  'Shutdown gracefully' option is incorrectly shown as disabled
             # Save Configuration without modifying this option> The shutdownGracefully option has been set to false in job configuration
            Hide
            pjdarton pjdarton added a comment -

            I think I've found the error: The code was changed to say

            checked="false"
            

            I'd guess that removing that attribute should fix the issue ... but I'm not an expert on Jenkins "jelly" code so this would require a bit of trial-and-error to be 100% sure.

            Show
            pjdarton pjdarton added a comment - I think I've found the error: The code was changed to say checked= "false" I'd guess that removing that attribute should fix the issue ... but I'm not an expert on Jenkins "jelly" code so this would require a bit of trial-and-error to be 100% sure.
            pjdarton pjdarton made changes -
            Link This issue is caused by JENKINS-53913 [ JENKINS-53913 ]
            rudolfwg Rudolf-Walter Kiss-Szakacs made changes -
            Assignee Rudolf-Walter Kiss-Szakacs [ rudolfwg ]
            rudolfwg Rudolf-Walter Kiss-Szakacs made changes -
            Remote Link This issue links to "Pull request (Web Link)" [ 23419 ]
            Hide
            pjdarton pjdarton added a comment -

            PR#106 has been merged in and will be included in the next release.

            i.e. This is fixed in the next release.

            Show
            pjdarton pjdarton added a comment - PR#106 has been merged in and will be included in the next release. i.e. This is fixed in the next release.
            pjdarton pjdarton made changes -
            Status Open [ 1 ] Fixed but Unreleased [ 10203 ]
            Resolution Fixed [ 1 ]
            Hide
            pjdarton pjdarton added a comment -

            Che Duro FYI you can download a preview of the next release here: vsphere-cloud.hpi.
            Please can you can test this and verify that this fixes the issue you raised.

            Show
            pjdarton pjdarton added a comment - Che Duro FYI you can download a preview of the next release here: vsphere-cloud.hpi . Please can you can test this and verify that this fixes the issue you raised.
            Hide
            pjdarton pjdarton added a comment -

            Fixed in plugin version 2.21, which was released a few minutes ago.

            Show
            pjdarton pjdarton added a comment - Fixed in plugin version 2.21, which was released a few minutes ago.
            pjdarton pjdarton made changes -
            Status Fixed but Unreleased [ 10203 ] Resolved [ 5 ]
            Assignee Rudolf-Walter Kiss-Szakacs [ rudolfwg ]
            Hide
            cheduro Che Duro added a comment -

            Fix verified in 2.21.  Many thanks.

            Show
            cheduro Che Duro added a comment - Fix verified in 2.21.  Many thanks.
            cheduro Che Duro made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

              People

              • Assignee:
                Unassigned
                Reporter:
                cheduro Che Duro
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: