-
Notifications
You must be signed in to change notification settings - Fork 880
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
Cloud specific binary packages #5655
Cloud specific binary packages #5655
Conversation
This PR requires #5637 to be merged and upstream released to really get rid of |
65ba099
to
5ff63c9
Compare
I have updated this PR performing a new upstream release based on tip of main to include #5637. |
The ci check check-patches fails due to #5675. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! In general LGTM, though I think @blackboxsw and/or somebody from distro should review this too.
Many thanks for the feedback, @TheRealFalcon.
Could you, @basak, please take a look on this one? SC-1728 and US120 for context. |
5ff63c9
to
2252c62
Compare
Force-pushed to add a |
2252c62
to
a494644
Compare
^ This PR was in a wrong status. The MAAS handling was included in the |
a494644
to
34700ec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm seeing package upgrade issuse in postinst which point to inconsistencies in cloud-init w.r.t. a full package replacement of cloud-init-base from the original cloud-init package. I'm wondering if this is a case where we need to employ dpkg-divert here to avoid those file and directory conflicts.
Unpacking cloud-init-base (24.4~3+really24.3.1-0ubuntu5~ppa1) ...
dpkg: error processing archive /var/cache/apt/archives/cloud-init-base_24.4~3+really24.3.1-0ubuntu5~ppa1_all.deb (--unpack):
trying to overwrite '/etc/cloud/cloud.cfg', which is also in package cloud-init 24.4~3+really24.3.1-0ubuntu4
dmesg: read kernel buffer failed: Operation not permitted
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../cloud-init_24.4~3+really24.3.1-0ubuntu5~ppa1_all.deb ...
Unpacking cloud-init (24.4~3+really24.3.1-0ubuntu5~ppa1) over (24.4~3+really24.3.1-0ubuntu4) ...
dpkg: warning: unable to delete old directory '/etc/cloud/templates': Directory not empty
dpkg: warning: unable to delete old directory '/etc/cloud/cloud.cfg.d': Directory not empty
dpkg: warning: unable to delete old directory '/etc/cloud': Directory not empty
Errors were encountered while processing:
/var/cache/apt/archives/cloud-init-base_24.4~3+really24.3.1-0ubuntu5~ppa1_all.deb
needrestart is being skipped since dpkg has failed
34700ec
to
1c8e229
Compare
Add infrastructure to be able to express cloud-specific cloud-init binary packages. Rename cloud-init to cloud-init-base. This one will represent cloud-init plus the base dependency set. Add `Breaks:` and `Replaces:` dependency with cloud-init <= 24.4~2g2e4c39b7-0ubuntu1 to adopt and own files from cloud-init in cloud-init-base, see [1] for more context. Keep a cloud-init metapackage to install every possible dependency and be able to operate on any platform. SC-1854 US120 [1] https://www.debian.org/doc/debian-policy/ch-relationships.html#s-replaces
Add cloud-init-cloud-sigma and cloud-init-smart-os binary packages depending on cloud-init-base and python3-serial. Removes python3-serial from cloud-init-base and add it to cloud-init. Fixes SC-1854 US120
+ Add warning about image portability to dpkg-reconfigure Fixes SC-1855
1c35ec1
to
5f75b35
Compare
Thanks, @blackboxsw, for the review. This issue you were facing happened because the cloud-init version of the I have updated https://launchpad.net/~aciba/+archive/ubuntu/us-120-cloud-specific-cloud-init-packaging to contain the latest changes from this PR, feel free to use it while testing this. I have addressed the rest of the concerns and this PR is ready to be reviewed again. |
5f75b35
to
03ce0a5
Compare
Thanks @aciba90 while I'm able to install from your PPA on Oracular and receive an exit 0 from the install, we still see warnings on the console during that process about directory conflicts:
|
Thanks, @blackboxsw.
We see similar directory conflicts while upgrading to 24.2-0ubuntu1~24.04.2 (in noble-proposed) in fresh noble lxd vm:
The reason dpkg issues those warnings is that some of those folders contain some file that was not in the cloud-init deb package and dpkg tries to remove them before removing the previous version or before installing the new one. Maybe there are other ways to avoid the warnings, but the one I can think of is the following: Doing some kind of heavy lifting in the maintainer scripts to manually move the files to a temporary dir at preinst time and restoring them after the new version is installed. I believe this is more a cosmetic (dpkg being overly explicit about what is happening) issue than a real concern, and it is not worth avoiding it because:
|
You are right, I was thinking maybe we maybe missed some supplemental rm_conffile or diversion above the Breaks/Replaces to ease this transition. Given that both the old cloud-init and the new cloud-init-base deliver the same conffiles/dirs etc I'm not worried about the transition being incomplete, just wondering if there was a way to quite that noise. That said, it appears everything you are doing with Breaks/Replaces is correct for use-case #8 in https://wiki.debian.org/PackageTransition cheat sheet. So +1 from me on this changeset. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the detailed work here for Ubuntu downstream. This will help us reduce image size in some of our image offerings.
Thanks for the deep review here! |
Do not squash
See individual commits for more context and:
Additional Context
Test Steps
Merge type