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: make sure "centos" settings are identical to "rhel" #1639
Conversation
|
Not that this wouldn't help fix the problem for CentOS, but I think the problem is that we're not making the right calls in our spec file in RHEL/CentOS to ensure that the correct configuration is generated? The Fedora spec ensure the RHEL variant is used for RHEL-like systems, while it ensures the Fedora variant is used for Fedora-like ones. %py3_install -- --init-system=systemd
# Generate cloud-config file
python3 tools/render-cloudcfg --variant %{?rhel:rhel}%{!?rhel:fedora} > $RPM_BUILD_ROOT/%{_sysconfdir}/cloud/cloud.cfg |
|
As already explained in the BZ comment, the right call is performed in our spec file: |
|
That's not enough. That's only the cloud-init-generator systemd service. |
|
This is not problem of calling but problem of template. Template create cloud-user only for rhel not for centos. Template has to be fixed here. |
|
@LaneWolf @Conan-Kudo @esposem - Thanks for the discussion, and @esposem for a proposed fix. I'm looking forward to merging a fix, but I'd prefer to see consensus if possible before putting in time on a review. Give a ping if that doesn't seem likely and we'll figure it out one way or another. In the meantime thanks all for your efforts :) |
|
The issue with doing it this way is that it means every RHEL derivative needs to be filled in here too. That's why I deliberately have the cloud-init spec file in Fedora calling either the Fedora or RHEL variant for generating the templates. It gets way too complicated and ugly otherwise. |
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
|
@Conan-Kudo see if it's better now |
|
Any updates here? Do we have a path forward? |
|
From what I understand, we (redhat, me and @LaneWolf) agree on keeping it as it is. So from our side, this PR can go ahead |
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 don't see any more activity on this PR, so I'm going to wrap this up.
Since this forces alignment between CentOS and RHEL and doesn't otherwise break or change other distro definitions, I'm going to merge.
We can modify other distros if required in subsequent PRs.
Thanks again @Conan-Kudo, @esposem, and @LaneWolf :)
cloud-init was changed to make CentOS more similar to RHEL, using a cloud-user account rather than centos. canonical/cloud-init#1639
The previous change in PR canonical#1887 attempted to fix some issues created by PR's canonical#1431 and canonical#1639. Unfortunately this change wrongly assumed all derivatives were not expecting cloud-user. This attempts to correct that.
The previous change in PR canonical#1887 attempted to fix some issues created by PR's canonical#1431 and canonical#1639. Unfortunately this change wrongly assumed all derivatives were not expecting cloud-user. This attempts to correct that.
Proposed Commit Message
RHBZ: 2115565 and 2115576
Test Steps
Actual results:
Login fails with "cloud-user" and succeeds with "centos"
Expected results:
Login succeeds with "cloud-user" and fails with "centos"
Additional info:
Originally, RHEL/CentOS used "cloud-user" with the custom cloud-init configuration files. Too much configuration was removed in the rebase to cloud-init v22.1.
Checklist: