Ubuntu 22.04 Netplan config fails

Problem:

Ubuntu 22.04 deployment fails with Subiquity Netplan error, and drops to terminal.

Expected outcome:
Correct build of /etc/netplan/00-installer-config.yaml

Foreman and Proxy versions:
Foreman v3.10.0

Foreman and Proxy plugin versions:
Foreman & Proxy v3.10.0
Katello v4.12.1

Distribution and version:
CentOS Stream 8

Other relevant data:

dhcp6: should say false not null.

Same issue described here, but the provided solution isn’t working for me or I’m doing something wrong…

Meant to include this link: Ubuntu 22 provisioning error in netplan config

Instead of just hardcoding it to false, something like <%= @dhcp6.nil? ? false : @dhcp6 %> could be the solution.

1 Like

Thank you for the suggestion. When editing an erb file, should a new machine be generated or would a reboot of the failed deployment be enough? Aka, when is the input to the ubiquity process generated and how can one check these files/scripts?

Either nailing it to false or the line you provided doesn’t seem to make a difference either way, when editing: /usr/share/foreman/app/views/unattended/provisioning_templates/snippet/preseed_netplan_generic_interface.erb.

How would I go about troubleshooting this? I’m pretty new to Foreman and this feels like the last hurdle to finally deploying a machine.

Editing preseed_netplan_generic_interface.erb doesn’t change the outcome of the autoinstall.yaml file generated

No need to generate a new machine. In some cases the configuration will be written to disk like the PXE config, then canceling the build and enabling built mode again should work. This snippet goes to user_data so I think it should directly be changed.

You can preview the templates from the hosts detail view and this should show you if your changes affects the template like expected. I think looking into this should be enough, but I have also a section on troubleshooting in our training material which may be helpful.

So I tested it in my environment and it worked like expected. I did go to the templates, unlocked the one, tried both options and after saving it always changed the preview to false.

Leaving this and looking at another ‘issue’, I’m left wondering if these two are somehow related as the netplan issue appears to have been resolved, either by a server reboot or by changing the host creation process as per: Create Host - Can't select OS

Thank you for your input, much appreciated.

1 Like

Thank you, I think this is now fixed.