yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #78245
[Bug 1817644] Re: Cloud-init not applying networking config
[Expired for MAAS because there has been no activity for 60 days.]
** Changed in: maas
Status: Incomplete => Expired
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1817644
Title:
Cloud-init not applying networking config
Status in cloud-init:
Invalid
Status in MAAS:
Expired
Bug description:
Machines deployed via MaaS is not applying the network configuration
as defined in the user_data cloud config file.
To deploy we are using the following (where $user_data is base64 encoded the cloud-config file)
maas <profile> machine deploy <machine_id> user_data=$user_data
The #cloud-config file consists of the following:
*adding a user
*install packages
*allow password authentication
*configure eno1 which assigns a static IP and tags VLAN (version 2 specified)
The result is a successful deploy with all the above configurations
applied *except* the network portion.
/var/lib/instances/user-data.txt obtains the expected configuration as
it was provided in the mass deploy command, including the network
config.
/etc/cloud/cloud.cfg.d/50-curtin-networking.cfg file obtains the
configuration which MaaS is configured for during commissioning which
is DHCP *rather* than the configuration for a static IP address
assignment and VLAN tag.
In addition, while trying to debug cloud-init we are not able to
successfully analyze /var/log/cloud-init.log and get the following
error:
ubuntu@test:/var/log$ sudo cloud-init analyze show -i ./cloud-init.log
Traceback (most recent call last):
File "/usr/bin/cloud-init", line 11, in <module>
load_entry_point('cloud-init==18.4', 'console_scripts', 'cloud-init')()
File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 904, in main
get_uptime=True, func=functor, args=(name, args))
File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 2514, in log_time
ret = func(*args, **kwargs)
File "/usr/lib/python3/dist-packages/cloudinit/analyze/__main__.py", line 104, in analyze_show
args.print_format)):
File "/usr/lib/python3/dist-packages/cloudinit/analyze/show.py", line 192, in show_events
return generate_records(events, print_format=print_format)
File "/usr/lib/python3/dist-packages/cloudinit/analyze/show.py", line 175, in generate_records
prev_evt = unprocessed.pop()
IndexError: pop from empty list
ubuntu@test:/var/log$
Upon searching in this log file however, we can see the user accounts
being created and packages installed but any reference to the network
configuration which was passed via cloud-init doesn't seem to exist.
It is confirmed that the user created exists and is functional as well
as the packages defined are installed.
We are able to manually apply network configuration via cloud-init by performing the following steps:
#rename current curtin networking config file
mv /etc/cloud/cloud.cfg.d/50-curtin-networking.cfg /etc/cloud/cloud.cfg.d/50-curtin-networking.cfg.old
#create new curtin networking config file with same permissions as original
touch /etc/cloud/cloud.cfg.d/50-curtin-networking.cfg
#copy network: stanza from cloud-config file to 50-curtin-
networking.cfg
#clean and re-init
cloud-init clean
cloud-init init
#test network config
netplan try
Result here is success where the static IP is accessible on the NIC.
For reference the switch-port config for eno1 for this node is as follows:
*default/native vlan XXX
*vlan tagged on that interface YYY
**goal here is to PXE on the network VLAN XXX and then jump to live network during deloyments which then should put the server on VLAN YYY, our production network.
We cannot achieve this success with the MaaS deployments and would
like some assistance to debug this issue.
Thank you all in advance.
mgaribaldi@maas-rack16:/var/log/maas$ dpkg -l '*maas*'|cat
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-===============================-======================================-============-=================================================
ii maas 2.5.0-7442-gdf68e30a5-0ubuntu1~18.04.1 all "Metal as a Service" is a physical cloud and IPAM
ii maas-cli 2.5.0-7442-gdf68e30a5-0ubuntu1~18.04.1 all MAAS client and command-line interface
un maas-cluster-controller <none> <none> (no description available)
ii maas-common 2.5.0-7442-gdf68e30a5-0ubuntu1~18.04.1 all MAAS server common files
ii maas-dhcp 2.5.0-7442-gdf68e30a5-0ubuntu1~18.04.1 all MAAS DHCP server
un maas-dns <none> <none> (no description available)
ii maas-proxy 2.5.0-7442-gdf68e30a5-0ubuntu1~18.04.1 all MAAS Caching Proxy
ii maas-rack-controller 2.5.0-7442-gdf68e30a5-0ubuntu1~18.04.1 all Rack Controller for MAAS
ii maas-region-api 2.5.0-7442-gdf68e30a5-0ubuntu1~18.04.1 all Region controller API service for MAAS
ii maas-region-controller 2.5.0-7442-gdf68e30a5-0ubuntu1~18.04.1 all Region Controller for MAAS
un maas-region-controller-min <none> <none> (no description available)
un python-django-maas <none> <none> (no description available)
un python-maas-client <none> <none> (no description available)
un python-maas-provisioningserver <none> <none> (no description available)
ii python3-django-maas 2.5.0-7442-gdf68e30a5-0ubuntu1~18.04.1 all MAAS server Django web framework (Python 3)
ii python3-maas-client 2.5.0-7442-gdf68e30a5-0ubuntu1~18.04.1 all MAAS python API client (Python 3)
ii python3-maas-provisioningserver 2.5.0-7442-gdf68e30a5-0ubuntu1~18.04.1 all MAAS server provisioning libraries (Python 3)
mgaribaldi@maas-rack16:/var/log/maas$
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1817644/+subscriptions