Skip to content

Conversation

jasonrayne
Copy link
Contributor

The playbook was failing when attempting to restart OpenStack services because of an invalid escaped character in the command that lists and restarts services. The original implementation used a shorthand systemctl flag (-a) along with a regular expression for egrep, which led to improper parsing and execution issues during the playbook run.

This PR replaces the shorthand with a more explicit invocation that is confirmed to run without error:

  • Uses "systemctl list-units --type=service --all --no-legend --plain" to reliably list service units.
  • Adds the "-r" flag to xargs to avoid running systemctl restart without input, ensuring more predictable behavior.

Note: This bug may be specific to hosts running Ubuntu Jammy

…art command

The playbook was failing when attempting to restart OpenStack services
because of an invalid escaped character in the command that lists and
restarts services. The original implementation used a shorthand
systemctl flag (-a) along with a regular expression for egrep, which led
to improper parsing and execution issues during the playbook run.

This commit replaces the shorthand with a more explicit invocation that
is confirmed to run without error:
- Uses "systemctl list-units --type=service --all --no-legend --plain"
to reliably list service units.
- Adds the "-r" flag to xargs to avoid running systemctl restart without
input, ensuring more predictable behavior.

Note: This bug may be specific to hosts running Ubuntu Jammy
@jasonrayne jasonrayne requested a review from a team as a code owner April 16, 2025 00:22
@product-auto-label product-auto-label bot added size: xs ansible Ansible playbooks labels Apr 16, 2025
@Alex-Welsh Alex-Welsh merged commit 8f31676 into stackhpc:stackhpc/2024.1 Apr 16, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ansible Ansible playbooks size: xs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants