-
Notifications
You must be signed in to change notification settings - Fork 908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"failed stage init-local" while testing autoinstall on Noble #4630
Comments
I can reproduce this on Nobel server-live images in manual install case as well. Marking this as needed for 23.4. Investigating the source of the issue here and we want to ensure this is resolved/understood before we release cloud-init 23.4. |
Ok, the issue was introduced in this commit ee86a37 and affects any datasource detected only in the init-Network boot stage. When no datasource is discovered/detected during the Local boot stage, cloud-init still calls apply_network_config to emit a basic dhcp on primary NIC configuration prior to system networking being brought up. Due to the above commit, cloud-init also attempts to write the generated network configuration dictionary to the expected symlink: /var/lib/cloud/instance/network-config.json. In the Local boot stage, when no datasource is yet detected, the symlink doesn't yet exist at |
In Local boot stage (pre-systemnetworking) only write /var/lib/cloud/instance/network-config.json if the symlink /v/l/c/instance already exits. This instance symlink is created only once a datasource is discovered in either Local or Network boot stage. This bug affects any environment where the detected datasource is only discovered in the Network boot stage. If no viable datasource is detected during the Local boot stage, cloud-init calls apply_network_config to minimally setup a basic fallback network config with DHCP on the primary NIC. In this case, cloud-init will no longer attempt to write the fallback network-config.json during Local boot. Defer writing the networ-config.json to Network boot stage once /var/lib/cloud/instance exists for a detected datasource. Fixes canonicalGH-4630
…ical#4635) In Local boot stage (pre-systemnetworking) only write /var/lib/cloud/instance/network-config.json if the symlink /v/l/c/instance already exits. This instance symlink is created only once a datasource is discovered in either Local or Network boot stage. This bug affects any environment where the detected datasource is only discovered in the Network boot stage. If no viable datasource is detected during the Local boot stage, cloud-init calls apply_network_config to minimally setup a basic fallback network config with DHCP on the primary NIC. In this case, cloud-init will no longer attempt to write the fallback network-config.json during Local boot. Defer writing the networ-config.json to Network boot stage once /var/lib/cloud/instance exists for a detected datasource. Fixes canonicalGH-4630
…ical#4635) Only write /var/lib/cloud/instance/network-config.json once datasource is detected. The /var/lib/clound/instance symlink is created by Init.instancify after datasource detection is complete. Migrate creation of /var/lib/cloud/instance/network-config.json out of apply_network_config and into instancify, after the datasource is detected. This fixes a bug by ensuring /var/lib/cloud/instance exists before persisting /v/l/cloud/instance/network-config.json. Fixes canonicalGH-4630
…4635) Only write /var/lib/cloud/instance/network-config.json once datasource is detected. The /var/lib/clound/instance symlink is created by Init.instancify after datasource detection is complete. Move creation of /var/lib/cloud/instance/network-config.json into it's own method _write_network_config_json. It will be called by any call to apply_network_config. apply_network_config is called in both Local and Network stages. In Local stage, apply_network_config is used to either: - render the final network config of datasource detected in Local - in absence of Local datasource, render basic fallback DHCP on primary NIC to allow network to come up before detecting a Network datasource For Network datasources, they will not have been discovered or instancify'd in Local boot stage, so apply_network_config cannot yet persist network-config.json. Defer creation of network-config.json for Network datasources until until the link /var/lib/cloud/instance exists and apply_network_config is called in Network stage to render final network config. Fixes canonicalGH-4630
…4635) Only write /var/lib/cloud/instance/network-config.json once datasource is detected. The /var/lib/clound/instance symlink is created by Init.instancify after datasource detection is complete. Move creation of /var/lib/cloud/instance/network-config.json into it's own method _write_network_config_json. It will be called by any call to apply_network_config. apply_network_config is called in both Local and Network stages. In Local stage, apply_network_config is used to either: - render the final network config of datasource detected in Local - in absence of Local datasource, render basic fallback DHCP on primary NIC to allow network to come up before detecting a Network datasource For Network datasources, they will not have been discovered or instancify'd in Local boot stage, so apply_network_config cannot yet persist network-config.json. Defer creation of network-config.json for Network datasources until until the link /var/lib/cloud/instance exists and apply_network_config is called in Network stage to render final network config. Fixes canonicalGH-4630
…4635) Only write /var/lib/cloud/instance/network-config.json once datasource is detected. The /var/lib/clound/instance symlink is created by Init.instancify after datasource detection is complete. Move creation of /var/lib/cloud/instance/network-config.json into it's own method _write_network_config_json. It will be called by any call to apply_network_config. apply_network_config is called in both Local and Network stages. In Local stage, apply_network_config is used to either: - render the final network config of datasource detected in Local - in absence of Local datasource, render basic fallback DHCP on primary NIC to allow network to come up before detecting a Network datasource For Network datasources, they will not have been discovered or instancify'd in Local boot stage, so apply_network_config cannot yet persist network-config.json. Defer creation of network-config.json for Network datasources until until the link /var/lib/cloud/instance exists and apply_network_config is called in Network stage to render final network config. Fixes canonicalGH-4630
…4635) Only write /var/lib/cloud/instance/network-config.json once datasource is detected. The /var/lib/clound/instance symlink is created by Init.instancify after datasource detection is complete. Move creation of /var/lib/cloud/instance/network-config.json into it's own method _write_network_config_json. It will be called by any call to apply_network_config. apply_network_config is called in both Local and Network stages. In Local stage, apply_network_config is used to either: - render the final network config of datasource detected in Local - in absence of Local datasource, render basic fallback DHCP on primary NIC to allow network to come up before detecting a Network datasource For Network datasources, they will not have been discovered or instancify'd in Local boot stage, so apply_network_config cannot yet persist network-config.json. Defer creation of network-config.json for Network datasources until until the link /var/lib/cloud/instance exists and apply_network_config is called in Network stage to render final network config. Fixes canonicalGH-4630
…4635) Only write /var/lib/cloud/instance/network-config.json once datasource is detected. The /var/lib/clound/instance symlink is created by Init.instancify after datasource detection is complete. Move creation of /var/lib/cloud/instance/network-config.json into it's own method _write_network_config_json. It will be called by any call to apply_network_config. apply_network_config is called in both Local and Network stages. In Local stage, apply_network_config is used to either: - render the final network config of datasource detected in Local - in absence of Local datasource, render basic fallback DHCP on primary NIC to allow network to come up before detecting a Network datasource For Network datasources, they will not have been discovered or instancify'd in Local boot stage, so apply_network_config cannot yet persist network-config.json. Defer creation of network-config.json for Network datasources until until the link /var/lib/cloud/instance exists and apply_network_config is called in Network stage to render final network config. Fixes canonicalGH-4630
…4635) Only write /var/lib/cloud/instance/network-config.json once datasource is detected. The /var/lib/clound/instance symlink is created by Init.instancify after datasource detection is complete. Move creation of /var/lib/cloud/instance/network-config.json into it's own method _write_network_config_json. It will be called by any call to apply_network_config. apply_network_config is called in both Local and Network stages. In Local stage, apply_network_config is used to either: - render the final network config of datasource detected in Local - in absence of Local datasource, render basic fallback DHCP on primary NIC to allow network to come up before detecting a Network datasource For Network datasources, they will not have been discovered or instancify'd in Local boot stage, so apply_network_config cannot yet persist network-config.json. Defer creation of network-config.json for Network datasources until until the link /var/lib/cloud/instance exists and apply_network_config is called in Network stage to render final network config. Fixes canonicalGH-4630
…4635) Only write /var/lib/cloud/instance/network-config.json once datasource is detected. The /var/lib/clound/instance symlink is created by Init.instancify after datasource detection is complete. Move creation of /var/lib/cloud/instance/network-config.json into a separate method _write_network_config_json. It will be called by any call to apply_network_config. apply_network_config is called in both Local and Network stages. In Local stage, apply_network_config is used to either: - render the final network config of datasource detected in Local - in absence of Local datasource, render basic fallback DHCP on primary NIC to allow network to come up before detecting a Network datasource For Network datasources, they will not have been discovered or instancify'd in Local boot stage, so apply_network_config cannot yet persist network-config.json. Defer creation of network-config.json for Network datasources until the link /var/lib/cloud/instance exists and apply_network_config is called in Network stage to render final network config. Fixes canonicalGH-4630
Bug report
I can't make autoinstall work on the latest Noble image. I can see tracebacks in the cloud-init.log and, as a result, subiquity doesn't not recognize autoinstall was provided.
I tested both USB and HTTP methods for provisioning autoinstall configuration files but no luck in both cases. The logs below refers to the HTTP test.
Steps to reproduce the problem
Apart from this test, I've also tested both the basic examples in here without success.
Environment details
cloud-init logs
The text was updated successfully, but these errors were encountered: