Skip to content

Conversation

@rsafrono
Copy link
Collaborator

@rsafrono rsafrono commented Jan 12, 2026

When Grout was working as a systemd service (rather than starting again for each test), shutdown_test did not work as expected.

Summary by CodeRabbit

  • New Features

    • Graceful shutdown for the grout service with signal-based termination and shutdown verification
    • Systemd-aware shutdown path so grout can be managed via the service manager
    • Default tracing enabled for diagnostics on non-standard runs
  • Refactor

    • Consolidated shutdown logic in tests to use a single unified shutdown routine, simplifying cleanup and control flow

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 12, 2026

📝 Walkthrough

Walkthrough

Adds a new shutdown_grout function in smoke/_init.sh that stops grout either by sending INT to a running grout process or by using systemctl for systemd-managed grout, waits for shutdown and verifies via journalctl, and removes grcli cleanup invocations. Also adds a default branch to enable grcli trace for non-matching script names. Replaces inline shutdown logic in smoke/shutdown_test.sh with a call to shutdown_grout.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @smoke/_init.sh:
- Around line 229-230: The journalctl check is unreliable because it reads the
last 2 system-wide entries; change the check that currently uses "journalctl -n
2 | grep -q 'Deactivated successfully'" to query the grout service unit (use the
service/unit name) and increase the number of lines searched (e.g., -n 50) so
the grep reliably finds "Deactivated successfully"; keep the existing fail
invocation (fail "shutdown was not successful") but update the journalctl
invocation reference in the script to include --unit=<grout-unit-name> (or -u
<grout-unit-name>) and a larger -n value.
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3c10bc6 and 5c44cc9.

📒 Files selected for processing (2)
  • smoke/_init.sh
  • smoke/shutdown_test.sh
🧰 Additional context used
📓 Path-based instructions (1)
**/*.sh

⚙️ CodeRabbit configuration file

**/*.sh: - Don't bother about unquoted shell variables.

Files:

  • smoke/_init.sh
  • smoke/shutdown_test.sh
🧬 Code graph analysis (1)
smoke/shutdown_test.sh (1)
smoke/_init.sh (1)
  • shutdown_grout (223-234)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: build-and-tests (gcc-13, none, debugoptimized, ubuntu-24.04, -Dfrr=enabled, false)
  • GitHub Check: build-and-tests (clang-15, none, debugoptimized, ubuntu-22.04, false)
  • GitHub Check: build-and-tests (gcc-14, address, debug, ubuntu-24.04, -Dfrr=enabled, true)
  • GitHub Check: build-and-tests (clang-18, none, debugoptimized, ubuntu-24.04, false)
  • GitHub Check: build-and-tests (clang-16, none, debugoptimized, ubuntu-24.04, false)
  • GitHub Check: rpm
  • GitHub Check: deb
🔇 Additional comments (2)
smoke/shutdown_test.sh (1)

34-34: LGTM!

Clean delegation to the centralized shutdown_grout function.

smoke/_init.sh (1)

219-221: LGTM!

Correct approach to retrieve the main PID of a systemd-managed grout instance.

@rsafrono rsafrono force-pushed the fix_shutdown_test_for_service branch from 5c44cc9 to 16f48ee Compare January 12, 2026 13:44
@rsafrono rsafrono marked this pull request as draft January 26, 2026 12:18
When Grout was working as a systemd service (rather than starting
again for each test), shutdown_test did not work as expected.

Signed-off-by: Roman Safronov <rsafrono@redhat.com>
@rsafrono rsafrono force-pushed the fix_shutdown_test_for_service branch from 16f48ee to 324cdfe Compare January 26, 2026 13:03
@rsafrono rsafrono marked this pull request as ready for review January 26, 2026 13:17
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.

1 participant