saltstack / saltstack/salt

salt-cloud vmware Windows Template on a DHCP network with static map file doesn't connect

Open
#39,955 9 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug P1 severity-high ZD
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description of Issue/Question

When deploying a new Windows Template using salt-cloud vmware module with a static IP in the map file, but the destination network is DHCP, the salt-cloud installer gets the DHCP address first before the server has finished being customized by vmware image customized. The customization complets and sets the IP address but salt-cloud does not see the new IP address and keeps trying the DHCP address.

Setup

(Please provide relevant configs and/or SLS files (Be sure to remove sensitive info).)

[root@salt-cloud02 build.d]# cat /etc/salt/cloud.profiles.d/ADCCluster-win2012r2.conf

ADCCluster-win2012r2:
  provider: 'vmware-vcsa1'
  clonefrom: 'Template - SaltBootstrap - WINMASTER'
  folder: 'Builds'
  datacenter: ADC
  cluster: 'VMWareCluster'
  deploy: True

  num_cpus: 1
  memory: 4GB

  devices:
    network:
      Network adapter 1:
        name: 'VLAN151_MGMT-10.16.201.0-24'
        switch_type: distributed
        ip: 10.16.201.123
        gateway: 10.16.201.1
        subnet_mask: 255.255.255.0
        domain: lab.local

  domain: lab.local
  dns_servers:
    - 10.16.201.11
    - 10.16.201.12

  power_on: True
  win_username: Administrator
  win_password: reallybadpassword
  win_organization_name: LAB
  plain_text: True
  win_installer: /srv/salt/installer/Salt-Minion-2016.11.2-x86-Setup.exe
  win_user_fullname: Windows User
  use_winrm: False
  winrm_verify_ssl: False
Steps to Reproduce Issue

(Include debug logs if possible and relevant.)

[root@salt-cloud02 build.d]# salt-cloud -l info -p LADCCluster-win2012r2 testvm111
[INFO    ] salt-cloud starting
[WARNING ] There's no master defined on the 'testvm111' VM settings.
[ERROR   ] Specified folder: 'Builds' does not exist
[INFO    ] Creating testvm111 from template(Template - SaltBootstrap - TCWINMASTER-12.2.1114.3s)
[INFO    ] [ testvm111 ] Waiting for clone task to finish [0 s]
[INFO    ] [ testvm111 ] Successfully completed clone task in 5 seconds
[INFO    ] [ testvm111 ] Waiting for VMware tools to be running [0 s]
[INFO    ] [ testvm111 ] Waiting for VMware tools to be running [5 s]
[INFO    ] [ testvm111 ] Waiting for VMware tools to be running [10 s]
[INFO    ] [ testvm111 ] Waiting for VMware tools to be running [15 s]
[INFO    ] [ testvm111 ] Waiting for VMware tools to be running [20 s]
[INFO    ] [ testvm111 ] Waiting for VMware tools to be running [25 s]
[INFO    ] [ testvm111 ] Waiting for VMware tools to be running [30 s]
[INFO    ] [ testvm111 ] Waiting for VMware tools to be running [35 s]
[INFO    ] [ testvm111 ] Waiting for VMware tools to be running [40 s]
[INFO    ] [ testvm111 ] Waiting for VMware tools to be running [45 s]
[INFO    ] [ testvm111 ] Successfully got VMware tools running on the guest in 45 seconds
[INFO    ] [ testvm111 ] Waiting to retrieve IPv4 information [0 s]
[INFO    ] [ testvm111 ] Waiting to retrieve IPv4 information [5 s]
[INFO    ] [ testvm111 ] Waiting to retrieve IPv4 information [10 s]
[INFO    ] [ testvm111 ] Waiting to retrieve IPv4 information [15 s]
[INFO    ] [ testvm111 ] Waiting to retrieve IPv4 information [20 s]
[INFO    ] [ testvm111 ] Waiting to retrieve IPv4 information [25 s]
[INFO    ] [ testvm111 ] Waiting to retrieve IPv4 information [30 s]
[INFO    ] [ testvm111 ] Waiting to retrieve IPv4 information [35 s]
[INFO    ] [ testvm111 ] Waiting to retrieve IPv4 information [40 s]
[INFO    ] [ testvm111 ] Waiting to retrieve IPv4 information [45 s]
[INFO    ] [ testvm111 ] Waiting to retrieve IPv4 information [50 s]
[INFO    ] [ testvm111 ] Waiting to retrieve IPv4 information [55 s]
[INFO    ] [ testvm111 ] Waiting to retrieve IPv4 information [60 s]
[INFO    ] [ testvm111 ] Waiting to retrieve IPv4 information [65 s]
[INFO    ] [ testvm111 ] Waiting to retrieve IPv4 information [70 s]
[INFO    ] [ testvm111 ] Waiting to retrieve IPv4 information [75 s]
[INFO    ] [ testvm111 ] Waiting to retrieve IPv4 information [80 s]
[INFO    ] [ testvm111 ] Waiting to retrieve IPv4 information [85 s]
[INFO    ] [ testvm111 ] Waiting to retrieve IPv4 information [90 s]
[INFO    ] [ testvm111 ] Waiting to retrieve IPv4 information [95 s]
[INFO    ] [ testvm111 ] Waiting to retrieve IPv4 information [100 s]
[INFO    ] [ testvm111 ] Waiting to retrieve IPv4 information [105 s]
[INFO    ] [ testvm111 ] Waiting to retrieve IPv4 information [110 s]
[INFO    ] [ testvm111 ] Waiting to retrieve IPv4 information [115 s]
[INFO    ] [ testvm111 ] Waiting to retrieve IPv4 information [120 s]
[INFO    ] [ testvm111 ] Waiting to retrieve IPv4 information [125 s]
[INFO    ] [ testvm111 ] Waiting to retrieve IPv4 information [130 s]
[INFO    ] [ testvm111 ] Waiting to retrieve IPv4 information [135 s]
[INFO    ] [ testvm111 ] Waiting to retrieve IPv4 information [140 s]
[INFO    ] [ testvm111 ] Successfully retrieved IPv4 information in 140 seconds
[INFO    ] [ testvm111 ] IPv4 is: 10.16.201.236
[INFO    ] Rendering deploy script: /usr/lib/python2.7/site-packages/salt/cloud/deploy/bootstrap-salt.sh
[INFO    ] Running command under pid 24216: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24217: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24218: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24219: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24220: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24221: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24222: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24231: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24232: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24233: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24234: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24235: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24236: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24237: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24238: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24239: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24240: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24241: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24242: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24243: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24244: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24302: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24303: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24304: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24305: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24306: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24307: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24308: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24309: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24310: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24311: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24312: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24313: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24314: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24315: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24316: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24317: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24318: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
[INFO    ] Running command under pid 24327: '-U 'Administrator%XXX-REDACTED-XXX' //10.16.201.236'
^C
Exiting gracefully on Ctrl-c
Versions Report

(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
[root@salt-cloud02 build.d]# salt --versions-report
Salt Version:
Salt: 2016.11.3

Dependency Versions:
cffi: Not Installed
cherrypy: 3.2.2
dateutil: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.7.2
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.8
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pygit2: Not Installed
Python: 2.7.5 (default, Nov 6 2016, 00:28:07)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 15.3.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.4

System Versions:
dist: centos 7.3.1611 Core
machine: x86_64
release: 3.10.0-514.6.1.el7.x86_64
system: Linux
version: CentOS Linux 7.3.1611 Core

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the salt-cloud VMware module and the IPv4 retrieval flow described in the issue, then reproduce the deployment using the shown profile and salt-cloud command. Done means a Windows VM that initially receives DHCP uses the static map-file address after VMware customization, rather than continuing to contact the DHCP address.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.