Repository navigation
feat: support thin-edge.io service commands for containers - #245
Merged
Merged
Conversation
reubenmiller
temporarily deployed
to
Test Auto
October 20, 2026 11:35 — with
GitHub Actions
Inactive
reubenmiller
temporarily deployed
to
Test Auto
October 20, 2026 11:35 — with
GitHub Actions
Inactive
reubenmiller
temporarily deployed
to
Test Auto
October 20, 2026 11:35 — with
GitHub Actions
Inactive
reubenmiller
temporarily deployed
to
Test Auto
October 20, 2026 11:35 — with
GitHub Actions
Inactive
reubenmiller
temporarily deployed
to
Test Auto
October 20, 2026 11:35 — with
GitHub Actions
Inactive
reubenmiller
temporarily deployed
to
Test Auto
October 20, 2026 11:35 — with
GitHub Actions
Inactive
reubenmiller
temporarily deployed
to
Test Auto
October 20, 2026 11:35 — with
GitHub Actions
Inactive
reubenmiller
temporarily deployed
to
Test Auto
October 20, 2026 11:35 — with
GitHub Actions
Inactive
reubenmiller
temporarily deployed
to
Test Auto
October 20, 2026 11:35 — with
GitHub Actions
Inactive
reubenmiller
temporarily deployed
to
Test Auto
October 20, 2026 11:35 — with
GitHub Actions
Inactive
Robot Results
|
reubenmiller
force-pushed
the
feat/service-plugin-actions
branch
2 times, most recently
from
November 4, 2026 02:20
11b285f to
947e7aa
Compare
reubenmiller
had a problem deploying
to
Test Auto
November 4, 2026 02:27 — with
GitHub Actions
Failure
reubenmiller
had a problem deploying
to
Test Auto
November 4, 2026 02:27 — with
GitHub Actions
Failure
reubenmiller
had a problem deploying
to
Test Auto
November 4, 2026 02:27 — with
GitHub Actions
Failure
reubenmiller
had a problem deploying
to
Test Auto
November 4, 2026 02:27 — with
GitHub Actions
Failure
reubenmiller
had a problem deploying
to
Test Auto
November 4, 2026 02:27 — with
GitHub Actions
Failure
reubenmiller
had a problem deploying
to
Test Auto
November 4, 2026 02:27 — with
GitHub Actions
Failure
reubenmiller
had a problem deploying
to
Test Auto
November 4, 2026 02:27 — with
GitHub Actions
Failure
reubenmiller
had a problem deploying
to
Test Auto
November 4, 2026 02:27 — with
GitHub Actions
Failure
reubenmiller
had a problem deploying
to
Test Auto
November 4, 2026 02:27 — with
GitHub Actions
Failure
reubenmiller
had a problem deploying
to
Test Auto
November 4, 2026 02:27 — with
GitHub Actions
Failure
Add the container and container-group service plugins (https://thin-edge.github.io/thin-edge.io/next/references/service-plugin-api/) so that containers can be started, stopped and restarted via the Cumulocity service commands, using the service command workflow shipped by tedge-agent. * tedge-container service-plugins container|container-group <action> <name>, installed as /usr/share/tedge/service-plugins/{container,container-group} (root:root, 0755). Supports start, stop, restart, pause and unpause, and exits 2 for unsupported actions * the daemon declares the start, stop and restart actions (cmd/<action>) on each registered container service, once per process, only when thin-edge.io supports service plugins (service_commands.enabled = "auto") * no actions are declared on (and the plugins refuse to act on) the container hosting thin-edge.io * container-group services are looked up by their exact compose project/service labels, including stopped containers (also used by the container-group log plugin) Co-Authored-By: Claude Opus 5.5 <[email protected]>
reubenmiller
force-pushed
the
feat/service-plugin-actions
branch
from
November 4, 2026 05:00
947e7aa to
8e7c410
Compare
reubenmiller
temporarily deployed
to
Test Auto
November 4, 2026 05:01 — with
GitHub Actions
Inactive
reubenmiller
temporarily deployed
to
Test Auto
November 4, 2026 05:01 — with
GitHub Actions
Inactive
reubenmiller
temporarily deployed
to
Test Auto
November 4, 2026 05:01 — with
GitHub Actions
Inactive
reubenmiller
temporarily deployed
to
Test Auto
November 4, 2026 05:01 — with
GitHub Actions
Inactive
reubenmiller
temporarily deployed
to
Test Auto
November 4, 2026 05:01 — with
GitHub Actions
Inactive
reubenmiller
temporarily deployed
to
Test Auto
November 4, 2026 05:01 — with
GitHub Actions
Inactive
reubenmiller
temporarily deployed
to
Test Auto
November 4, 2026 05:01 — with
GitHub Actions
Inactive
reubenmiller
temporarily deployed
to
Test Auto
November 4, 2026 05:01 — with
GitHub Actions
Inactive
reubenmiller
temporarily deployed
to
Test Auto
November 4, 2026 05:01 — with
GitHub Actions
Inactive
reubenmiller
temporarily deployed
to
Test Auto
November 4, 2026 05:01 — with
GitHub Actions
Inactive
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for the thin-edge.io service commands. Container and container-group services can now be started, stopped and restarted from the Commands tab of the service in Cumulocity, using the workflow that tedge-agent ships.
This requires thin-edge.io > 2.0.1, which is currently only the
mainchannel. Older versions behave exactly as before.Changes
tedge-container service-plugins container|container-group <action> <name>, which implements the Service Plugin API./usr/share/tedge/service-plugins/{container,container-group},root:root, mode0755.start,stop,restart,pause,unpause.2for an unsupported action,1for a failure, with the reason on stderr.te/<service>/cmd/<action>capabilities forstart,stopandrestarton each container service.[service_commands]section:enabled = "auto" | true | false, andactions. In"auto", actions are declared only whentedge config get service.plugin_pathssucceeds and the plugin is installed.pauseandunpauseare not declared, as tedge-agent ships no workflow for them. The README shows how to add the workflow and declare them manually.LookupGroupServicematches the exact compose project and service labels, and includes stopped containers. The previous lookup used a container-name substring match and only covered running containers.openspec/changes/archive/2026-10-20-add-service-plugin-actions/.Testing
go test ./...,go vetandgolangci-lintall pass.tests/service-commands.robot. Its tests are skipped when the device's thin-edge.io lacks service plugin support (<= 2.0.1).debian-14-docker-28(tedge2.0.2~425) with a Cumulocity tenant. All 6 tests passed, though not all in one run. In the final full run, the container-group test failed during its nginx install because the local Docker VM was out of memory and the kernel killed tedge-agent. That happened before any service command ran, and the test passed when rerun.c8y_SupportedServiceCommands;RESTART/STOP/STARTviac8y_ServiceCommandfor a container and for a container-group service; plugin exit codes;pause/unpauseviatedge service; capabilities cleared when a container is removed;enabled=false.goreleasersnapshot build: confirmed the plugin files and their modes in the deb, rpm and apk packages.Known limitations
Self(), which can match the wrong container when containers usenetwork_mode: host.🤖 Generated with Claude Code