NullPointerException due to non-backwards compatibility in hudson.plugins.EC2.SlaveTemplate.

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major
    • Component/s: ec2-plugin
    • Environment:
      Jenkins 2.172, ec2-plugin master (likely as of 2f348aa519338aac64dd19954b0b41a62a8ea6fc)

      Upon upgrading the ec2-plugin to master and restarting Jenkins, the EC2 nodes begin to fail connecting with the following exception

       

       

      This is likely due to the recent change that allows configuring the strategy for determining the hostname/IP address of the node https://github.com/jenkinsci/ec2-plugin/pull/329.

      https://wiki.jenkins.io/display/JENKINS/Hint+on+retaining+backward+compatibility suggests that it is necessary to define a readResolve() method when deprecating fields (in this case the boolean fields usePrivateDnsName connectUsingPublicIp) because when objects are loaded from XML their constructors are not invoked.

      What likely happened here, is that the newly defined connectionStrategy was null when loaded from XML, causing the hostname/IP address determination to fail at instance startup time.

       

      jvz
      dgarzon

            Assignee:
            FABRIZIO MANFREDI
            Reporter:
            Adrien Tateno
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: