Bug 2091217 - cloud-init has an undeclared dependency on the initscripts rpm
Summary: cloud-init has an undeclared dependency on the initscripts rpm
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: cloud-init
Version: CentOS Stream
Hardware: All
OS: Linux
high
low
Target Milestone: rc
: ---
Assignee: Emanuele Giuseppe Esposito
QA Contact: xiachen
URL:
Whiteboard:
Depends On:
Blocks: 2091841 2091935
TreeView+ depends on / blocked
 
Reported: 2022-05-27 21:53 UTC by Anish Bhatt
Modified: 2023-07-24 07:39 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2091841 2091935 (view as bug list)
Environment:
Last Closed: 2022-06-02 08:11:28 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-123592 0 None None None 2022-05-27 22:00:32 UTC

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


Note You need to log in before you can comment on or make changes to this bug.