cloudinit-userdata doesn't handle lists in runcmd properly
Bug #1759398 reported by
Heather Lanigan
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
Critical
|
Ben Hoyt |
Bug Description
Doesn't work:
$ cat cloudinit-
cloudinit-userdata: |
write_files:
- content: |
path: /etc/sysctl.
postruncmd:
- [ "sysctl", "-p", "/etc/sysctl.
Replacing the last line does work:
- sysctl -p /etc/sysctl.
We're forcing pre and post runcmds to be strings. Per the cloudinit docs
(http://
they can also be a list of strings.
Changed in juju: | |
status: | New → Triaged |
importance: | Undecided → Medium |
tags: | added: cpe-onsite |
Changed in juju: | |
assignee: | nobody → Ben Hoyt (benhoyt) |
Changed in juju: | |
status: | Triaged → Fix Committed |
Changed in juju: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I'm running juju 2.9.34 and jujud is crashing because this reason:
022-08-29 18:43:02 DEBUG juju.cloudconfi g.cloudinit network_ ubuntu. go:147 generating netplan from network. InterfaceInfos{ network. InterfaceInfo{ DeviceIndex: 0, MACAddress: "00:16: 3e:7a:f2: c3", ProviderId:"", Id:"", ProviderNetwork Id:"", ProviderSpaceId:"", ProviderVLANId:"", ProviderAddress Id:"", AvailabilityZon es:[]string( nil), VLANTag:0, InterfaceName: "eth0", ParentInterface Name:"br11" , Interf network. ProviderAddress es(nil) , ShadowAddresses :network. ProviderAddress es(nil) , DNSServers: network. ProviderAddress es(nil) , MTU:0, ns:[]string( nil), GatewayAddress:, Routes: []network. Route(nil) , IsDefaultGatewa y:false, VirtualPortType:"", Origin:"provider"}, network. InterfaceInfo{ DeviceIndex: 0, MACAddress: "00:16: 3e:97:e d:"", ProviderNetwork Id:"", ProviderSpaceId:"", ProviderVLANId:"", ProviderAddress Id:"", AvailabilityZon es:[]string( nil), VLANTag:0, InterfaceName: "eth1", ParentInterfa network. ProviderAddress es(nil) , ShadowAddresses :network. ProviderAddress es(nil) , DNSServers: network. ProviderA s:[]string( nil), GatewayAddress:, Routes: []network. Route(nil) , IsDefaultGatewa y:false, VirtualPortType:"", Origin:"provider"}}
ProviderSubnet
aceType:"", Disabled:false, NoAutoStart:false, ConfigType:"dhcp", Addresses:
DNSSearchDomai
b:16", ProviderId:"", ProviderSubnetI
ceName:"br11", InterfaceType:"", Disabled:false, NoAutoStart:false, ConfigType:"dhcp", Addresses:
ddresses(nil), MTU:0, DNSSearchDomain
2022-08-29 18:43:02 DEBUG juju.service discovery.go:67 discovered init system "systemd" from series "focal"
panic: interface conversion: interface {} is []interface {}, not string
goroutine 5734 [running]: com/juju/ juju/cloudconfi g.(*unixConfigu re).ConfigureJu ju(0xc000a9f4d0 )
/build/ snapcraft- juju-89be21f465 fb3a03c6faac067 8176741/ parts/juju/ build/cloudconf ig/userdatacfg_ unix.go: 260 +0x16a7 com/juju/ juju/cloudconfi g.(*unixConfigu re).Configure( 0xc000eb2300? )
/build/ snapcraft- juju-89be21f465 fb3a03c6faac067 8176741/ parts/juju/ build/cloudconf ig/userdatacfg_ unix.go: 130 +0x2f com/juju/ juju/cloudconfi g/providerinit. configureCloudi nit(0xc000eb230 0, {0x622b1c8?, 0xc0019f2c60?})
/build/ snapcraft- juju-89be21f465 fb3a03c6faac067 8176741/ parts/juju/ build/cloudconf ig/providerinit /providerinit. go:38 +0xb7 com/juju/ juju/cloudconfi g/providerinit. ComposeUserData (0xc000eb2300, {0x622b1c8?, 0xc0019f2c60?}, {0x61a7f00, 0x91251f8})
/build/ snapcraft- juju-89be21f465 fb3a03c6faac067 8176741/ parts/juju/ build/cloudconf ig/providerinit /providerinit. go:60 +0x8f com/juju/ juju/provider/ lxd.(*environ) .getContainerSp ec(_, {_, {_, _}}, {_, _}, {{0xc002bad890, 0x24}, {0x0, 0x0, ...}, ...})
/build/ snapcraft- juju-89be21f465 fb3a03c6faac067 8176741/ parts/juju/ build/provider/ lxd/environ_ broker. go:219 +0x4f1 com/juju/ juju/provider/ lxd.(*environ) .newContainer( _, {_, _}, {{0xc002bad890, 0x24}, {0x0, 0x0, 0x0, 0x0, 0x0, ...}, ...}, ...)
/build/ snapcraft- juju-89be21f465 fb3a03c6faac067 8176741/ parts/juju/ build/provider/ lxd/environ_ broker. go:121 +0x35e com/juju/ juju/provider/ lxd.(*environ) .StartInstance( _, {_, _}, {{0xc002bad890, 0x24}, {0x0, 0x0, 0x0, 0x0, 0x0, ...
github.
github.
github.
github.
github.
github.
github.