Skip to content

fix(agent): adding checks for session and explicit systemd requirement (#166)#191

Open
Dimfacion wants to merge 1 commit into
mainfrom
issue/166
Open

fix(agent): adding checks for session and explicit systemd requirement (#166)#191
Dimfacion wants to merge 1 commit into
mainfrom
issue/166

Conversation

@Dimfacion

@Dimfacion Dimfacion commented Jun 10, 2026

Copy link
Copy Markdown
Member

Proposed changes

  • adding checks for session and explicit systemd requirement

Testing Instructions

  1. On linux arm64, try to install the agent for all the different mode
  2. Check they are all working or explicitly explain the issue

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality
  • For bug fix -> I implemented a test that covers the bug

Copilot AI review requested due to automatic review settings June 10, 2026 15:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the Linux agent installer scripts’ handling of systemd-related prerequisites so installations fail with clearer messaging (and don’t abort silently under set -e when systemctl is-system-running returns a non-zero exit code such as degraded).

Changes:

  • Make systemctl is-system-running non-fatal under set -e by suppressing stderr and forcing success.
  • Add explicit prerequisite messaging for service/service-user modes when systemd is not in an acceptable state.
  • Add a session-user guard to ensure the systemd user manager is available before proceeding.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
installer/linux/agent-installer.sh Makes systemd state detection non-fatal and adds a prerequisite message for service installs.
installer/linux/agent-installer-session-user.sh Makes systemd state detection non-fatal and adds a check for a usable systemd user manager in the session-user flow.
installer/linux/agent-installer-service-user.sh Makes systemd state detection non-fatal and adds a prerequisite message for service-user installs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +6 to 7
systemd_status=$(systemctl is-system-running 2>/dev/null || true)

Comment thread installer/linux/agent-installer.sh Outdated
Comment on lines +6 to 7
systemd_status=$(systemctl is-system-running 2>/dev/null || true)


os=$(uname | tr '[:upper:]' '[:lower:]')
systemd_status=$(systemctl is-system-running)
systemd_status=$(systemctl is-system-running 2>/dev/null || true)
Comment thread installer/linux/agent-installer-service-user.sh Outdated
@github-actions

Copy link
Copy Markdown

Thank you for your contribution. This PR is but one step away from being ready for merging: all commits must be PGP-signed. To get started, please see https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits

@Dimfacion Dimfacion changed the title fix(agent): adding checks for session and explicit systemd requirement fix(agent): adding checks for session and explicit systemd requirement (#166) Jun 15, 2026
@Dimfacion Dimfacion force-pushed the issue/166 branch 4 times, most recently from 8600356 to 768de80 Compare June 15, 2026 07:51
Signed-off-by: Gael Leblan <gael.leblan@filigran.io>
@@ -71,6 +71,7 @@ fi

if [ "$systemd_status" != "running" ] && [ "$systemd_status" != "degraded" ]; then
echo "Systemd is in unexpected state: $systemd_status. Installation is not supported."

@savacano28 savacano28 Jun 16, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If systemd_status = true, the message is:
echo "Systemd is in unexpected state: $(true). Installation is not supported." (same comment as Copilot)

@savacano28

Copy link
Copy Markdown
Contributor

Code is OK, just a small fix related to the display message.

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.

fix: systemctl degraded for Linux agent

3 participants