Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FreezerState to UnitStatus #23

Merged
merged 1 commit into from
Oct 23, 2024
Merged

Conversation

mbssrc
Copy link
Collaborator

@mbssrc mbssrc commented Oct 23, 2024

Description

Adding indicator for frozen (pause) units.

  • add field 'FreezerState' to UnitStatus as returned by givc agent
  • returns 'error' if it could not be retrieved

Checklist

  • Summary of the proposed changes in the PR description
  • More detailed description in the commit message(s)
  • Commits are squashed into relevant entities - avoid a lot of minimal dev time commits in the PR
  • Contribution guidelines followed
  • Test procedure added to nixos/tests
  • Author has run nix flake check --accept-flake-config and it passes
  • All automatic Github Action checks pass - see actions
  • Author has added reviewers and removed PR draft status

Testing

[ghaf@gui-vm:~]$ grpcurl -plaintext -d '{"UnitName":"[email protected]"}' chromium-vm:9000 systemd.UnitControlService.FreezeUnit
{
  "CmdStatus": "Command successful"
}

[ghaf@gui-vm:~]$ grpcurl -plaintext -d '{"UnitName":"[email protected]"}' chromium-vm:9000 systemd.UnitControlService.GetUnitStatus
{
  "CmdStatus": "Command successful",
  "UnitStatus": {
    "Name": "[email protected]",
    "Description": "Application service for chromium",
    "LoadState": "loaded",
    "ActiveState": "active",
    "SubState": "running",
    "Path": "/org/freedesktop/systemd1/unit/chromium_400_2eservice",
    "FreezerState": "frozen"
  }
}

[ghaf@gui-vm:~]$ grpcurl -plaintext -d '{"UnitName":"[email protected]"}' chromium-vm:9000 systemd.UnitControlService.UnfreezeUnit
{
  "CmdStatus": "Command successful"
}

[ghaf@gui-vm:~]$ grpcurl -plaintext -d '{"UnitName":"[email protected]"}' chromium-vm:9000 systemd.UnitControlService.GetUnitStatus
{
  "CmdStatus": "Command successful",
  "UnitStatus": {
    "Name": "[email protected]",
    "Description": "Application service for chromium",
    "LoadState": "loaded",
    "ActiveState": "active",
    "SubState": "running",
    "Path": "/org/freedesktop/systemd1/unit/chromium_400_2eservice",
    "FreezerState": "running"
  }
}

- add field 'FreezerState' to UnitStatus as returned by givc agent
- returns 'error' if it could not be retrieved

Signed-off-by: Manuel Bluhm <[email protected]>
@mbssrc mbssrc merged commit 8734e9b into tiiuae:main Oct 23, 2024
2 checks passed
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