canonical / cloud-init

Official upstream for the cloud-init: cloud instance initialization
https://cloud-init.io/
Other
2.99k stars 882 forks source link

[SRU] cloud-init archive template should match Ubuntu Server #2370

Closed ubuntu-server-builder closed 1 year ago

ubuntu-server-builder commented 1 year ago

This bug was originally filed in Launchpad as LP: #1177432

Launchpad details
affected_projects = ['cloud-init (Ubuntu)', 'cloud-init (Ubuntu Precise)', 'cloud-init (Ubuntu Trusty)', 'cloud-init (Ubuntu Vivid)', 'cloud-init (Ubuntu Wily)', 'cloud-init (Ubuntu Xenial)']
assignee = None
assignee_name = None
date_closed = 2017-09-11T20:48:21.785817+00:00
date_created = 2013-05-07T15:43:34.052838+00:00
date_fix_committed = 2017-09-11T20:48:21.785817+00:00
date_fix_released = 2017-09-11T20:48:21.785817+00:00
id = 1177432
importance = undecided
is_complete = True
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1177432
milestone = None
owner = smoser
owner_name = Scott Moser
private = False
status = fix_released
submitter = darkmuggle-deactivatedaccount
submitter_name = Ben Howard
tags = ['bot-comment', 'verification-done']
duplicates = []

Launchpad user Ben Howard(darkmuggle-deactivatedaccount) wrote on 2013-05-07T15:43:34.052838+00:00

[SRU Justification] Ubuntu Cloud Images are inconsistent with desktop and bare-metal server installations since backports, restricted and multiverse are not enabled. This is effected via cloud-init that uses a template to select an in-cloud archive.

[FIX] Make the cloud-init template match that of Ubuntu-server.

[REGRESION] The potential for regression is low. However, all users will experience slower fetch times on apt-get updates especially on slower or high latency networks.

[TEST]

  1. Build image from -proposed
  2. Boot up image
  3. Confirm that "sudo apt-get update" pulls in backports, restricted and multiverse.

Backports are currently not enabled in the cloud-init template. This is needed in order to get the backport kernels on cloud images.

Related bugs:   bug 997371: Create command to add "multiverse" and "-backports" to apt sources   bug 1513529: cloud image built-in /etc/apt/sources.list needs updating

ubuntu-server-builder commented 1 year ago

Launchpad user Ubuntu Foundations Team Bug Bot(crichton) wrote on 2013-05-07T16:19:05.760036+00:00

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1177432/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

ubuntu-server-builder commented 1 year ago

Launchpad user Launchpad Janitor(janitor) wrote on 2013-05-15T13:14:01.200135+00:00

Status changed to 'Confirmed' because the bug affects multiple users.

ubuntu-server-builder commented 1 year ago

Launchpad user Scott Moser(smoser) wrote on 2013-05-15T19:06:53.989399+00:00

== summary == fix this problem by creating tools to manage /etc/apt/sources.list

== details == I realize that cloud-init is just kind of caught in the middle here because of the template that it has, and the fact that that template has not been updated to keep in sync with changes made elsewhere to the default sources list.

I personally prefer the smaller sources.list that is present in the cloud images. For reference, the differences between a server install of 13.04 cd and cloud-init template at the moment are:

Ignoring multiarch, and translations, which are also multipliers, That means 20 more GETs every time 'apt-get update' is done. That is nothing to be scoffed at.

I put a gist at https://gist.github.com/smoser/5586288 which uses chdist to easily time runs of 'apt-get update'. The differences are very real. In quick tests on raring, I was seeing a refresh taking 20 seconds for "full list" versus 8 seconds for cloud-images list against a locally warmed cache.

This is partially because apt is doing the GET serially, but even the cpu decompression does take time.

My basic issue boils down to this:

I'd prefer that we solve this not by making cloud-init have a large amount of additional sources. If I were to suggest making a change, it would be to remove deb-src entries from /etc/apt/sources.list to make it smaller.

My suggestion is that we fix this problem by adding tools that manipulate /etc/apt/sources.list or sources.list.d similar to 'apt-add-repository', but that support aliases like 'backports', 'partner', 'multiverse'. Example usage:

Cloud-init can then expose such simple instructions in its cloud-config syntax.

ubuntu-server-builder commented 1 year ago

Launchpad user Scott Moser(smoser) wrote on 2013-05-21T20:23:54.587927+00:00

2 comments: a.) bug 997371 is now fixed, so you should be able to do: apt-add-repository multiverse b.) some relevant discussion at https://lists.ubuntu.com/archives/ubuntu-devel-discuss/2013-May/014503.html

ubuntu-server-builder commented 1 year ago

Launchpad user Stéphane Graber(stgraber) wrote on 2015-11-02T04:04:59.551973+00:00

Just ran into this issue again today when testing the LXD backport.

This is pretty annoying as it's causing a completely different user experience for cloud users compared to regular distro users.

Also, at least in trusty, apt-add-repository doesn't know how to add backports, so a user will need to manually update /etc/apt/sources.list and then run apt-get update which makes installing backports significantly harder than it should be.

ubuntu-server-builder commented 1 year ago

Launchpad user Dustin Kirkland (kirkland) wrote on 2015-11-02T14:36:41.516713+00:00

This is bad. Please fix this asap.

ubuntu-server-builder commented 1 year ago

Launchpad user Antonio Rosales(arosales) wrote on 2015-11-02T23:49:52.681345+00:00

Ben,

To confirm the behavior, will the default be kept for selecting back-ported packages? Specifically, in order to install a back-ported image a cloud-image user would have to be explicit in choosing to install from back-port, ie $ sudo apt-get install /trusty-backports

ref = https://help.ubuntu.com/community/UbuntuBackports

ubuntu-server-builder commented 1 year ago

Launchpad user Antonio Rosales(arosales) wrote on 2015-11-02T23:52:57.140912+00:00

--- Correction ---

Ben,

To confirm the behavior, will the default be kept for selecting back-ported packages? Specifically, in order to install a back-ported package a cloud-image user would have to be explicit in choosing to install from back-port, ie $ sudo apt-get install /trusty-backports

ref = https://help.ubuntu.com/community/UbuntuBackports

ubuntu-server-builder commented 1 year ago

Launchpad user Ben Howard(darkmuggle-deactivatedaccount) wrote on 2015-11-03T00:42:40.302884+00:00

In re to #7/#8, the handling of selections from backports will NOT be changed.

Users will have to specifically opt-in to selecting packages.

i.e to get regular ansible: $ sudo apt-get install ansible

Whereas are the following examples are valid for pulling from backports $ sudo apt-get -t trusty-backports install ansible $ sudo apt-get install lxd/trusty-backports

ubuntu-server-builder commented 1 year ago

Launchpad user Antonio Rosales(arosales) wrote on 2015-11-03T00:47:52.654699+00:00

Re comment 9, thanks for confirming @utlemming.

-Antonio

ubuntu-server-builder commented 1 year ago

Launchpad user Scott Moser(smoser) wrote on 2015-11-03T19:56:25.174399+00:00

Launchpad attachments: trusty-sources.list: sources.list produced from ubuntu-14.04.3-server-amd64.iso

ubuntu-server-builder commented 1 year ago

Launchpad user Scott Moser(smoser) wrote on 2015-11-03T19:57:01.998541+00:00

Launchpad attachments: wily-sources.list: sources.list produced from ubuntu-15.10-server-amd64.iso

ubuntu-server-builder commented 1 year ago

Launchpad user Scott Moser(smoser) wrote on 2015-11-04T01:59:30.398884+00:00

I've committed the change to trunk that actually puts the template now inline with what is provided by 14.04 and 15.10 server iso installs (as seen in those attachments above).

I've also added tools to https://gist.github.com/smoser/5586288 and some more information. This illustrates well my desire for '--if-necessary' as requested in bug 1429285.

To summarize the changes below. That is roughly 450k additional download data (compressed size). Most notable is a stark doubling of GETs from 27 to 58:

## old cloud sources.list after "apt-get clean"
$ ./summarize-http out.d/cloud/clean/update.err
...
data bytes: 14431826
total GETS: 27
200: 16
404: 11

## old cloud sources.list immediately repeated 'apt-get update'
$ ./summarize-http out.d/cloud/noclean/update.err
...
data bytes: 0
total GETS: 27
304: 16
404: 11

## ISO sources.list after "apt-get clean"
$ ./summarize-http out.d/cd/clean/update.err
...
data bytes: 14893753
total GETS: 58
200: 37
404: 21

## ISO sources.list immediately repeated 'apt-get update'
$ ./summarize-http out.d/cd/noclean/update.err
...
data bytes: 0
total GETS: 58
304: 37
404: 21
ubuntu-server-builder commented 1 year ago

Launchpad user Chris J Arges(arges) wrote on 2015-11-04T17:12:50.554204+00:00

Hello Ben, or anyone else affected,

Accepted cloud-init into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/0.7.5-0ubuntu1.13 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

ubuntu-server-builder commented 1 year ago

Launchpad user Chris J Arges(arges) wrote on 2015-11-04T17:42:30.097521+00:00

Hello Ben, or anyone else affected,

Accepted cloud-init into vivid-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/0.7.7~bzr1091-0ubuntu10 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

ubuntu-server-builder commented 1 year ago

Launchpad user Chris J Arges(arges) wrote on 2015-11-04T17:43:09.171393+00:00

Hello Ben, or anyone else affected,

Accepted cloud-init into wily-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/0.7.7~bzr1149-0ubuntu2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

ubuntu-server-builder commented 1 year ago

Launchpad user Ben Howard(darkmuggle-deactivatedaccount) wrote on 2015-11-05T15:12:24.123328+00:00

Marking as verification-failed pending a rebase on the new upstream trunk.

ubuntu-server-builder commented 1 year ago

Launchpad user Launchpad Janitor(janitor) wrote on 2015-11-05T18:42:52.097326+00:00

This bug was fixed in the package cloud-init - 0.7.7~bzr1154-0ubuntu1


cloud-init (0.7.7~bzr1154-0ubuntu1) xenial; urgency=medium

ubuntu-server-builder commented 1 year ago

Launchpad user Chris J Arges(arges) wrote on 2015-11-05T22:46:39.313106+00:00

Hello Ben, or anyone else affected,

Accepted cloud-init into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/0.7.5-0ubuntu1.14 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

ubuntu-server-builder commented 1 year ago

Launchpad user Chris J Arges(arges) wrote on 2015-11-05T22:47:22.811054+00:00

Hello Ben, or anyone else affected,

Accepted cloud-init into vivid-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/0.7.7~bzr1091-0ubuntu11 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

ubuntu-server-builder commented 1 year ago

Launchpad user Chris J Arges(arges) wrote on 2015-11-05T22:48:11.464910+00:00

Hello Ben, or anyone else affected,

Accepted cloud-init into wily-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/0.7.7~bzr1149-0ubuntu3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

ubuntu-server-builder commented 1 year ago

Launchpad user Ben Howard(darkmuggle-deactivatedaccount) wrote on 2015-11-06T15:46:02.514470+00:00

Verified changes enable multiverse, restricted and backports in cloud images.

ubuntu-server-builder commented 1 year ago

Launchpad user Launchpad Janitor(janitor) wrote on 2015-11-10T17:41:11.186427+00:00

This bug was fixed in the package cloud-init - 0.7.7~bzr1149-0ubuntu3


cloud-init (0.7.7~bzr1149-0ubuntu3) wily; urgency=medium

ubuntu-server-builder commented 1 year ago

Launchpad user Launchpad Janitor(janitor) wrote on 2015-11-10T17:42:32.412139+00:00

This bug was fixed in the package cloud-init - 0.7.7~bzr1091-0ubuntu11


cloud-init (0.7.7~bzr1091-0ubuntu11) vivid; urgency=medium

ubuntu-server-builder commented 1 year ago

Launchpad user Adam Conrad(adconrad) wrote on 2015-11-10T17:42:36.555447+00:00

The verification of the Stable Release Update for cloud-init has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

ubuntu-server-builder commented 1 year ago

Launchpad user Launchpad Janitor(janitor) wrote on 2015-11-10T17:42:47.257113+00:00

This bug was fixed in the package cloud-init - 0.7.5-0ubuntu1.14


cloud-init (0.7.5-0ubuntu1.14) trusty; urgency=medium

ubuntu-server-builder commented 1 year ago

Launchpad user Brian Murray(brian-murray) wrote on 2015-11-12T19:19:41.917520+00:00

Hello Ben, or anyone else affected,

Accepted cloud-init into precise-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/0.6.3-0ubuntu1.23 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

ubuntu-server-builder commented 1 year ago

Launchpad user Martin Pitt(pitti) wrote on 2015-11-18T10:34:46.252721+00:00

I adjusted the autopkgtest-cloud infrastructure for this change yesterday, as this caused some fallout.

I now created a custom cloud image for precise with the -proposed update, and tests that ran against it confirm that there now are apt sources for restricted/multiverse/backports, etc:

https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-precise/precise/i386/b/bbswitch/20151117_222222@/log.gz

ubuntu-server-builder commented 1 year ago

Launchpad user Martin Pitt(pitti) wrote on 2015-11-18T12:55:58.892935+00:00

This actually did introduce quite a major behaviour change: "apt-get source foo" will now download the -backports version, not the version that you would get with "apt-get install".

ubuntu-server-builder commented 1 year ago

Launchpad user Ben Howard(darkmuggle-deactivatedaccount) wrote on 2015-11-23T18:29:59.641310+00:00

The behavior change was both expected and calculated. The problem here is that the cloud images and cloud-init driven boots would have different package sources than a bare-metal desktop or server install.

ubuntu-server-builder commented 1 year ago

Launchpad user Launchpad Janitor(janitor) wrote on 2015-12-02T18:46:46.916584+00:00

This bug was fixed in the package cloud-init - 0.6.3-0ubuntu1.24


cloud-init (0.6.3-0ubuntu1.24) precise; urgency=medium

ubuntu-server-builder commented 1 year ago

Launchpad user Scott Moser(smoser) wrote on 2015-12-09T19:25:21.643768+00:00

just to collect other references to fallout, this change is at least partially responsible for bug 1523608 (https://bugs.launchpad.net/maas/+bug/1523608/comments/20)