cloud-init pre-networking fails if kernel cmdline defines static ip
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
Medium
|
Unassigned |
Bug Description
cloud-init pre-networking fails when grub is configured to use a static IP with the 'autoconf' field set to 'none' (https:/
Cloud provider: vsphere
Static IP is configured here (/etc/default/
---
# https:/
# off or none: don't use autoconfiguration (do static IP assignment instead)
GRUB_CMDLINE_
---
Error:
File "/usr/lib/
raise ValueError(
ValueError: Unexpected value for PROTO: none
Workarounds:
Option 1. Change the grub config to use 'dhcp' even though it defines most of the fields statically
GRUB_CMDLINE_
Option 2. Patch to normalize 'none' to 'static' (I'd guess there's a more proper fix further up the call)
--- /usr/lib/
+++ /usr/lib/
@@ -52,6 +52,8 @@
else:
proto = 'static'
+ if proto == 'none':
+ proto = 'static'
if proto not in ('static', 'dhcp', 'dhcp6'):
raise ValueError(
summary: |
- cloud-init pre-networking fails if grub defines static ip + cloud-init pre-networking fails if kernel cmdline defines static ip |
You mention 'grub', is this at all specific to grub? or is this just kernel command line specific.