do not create nocloud-net seed without --cloud-init parameter

Bug #1633232 reported by Ryan Harper
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Image
Fix Released
High
Barry Warsaw
ubuntu-image (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned
Yakkety
Fix Released
Undecided
Unassigned
Zesty
Fix Released
Undecided
Unassigned

Bug Description

If a provided gadget snap includes a cloud.conf file (which prevents snap prepare-image from writing out /etc/cloud/cloud-init.disabled) then the resulting image should be able to accept cloud-init user-data from where ever the seed may be (local, net, etc); however, if ubuntu-image writes out /var/lib/cloud/seed/nocloud-net/meta-data (which it does) this tells cloud-init it has a local seed and it will not search elsewhere for user-data.

The nocloud-net seed should only be written if the user also supplied some user-data to the --cloud-init parameter.

Revision history for this message
Steve Langasek (vorlon) wrote :

We do need to support creating all-snap images that support reading cloud init data from a network source. However, this bug report supposes that this should be the default, i.e. when no --cloud-init option is passed. I don't agree that this should be the default - preparing a generic image that you want to collect configuration information from the network that it's attached to is /not/ the common case for snappy, the common case is that the network you're attaching to is unknown/untrusted, and doesn't have any data source anyway leading to annoying timeouts on boot.

So allowing cloud-init to search for network data sources should be handled with an additional option. I don't know if this option belongs on the ubuntu-image commandline, vs. as part of the model assertion.

Revision history for this message
Ryan Harper (raharper) wrote : Re: [Bug 1633232] Re: do not create nocloud-net seed without --cloud-init parameter

On Thu, Oct 13, 2016 at 7:24 PM, Steve Langasek <
<email address hidden>> wrote:

> We do need to support creating all-snap images that support reading
> cloud init data from a network source. However, this bug report
>

There is more than one way to get a local seed.

ubuntu-image assumes it will embed the nocloud-net seed *inside* the image
versus say attaching a USB or CDROM to the machine on which the user-data
seed is present.

> supposes that this should be the default, i.e. when no --cloud-init
> option is passed. I don't agree that this should be the default -
> preparing a generic image that you want to collect configuration
> information from the network that it's attached to is /not/ the common
> case for snappy, the common case is that the network you're attaching to
> is unknown/untrusted, and doesn't have any data source anyway leading to
> annoying timeouts on boot.
>

There's more than network. additionally, cloud-init is *disabled* by
default unless you create a gadget snap with a 'cloud.conf' file
in it, so the timeout is unrelated to common case.

>
> So allowing cloud-init to search for network data sources should be
> handled with an additional option. I don't know if this option belongs
> on the ubuntu-image commandline, vs. as part of the model assertion.
>
>
This bug isn't strictly about network data sources, rather just not
embedding a seed
unless someone provides some config a built-time.

> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1633232
>
> Title:
> do not create nocloud-net seed without --cloud-init parameter
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu-image/+bug/1633232/+subscriptions
>

Barry Warsaw (barry)
Changed in ubuntu-image:
importance: Undecided → High
status: New → Triaged
assignee: nobody → Barry Warsaw (barry)
milestone: none → 0.10
description: updated
Barry Warsaw (barry)
Changed in ubuntu-image:
status: Triaged → In Progress
Revision history for this message
Barry Warsaw (barry) wrote :
Barry Warsaw (barry)
Changed in ubuntu-image:
status: In Progress → Fix Committed
Barry Warsaw (barry)
Changed in ubuntu-image:
status: Fix Committed → Fix Released
Changed in ubuntu-image (Ubuntu Xenial):
status: New → Fix Released
Barry Warsaw (barry)
Changed in ubuntu-image (Ubuntu Yakkety):
status: New → Fix Released
Changed in ubuntu-image (Ubuntu Zesty):
status: New → Fix Released
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.