Skip to content

Move away from sysvinit scripts to systemd#20

Merged
viniciusferrao merged 1 commit into
masterfrom
fix/systemd-xcatd
May 5, 2026
Merged

Move away from sysvinit scripts to systemd#20
viniciusferrao merged 1 commit into
masterfrom
fix/systemd-xcatd

Conversation

@viniciusferrao

@viniciusferrao viniciusferrao commented May 2, 2026

Copy link
Copy Markdown
Member

Summary

  • Use a native systemd xcatd.service start/stop path instead of delegating to the SysV init script.
  • Keep SysV fallback support for non-systemd boots and old releases while dropping the EL7+ runtime dependency on initscripts/chkconfig.
  • Make Debian maintainer scripts use systemd only when systemd is actually booted.
  • Align Debian first-install initialization with the RPM path by using xcatconfig -i.
  • Keep generated DEBs readable by old supported Ubuntu releases and avoid perl:any dependencies there.
  • Update the xcatd autotest service commands to dispatch through systemd when available.

Fixes xcat2#7343.

Validation

  • git diff --check
  • Shell syntax checks for changed maintainer/init scripts with sh -n and bash -n
  • Linux shell syntax checks for changed maintainer/init scripts with sh -n and bash -n
  • Verified RPM and DEB first-install paths both use xcatconfig -i
  • Ubuntu maintainer-script harness: first install calls xcatconfig -i; upgrade calls xcatconfig -u -V
  • perl -c xCAT-test/xcattest
  • prove -v xCAT-test/unit/el10_netboot_dhcp_client.t
  • prove -v xCAT-test/unit/el10_biosboot_partition.t
  • RPM spec parse for EL6, EL7, EL8, EL9, and EL10 across xCAT-server, xCAT, perl-xCAT, and xCAT-genesis-scripts
  • RPM lifecycle validation on CentOS 7, Rocky 8, Rocky 9, and Rocky 10: install/update service artifacts, verify no ExecReload, start/restart/stop/start, package remove stops/disables, reinstall/start, lsxcatd -a
  • DEB rebuild validation for perl-xcat, xcat-client, xcat-server, and xcat with gzip compression and plain perl dependencies
  • DEB lifecycle validation on Ubuntu 14.04, 16.04, 18.04, 20.04, 22.04, 24.04, and 26.04: package metadata readable, install/reinstall, service status/restart/stop/start, package remove stops/disables, reinstall/start, lsxcatd -a

Notes

  • Ubuntu 14.04 uses the SysV path; Ubuntu 16.04 and newer use the systemd path.
  • Newer Ubuntu systemd-analyze verify emitted unrelated host unit warnings; no xcatd.service errors were reported.

@viniciusferrao viniciusferrao changed the title Modernize xcatd service packaging Move away from sysvinit scripts to systemd May 2, 2026
@viniciusferrao viniciusferrao force-pushed the fix/systemd-xcatd branch 6 times, most recently from 7b963b2 to 5eec111 Compare May 4, 2026 15:35
@viniciusferrao viniciusferrao marked this pull request as ready for review May 4, 2026 21:00
@viniciusferrao viniciusferrao merged commit a51a4d7 into master May 5, 2026
1 check passed
@viniciusferrao viniciusferrao deleted the fix/systemd-xcatd branch May 5, 2026 01:51
dhilst added a commit that referenced this pull request Jun 1, 2026
…mkvm -f

CI build #20 (AlmaLinux 10.1, libvirt-libs 11.10.0) failed the setup_vm
test: `mkvm xcat01-cn -s 50G -f` aborted with

  Sys::Virt::StorageVol::delete(vol, flags) at .../kvm.pm line 316

In create_storage's force/recreate path, line 316 called `$_->delete()`
on an existing volume WITHOUT first calling `get_info()`. On the newer
Sys::Virt binding shipped on EL10 this transiently throws, so the VM was
never recreated; the service node xcat01-sn never installed, producing
452 "No route to host" errors and ~91 cascading test failures
(xdsh_*, xdcp_*, updatenode_*, restapi_*).

This is the same failure mode already worked around at line ~1889 with
the Issue xcat2#455 precedent:

  # Need to call get_info() before deleting a volume ... Issue xcat2#455
  $vol->get_info();
  $vol->delete();

Fix line 316 to mirror that precedent: refresh volume metadata with
get_info() before delete(), wrap in eval, and on failure refresh the
pool and retry once before dying with a clear message. Add the same
get_info() guard to the other volume-delete sites in the chvm
add-cleanup / purge paths and the clonevm rebase path for consistency.

Validated with `perl -c` (full parse clean via stubbed deps; the only
load-time errors are missing runtime xCAT modules, unrelated to the
edit). No kvm unit tests exist in xCAT-test/unit.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/etc/init.d/xcatd missing the right path for RH9 (xCAT 2.16.5)

1 participant