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

Don't wait for VM IP on vsphere expose info step

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: Minor Minor
    • vsphere-cloud-plugin
    • vsphere 6.5, vSphere cloud plugin 2.18, Jenkins 2.107.2

      I run Expose guest info job with enabled wait For Ip 4 option on just deployed VM. But this job finished successfully and don't wait for IPv4 cause job skips adding variable "IpAddress" as it is a null value and don't add variable <Prefix>_IpAddress.

      My VM is in starting up state at this time and don't get IP. But after sometime it gets IP from DHCP. I need to wait for IP during some timeout or fail job if I can't get IP. Deploy VM don't fail job if

      Here is log of this job:

      // 
      03:40:55 [vSphere] 
      03:40:55 [vSphere] Performing vSphere build step: "Expose Guest Info"
      03:40:55 [vSphere] Attempting to use server configuration: "Automation Test Environment"
      03:41:11 [vSphere] Exposing guest info for VM "TESTVM" as environment variables
      03:41:12 [vSphere] Skipped "HostName" as it is a null value
      03:41:12 [vSphere] Skipped "Screen" as it is of type class com.vmware.vim25.GuestScreenInfo
      03:41:12 [vSphere] Skipped "IpAddress" as it is a null value
      03:41:12 [vSphere] Skipped "GuestId" as it is a null value
      03:41:12 [vSphere] Added environmental variable "VSPHERE_AppHeartbeatStatus" with a value of "appStatusGray"
      03:41:12 [vSphere] Added environmental variable "VSPHERE_ToolsVersionStatus" with a value of "guestToolsCurrent"
      03:41:12 [vSphere] Added environmental variable "VSPHERE_ToolsVersionStatus2" with a value of "guestToolsCurrent"
      03:41:12 [vSphere] Skipped "GuestStateChangeSupported" as it is a null value
      03:41:12 [vSphere] Skipped "GenerationInfo" as it is of type class [Lcom.vmware.vim25.GuestInfoNamespaceGenerationInfo;
      03:41:12 [vSphere] Added environmental variable "VSPHERE_GuestOperationsReady" with a value of "false"
      03:41:12 [vSphere] Added environmental variable "VSPHERE_ToolsRunningStatus" with a value of "guestToolsNotRunning"
      03:41:12 [vSphere] Skipped "GuestKernelCrashed" as it is a null value
      03:41:12 [vSphere] Added environmental variable "VSPHERE_AppState" with a value of "none"
      03:41:12 [vSphere] Added environmental variable "VSPHERE_GuestState" with a value of "running"
      03:41:12 [vSphere] Skipped "IpStack" as it is of type class [Lcom.vmware.vim25.GuestStackInfo;
      03:41:12 [vSphere] Skipped "GuestFamily" as it is a null value
      03:41:12 [vSphere] Skipped "Net" as it is of type class [Lcom.vmware.vim25.GuestNicInfo;
      03:41:12 [vSphere] Added environmental variable "VSPHERE_ToolsStatus" with a value of "toolsNotRunning"
      03:41:12 [vSphere] Added environmental variable "VSPHERE_InteractiveGuestOperationsReady" with a value of "false"
      03:41:12 [vSphere] Skipped "GuestFullName" as it is a null value
      03:41:12 [vSphere] Added environmental variable "VSPHERE_ToolsVersion" with a value of "10240"
      03:41:12 [vSphere] Skipped "Disk" as it is of type class [Lcom.vmware.vim25.GuestDiskInfo;
      03:41:14 Finished: SUCCESS
      

          [JENKINS-53093] Don't wait for VM IP on vsphere expose info step

          pjdarton added a comment -

          Looks like the code was enhanced in version 2.16 to implement a "waitForIp4" parameter that'd for the IP address to become available.

          I've looked at the code and, as far as I can make out, IF that flag is set to true THEN the action will wait indefinitely for the IP address to appear.

          There's no indication of any looping in your logs so I suspect that the waitForIp4 field is not set to "true".

          ...it also looks like there's no public Boolean getWaitForIp4() method so it might be very easy for this flag to get set to false when the action is saved.  It could be that this flag only works correctly when invoked from a Jenkins pipeline build.

          pjdarton added a comment - Looks like the  code was enhanced in version 2.16 to implement a "waitForIp4" parameter that'd for the IP address to become available. I've looked at the code and, as far as I can make out, IF that flag is set to true THEN the action will wait indefinitely for the IP address to appear. There's no indication of any looping in your logs so I suspect that the waitForIp4 field is not set to "true". ...it also looks like there's no public Boolean getWaitForIp4() method so it might be very easy for this flag to get set to false when the action is saved.  It could be that this flag only works correctly when invoked from a Jenkins pipeline build.

          pjdarton added a comment -

          Closed due to a lack of response. Suspect it's no longer an issue in later versions.

          pjdarton added a comment - Closed due to a lack of response. Suspect it's no longer an issue in later versions.

            Unassigned Unassigned
            lykhachov vladimir lykhachov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: