Skip to content

Conversation

ppawlowski
Copy link
Contributor

Description

This pull request fixes the way Unix group related to a system account for the device agent is handled during the install and uninstall process.
During installation, we check if the group exists and add the required flag to the user creation command to join the group instead of creating it.
During removal, once the service account is removed, we double-check if the related group has been removed. If it still exists, we remove it explicitly.

How to test the fix

  1. Create a group for the default system account:
groupadd flowfuse
getent group flowfuse

The getent command should return the group name and its ID.

  1. Run the installer and install the device agent as usual - it should complete successfully
  2. Uninstall the device agent via the installer (--uninstall flag) - it should complete with success
  3. Confirm there is no flowfuse system account and related group - both commands should return nothing:
getent passwd flowfuse
getent group flowfuse

Related Issue(s)

Fixes #502

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production
  • Link to Changelog Entry PR, or note why one is not needed.

Labels

  • Includes a DB migration? -> add the area:migration label

Copy link
Contributor

@Steve-Mcl Steve-Mcl left a comment

Choose a reason for hiding this comment

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

lgtm

@Steve-Mcl Steve-Mcl merged commit 312b1c8 into main Sep 22, 2025
7 checks passed
@Steve-Mcl Steve-Mcl deleted the fix-installer-handle-unix-group branch September 22, 2025 11:11
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.

Installer: unix group created for the system account is not removed

3 participants