Bug 2115576

Summary: cloud-init configures user "centos" or "rhel" instead of "cloud-user" with cloud-init-22.1
Product: Red Hat Enterprise Linux 8 Reporter: Neal Gompa <ngompa13>
Component: cloud-initAssignee: Emanuele Giuseppe Esposito <eesposit>
Status: CLOSED ERRATA QA Contact: xiachen
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.7CC: brandon.johnson, bstinson, daltonminer, davdunc, davide, davidmccheyne, eesposit, eterrell, huzhao, jgreguske, jwboyer, michel, virt-bugs, virt-maint, xiachen, xiliang, yacao
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cloud-init-22.1-6.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2115565 Environment:
Last Closed: 2023-05-16 08:27:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Neal Gompa 2022-08-04 23:24:16 UTC
+++ This bug was initially created as a clone of Bug #2115565 +++

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.el8

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.

Comment 1 xiachen 2022-08-08 02:00:59 UTC
@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 2 Emanuele Giuseppe Esposito 2022-08-08 07:52:33 UTC
Thanks Amy, you're right. We need to adjust the config file. PR: https://github.com/canonical/cloud-init/pull/1639

Changing also BZ version to 8.7

Comment 13 errata-xmlrpc 2023-05-16 08:27:02 UTC
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:2777