-
Notifications
You must be signed in to change notification settings - Fork 883
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.cfg.tmpl: reorganise, minimise/reduce duplication #4272
cloud.cfg.tmpl: reorganise, minimise/reduce duplication #4272
Conversation
b6ed4d1
to
9224c5b
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.
👀
9238d80
to
25edfc5
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.
Good work here. I have a couple thoughts inline that I think we should figure out before we go any further.
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.
Bah...I had left another comment yesterday that seems to have disappeared. Sorry about that. It was the main thing I was wondering about so I recreated it here.
25edfc5
to
7c5c84b
Compare
I made some more changes including tidying up multiple blank lines, making YAML indentation uniform. I used I notice that render-cloudcfg does not permit some distros as valid parameters though. Should "dragonfly", "cos", and the various Suse variations be valid options for that script? |
BTW I happened to notice that for variant "amazon" there is no module enabled in cloud_config_modules section for (RPM) packages, e.g yum_add_repo. This is not something I've broken, I checked the rendered version of the existing cloud.cfg.tmpl and it is the same situation. I assume therefore that AWS must be modifying or replacing the cloud.cfg when they package cloud-init for AWS Linux. |
This is looking really good. Thanks @dermotbradley
Let's add dragonfly as that is specifically called out in the template, but I think we can leave the others. I left a few small nits inline. Beyond that: For Alpine, I noticed a few non-trivial changes. I'm assuming those are intentional? In particular, For Debian, I don't think the added renderers/activators are correct. Bookworm cloud images are shipping with netplan and systemd-networkd by default. I would expect a list similar to Ubuntu. |
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 left a few small nits inline
Here's the inline comments.
Ok, I'll do that.
Yes these are intentional.
I wasn't sure what these should be and so assumed only 'eni' (for older Debian releases) and 'networkd' as newer releases seemed to use that. Didn't realise Debian used/supported netplan. I'll change this as you indicated. |
7c5c84b
to
380d67a
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.
LGTM!
Final thing is this branch needs a rebase. There's a conflict (I believe due to openeuler changing case).
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.
👍
Simplify the cloud.cfg.tmpl file. There is a lot of duplication (e.g. the same sudo rule specified multiple times). This also addresses canonical#4267 and aligns Debian-specific template configuration with Debian's own packaged cloud.cfg, located here: https://salsa.debian.org/cloud-team/cloud-init/-/blob/master/debian/cloud.cfg Use uniform YAML indentation. Modify jinja template to avoid duplicate blank lines.
380d67a
to
30ee1d6
Compare
Done. |
Thanks! |
Proposed Commit Message
Additional Context
Test Steps
Checklist: