Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
With the upgrade to cloud-init 22.1, CentOS/RHEL images have reverted back to "branded" users for the cloud-init user rather than the generic "cloud-user" that was being used before.
This change breaks automation and makes things particularly difficult for consumers to leverage RHEL/CentOS images.
Version-Release number of selected component (if applicable):
22.1-4.el9
How reproducible:
Always
Steps to Reproduce:
1. Boot the latest CentOS Stream cloud image
2. Attempt to log in with the "cloud-user"
3. Attempt to log in with the "centos" user
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.
@Eduardo @Emanuele,
In the patch "Align rhel custom files with upstream (#1431)", rhel and centos are treated differently, could you help to check it please? Should they use same configuration?
{% if variant in ["almalinux", "alpine", "amazon", "centos", "cloudlinux", "eurolinux",
"fedora", "miraclelinux", "openEuler", "rhel", "rocky", "virtuozzo"] %}
{% if variant == "rhel" %}
...
Comment 2Emanuele Giuseppe Esposito
2022-08-08 07:49:08 UTC
To put it more clearly, the Fedora spec does this:
```
%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
```
The RHEL spec does this:
```
%py3_install --
%if 0%{?fedora}
python3 tools/render-cloudcfg --variant fedora > $RPM_BUILD_ROOT/%{_sysconfdir}/cloud/cloud.cfg
%endif
```
It's pretty obvious the latter is wrong.
Comment 5Emanuele Giuseppe Esposito
2022-08-08 08:21:23 UTC
Not really an expert on whatever the template language is, but {if 0} suggests me that this is not used.
Indeed we have below:
```
python3 tools/render-cloudcfg --variant rhel systemd/cloud-init-generator.tmpl > $RPM_BUILD_ROOT%{_systemdgeneratordir}/cloud-init-generator
```
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (cloud-init bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2023:2183