Skip to content
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

Check for systemd (in distros/rhel.py) is fragile #2557

Open
ubuntu-server-builder opened this issue May 10, 2023 · 2 comments
Open

Check for systemd (in distros/rhel.py) is fragile #2557

ubuntu-server-builder opened this issue May 10, 2023 · 2 comments
Labels
bug Something isn't working correctly launchpad Migrated from Launchpad

Comments

@ubuntu-server-builder
Copy link
Collaborator

This bug was originally filed in Launchpad as LP: #1461201

Launchpad details
affected_projects = []
assignee = None
assignee_name = None
date_closed = None
date_created = 2015-06-02T18:10:04.507759+00:00
date_fix_committed = None
date_fix_released = None
id = 1461201
importance = low
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1461201
milestone = None
owner = larsks
owner_name = Lars Kellogg-Stedman
private = False
status = confirmed
submitter = larsks
submitter_name = Lars Kellogg-Stedman
tags = []
duplicates = []

Launchpad user Lars Kellogg-Stedman(larsks) wrote on 2015-06-02T18:10:04.507759+00:00

The existing cloud-init code determines if systemd is in use by looking at the distribution name and version. This is prone to error because:

  • RHEL derivatives other than CentOS (e.g., Scientific Linux) will fail this test, and
  • Distributions that are not derived from RHEL also use systemd
@ubuntu-server-builder ubuntu-server-builder added bug Something isn't working correctly launchpad Migrated from Launchpad labels May 10, 2023
@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Lars Kellogg-Stedman(larsks) wrote on 2015-06-02T18:11:05.214429+00:00

The attached patch uses the same semantics as systemd's "sd_booted()" method to determine if systemd was used to boot the system. This should work independent of distribution or version, making it a much more robust mechanism for detecting if systemd is in use.
Launchpad attachments: 0001-detect-systemd-using-sd_booted-semantics.patch

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Lars Kellogg-Stedman(larsks) wrote on 2015-06-02T20:31:13.440681+00:00

Proposed via launchpad as https://code.launchpad.net/~larsks/cloud-init/fix-systemd-detection/+merge/260885

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly launchpad Migrated from Launchpad
Projects
None yet
Development

No branches or pull requests

1 participant