When Cloud-init from MAAS configures a Ubuntu Core 18 device, console-conf still runs and fails during network configuration

Bug #1817294 reported by Luke Williams
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
subiquity
New
Undecided
Unassigned

Bug Description

Hello,

I deployed Ubuntu Core 18 with MAAS, which uses cloud-init to configure the device. This configures networking, storage, uploads public ssh keys from MAAS to an ubuntu user on the device. This all works and you can login via ssh to the device with your ssh key(s), however, console-conf still says on the console of the device to "Press enter to continue" for first configuration of Ubuntu Core 18. If you do this, you get to the network configuration and if you check Done, you get the following error:

Network configuration failed: 'Error in network definition /etc/netplan/00-snapd-config.yaml line 4 column 6: ens3: set-name: requires match: properties\n'

You cannot continue and you are stuck in this console screen.

There should be a way so that if the device is configured, that console-conf recognizes this and allows the user to use the existing configuration, or be disabled when the system is deployed with MAAS and configured with cloud-init.

Revision history for this message
Ryan Harper (raharper) wrote : Re: [Bug 1817294] [NEW] When Cloud-init from MAAS configures a Ubuntu Core 18 device, console-conf still runs and fails during network configuration

This is by design since you are not the owner of the device. If you want
to own the device then MAAS has to send snap user info and email to become
the owner and consoleconf won’t run if the device is owned.

On Fri, Feb 22, 2019 at 12:25 PM Luke Williams <email address hidden>
wrote:

> Public bug reported:
>
> Hello,
>
> I deployed Ubuntu Core 18 with MAAS, which uses cloud-init to configure
> the device. This configures networking, storage, uploads public ssh keys
> from MAAS to an ubuntu user on the device. This all works and you can
> login via ssh to the device with your ssh key(s), however, console-conf
> still says on the console of the device to "Press enter to continue" for
> first configuration of Ubuntu Core 18. If you do this, you get to the
> network configuration and if you check Done, you get the following
> error:
>
> Network configuration failed: 'Error in network definition
> /etc/netplan/00-snapd-config.yaml line 4 column 6: ens3: set-name:
> requires match: properties\n'
>
> You cannot continue and you are stuck in this console screen.
>
> There should be a way so that if the device is configured, that console-
> conf recognizes this and allows the user to use the existing
> configuration, or be disabled when the system is deployed with MAAS and
> configured with cloud-init.
>
> ** Affects: subiquity
> Importance: Undecided
> Status: New
>
>
> ** Tags: cloud-init console-conf ubuntu-core-18
>
> --
> You received this bug notification because you are subscribed to
> subiquity.
> Matching subscriptions: subiquity-bugs
> https://bugs.launchpad.net/bugs/1817294
>
> Title:
> When Cloud-init from MAAS configures a Ubuntu Core 18 device, console-
> conf still runs and fails during network configuration
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/subiquity/+bug/1817294/+subscriptions
>

Revision history for this message
Luke Williams (wililupy) wrote :

Thanks, That makes a lot of sense. What about if you use a custom network configuration? For example say I create an assertion to manually configure the network with a netplan yaml? You still end up in this same situation, and the only way to fix it is to mount the image, and manually 'touch' complete in to /var/lib/console-conf on the writable partition so that I can login to the device?

This is what I did on my test Ubuntu Core 18 machine since MAAS installed my ssh keys on the device with cloud-init I was able to ssh as the ubuntu user on the device and sudo touch /var/lib/console-conf/completed and then when I rebooted the device, it shown the login screen instead of trying to configure the device.

I still think this is a bug because if the device is already pre-configured with network, you cannot fully finish setting up the device.

Revision history for this message
Ryan Harper (raharper) wrote : Re: [Bug 1817294] Re: When Cloud-init from MAAS configures a Ubuntu Core 18 device, console-conf still runs and fails during network configuration

You can’t take over network when MAAS, you need to model what you want in
MAAS and MAAS sends configure networking and cloud init will apply.

On Fri, Feb 22, 2019 at 5:15 PM Luke Williams <email address hidden>
wrote:

> Thanks, That makes a lot of sense. What about if you use a custom
> network configuration? For example say I create an assertion to manually
> configure the network with a netplan yaml? You still end up in this same
> situation, and the only way to fix it is to mount the image, and
> manually 'touch' complete in to /var/lib/console-conf on the writable
> partition so that I can login to the device?

You need to own the device, there is no other way, all else is a hack.

>
> This is what I did on my test Ubuntu Core 18 machine since MAAS
> installed my ssh keys on the device with cloud-init I was able to ssh as
> the ubuntu user on the device and sudo touch /var/lib/console-
> conf/completed and then when I rebooted the device, it shown the login
> screen instead of trying to configure the device.
>
> I still think this is a bug because if the device is already pre-
> configured with network, you cannot fully finish setting up the device.

You set up the device via console conf, or with sending snap user via cloud
init.

>
> --
> You received this bug notification because you are subscribed to
> subiquity.
> Matching subscriptions: subiquity-bugs
> https://bugs.launchpad.net/bugs/1817294
>
> Title:
> When Cloud-init from MAAS configures a Ubuntu Core 18 device, console-
> conf still runs and fails during network configuration
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/subiquity/+bug/1817294/+subscriptions
>

Revision history for this message
Luke Williams (wililupy) wrote :

A potential customer is running into this issue. They are using Cloud-init to create users on the device and while it is not impacting the use of the device, if someone connects to the console, they see that the device is not configured and when they try to configure it, they get the netplan error and cannot move forward.
They are using the work around I mentioned in comment 2 to get around this bug. They would like to see it so that if using cloud-init to configure the device, console-conf should not run.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.