cloud-init vSphere cloud provider DHCP unique hostname issue
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
High
|
Chad Smith |
Bug Description
We've had an issue recently when provisioning workloads on vSphere. Here is what happens:
1) Set vSphere as the cloud provider in juju (bootstrap)
2) Deploy workload on vSphere, in our case, Canonical Kubernetes (CDK)
3) Machines are deployed using VMDK, but when they boot the initial hostname is Ubuntu (for all machines) until juju changes it during deployment.
4) DHCP gives each machine a lease, but the DNS entries are all messed up because of identical hostnames.
5) If the machines are rebooted they will receive the correct DNS entries. Note that juju will set the correct hostname eventually, but not when the initial DHCP lease is given to the host.
Basically cloud-init is not giving newly provisioned machines on vSphere their correct hostname before the DHCP lease is given, meaning that every instance during DHCP has the hostname 'ubuntu' which messes up the entries on the DNS server.
Related Bugs:
* https:/
* https:/
* https:/
Related branches
- Server Team CI bot: Approve (continuous-integration)
- Scott Moser: Pending requested
-
Diff: 1999 lines (+765/-204)46 files modified.pylintrc (+11/-1)
cloudinit/cloud.py (+3/-2)
cloudinit/cmd/main.py (+29/-6)
cloudinit/cmd/tests/test_main.py (+161/-0)
cloudinit/config/cc_keys_to_console.py (+1/-3)
cloudinit/config/cc_runcmd.py (+4/-2)
cloudinit/config/cc_salt_minion.py (+59/-23)
cloudinit/config/cc_set_hostname.py (+35/-6)
cloudinit/config/cc_ssh_authkey_fingerprints.py (+4/-5)
cloudinit/distros/arch.py (+1/-4)
cloudinit/distros/freebsd.py (+6/-0)
cloudinit/distros/opensuse.py (+2/-3)
cloudinit/sources/DataSourceAzure.py (+2/-0)
cloudinit/sources/DataSourceOpenNebula.py (+1/-4)
cloudinit/sources/__init__.py (+17/-4)
cloudinit/sources/tests/test_init.py (+69/-1)
cloudinit/stages.py (+1/-2)
cloudinit/tests/helpers.py (+13/-0)
cloudinit/tests/test_util.py (+97/-0)
cloudinit/url_helper.py (+2/-2)
cloudinit/util.py (+32/-14)
config/cloud.cfg.tmpl (+1/-1)
debian/changelog (+22/-0)
doc/rtd/topics/capabilities.rst (+8/-6)
doc/rtd/topics/debugging.rst (+31/-26)
doc/rtd/topics/network-config.rst (+2/-2)
doc/rtd/topics/tests.rst (+10/-10)
tests/cloud_tests/bddeb.py (+1/-1)
tests/cloud_tests/platforms/ec2/__init__.py (+0/-0)
tests/cloud_tests/platforms/lxd/__init__.py (+0/-0)
tests/cloud_tests/platforms/lxd/platform.py (+0/-4)
tests/cloud_tests/platforms/nocloudkvm/__init__.py (+0/-0)
tests/cloud_tests/platforms/nocloudkvm/instance.py (+1/-1)
tests/cloud_tests/platforms/nocloudkvm/platform.py (+0/-4)
tests/cloud_tests/platforms/platforms.py (+12/-2)
tests/cloud_tests/testcases/modules/salt_minion.py (+5/-0)
tests/cloud_tests/testcases/modules/salt_minion.yaml (+4/-1)
tests/cloud_tests/util.py (+5/-1)
tests/unittests/test_datasource/test_azure.py (+15/-0)
tests/unittests/test_handler/test_handler_bootcmd.py (+7/-12)
tests/unittests/test_handler/test_handler_ntp.py (+6/-12)
tests/unittests/test_handler/test_handler_resizefs.py (+3/-11)
tests/unittests/test_handler/test_handler_runcmd.py (+4/-10)
tests/unittests/test_handler/test_handler_set_hostname.py (+53/-4)
tests/unittests/test_handler/test_schema.py (+7/-14)
tests/unittests/test_util.py (+18/-0)
- Scott Moser: Approve
- Server Team CI bot: Approve (continuous-integration)
-
Diff: 668 lines (+449/-22)9 files modifiedcloudinit/cloud.py (+3/-2)
cloudinit/cmd/main.py (+25/-0)
cloudinit/cmd/tests/test_main.py (+161/-0)
cloudinit/config/cc_set_hostname.py (+35/-6)
cloudinit/sources/__init__.py (+17/-4)
cloudinit/sources/tests/test_init.py (+69/-1)
cloudinit/tests/test_util.py (+74/-0)
cloudinit/util.py (+12/-5)
tests/unittests/test_handler/test_handler_set_hostname.py (+53/-4)
tags: | added: cloud-init juju k8s kubernetes |
tags: |
added: dhcp vsphere removed: kubernetes |
description: | updated |
tags: | added: cdo-qa-blocker |
tags: | removed: cdo-qa-blocker |
tags: | added: cdo-qa-blocker |
Changed in cloud-init: | |
status: | New → In Progress |
assignee: | nobody → Chad Smith (chad.smith) |
importance: | Undecided → High |
Changed in cloud-init: | |
status: | In Progress → Incomplete |
Changed in cloud-init: | |
assignee: | David Britton (davidpbritton) → Chad Smith (chad.smith) |
Changed in cloud-init: | |
status: | Incomplete → In Progress |
Changed in cloud-init: | |
status: | Incomplete → In Progress |
Changed in cloud-init: | |
status: | In Progress → Incomplete |
Changed in cloud-init: | |
status: | In Progress → Fix Committed |
information type: | Public → Public Security |
Bug on k8s bundle: https:/ /github. com/juju- solutions/ bundle- canonical- kubernetes/ issues/ 480