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.

Bug 2091217

Summary: cloud-init has an undeclared dependency on the initscripts rpm
Product: Red Hat Enterprise Linux 9 Reporter: Anish Bhatt <anish.7>
Component: cloud-initAssignee: Emanuele Giuseppe Esposito <eesposit>
Status: CLOSED CURRENTRELEASE QA Contact: xiachen
Severity: low Docs Contact:
Priority: high    
Version: CentOS StreamCC: bstinson, eesposit, eterrell, huzhao, jgreguske, jwboyer, xiliang, yacao
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: ---Flags: pm-rhel: mirror+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2091841 2091935 (view as bug list) Environment:
Last Closed: 2022-06-02 08:11:28 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:
Bug Depends On:    
Bug Blocks: 2091841, 2091935    

Description Anish Bhatt 2022-05-27 21:53:23 UTC
Description of problem:

distros/rhel.py has no default value of init_cmd set, as a result it defaults to the global value of "service" instead of sytemctl https://github.com/canonical/cloud-init/blob/5147e8d4764e368ab8ccea7433b02e4ff9d6c901/cloudinit/distros/__init__.py#L78

The 'service' command helper is provided by the initscripts rpm, which is not called out as a dependency. As a result if cloud-init tries to restart any services, it fails out with a backtrace due the missing service command if the initscripts rpm is not installed

Version-Release number of selected component (if applicable):
cloud-init-21.1-19.el9

How reproducible:
Always

Steps to Reproduce:
1. Create an image without the initscripts rpm
2. Try to run any module that restarts a service (I used cc_set_passwords for ssh configuration)


Actual results:
Cloud-init does not succeed

Expected results:
Cloud-init should succeed always

Additional info:

Comment 1 xiachen 2022-05-31 04:13:33 UTC
This issue can be reproduced with cloud-init 21.1 and previous versions, and it has been fixed in 22.1
See upstream PR  https://github.com/canonical/cloud-init/pull/1074


@Emanuele, @Eduardo
how about creating z-stream bugs for RHEL 9.0 and all RHEL 8.* which is <= 8.6?

Comment 3 xiachen 2022-05-31 04:21:02 UTC
@Anish

Thanks for reporting this issue, we will handle it.

Comment 7 Emanuele Giuseppe Esposito 2022-06-02 08:11:28 UTC
Since the issue cannot be reproduced in rhel 9.1 (upstream patch is already present), I am closing this BZ.
Clones will handle all other releases (9.0, 8.6, 8.4, 8.2).

Thank you,
Emanuele