mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-06 23:43:20 +02:00
confd: add support for upgrade action (rpc)
Already supported in the CLI. This makes it official, and quite handy for users that run mutable containers. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -492,6 +492,7 @@ int infix_containers_init(struct confd *confd)
|
||||
REGISTER_RPC(confd->session, CFG_XPATH "/container/start", action, NULL, &confd->sub);
|
||||
REGISTER_RPC(confd->session, CFG_XPATH "/container/stop", action, NULL, &confd->sub);
|
||||
REGISTER_RPC(confd->session, CFG_XPATH "/container/restart", action, NULL, &confd->sub);
|
||||
REGISTER_RPC(confd->session, CFG_XPATH "/container/upgrade", action, NULL, &confd->sub);
|
||||
REGISTER_RPC(confd->session, "/infix-containers:oci-load", oci_load, NULL, &confd->sub);
|
||||
|
||||
return SR_ERR_OK;
|
||||
|
||||
@@ -22,8 +22,10 @@ module infix-containers {
|
||||
prefix infix-sys;
|
||||
}
|
||||
|
||||
revision 2025-09-09 {
|
||||
description "Add dedicated 'ident' type for container and volume names.";
|
||||
revision 2025-10-12 {
|
||||
description "Two major changes:
|
||||
- Add dedicated 'ident' type for container and volume names.
|
||||
- New upgrade action (RPC) for containers with :latest image.";
|
||||
reference "internal";
|
||||
}
|
||||
|
||||
@@ -484,6 +486,18 @@ module infix-containers {
|
||||
action restart {
|
||||
description "Restart a running, or start, a stopped container.";
|
||||
}
|
||||
|
||||
action upgrade {
|
||||
description "Upgrade container to latest version of its image.
|
||||
|
||||
This action fetches the latest version of the container's image
|
||||
and recreates the container with the new image. Any named volumes
|
||||
are preserved.
|
||||
|
||||
Note: This action is primarily for containers using mutable tags
|
||||
like ':latest'. For containers using immutable tags (e.g.,
|
||||
':25.06.0'), the upgrade action will have no effect.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# -*- sh -*-
|
||||
MODULES=(
|
||||
"infix-interfaces -e containers"
|
||||
"infix-containers@2025-09-09.yang"
|
||||
"infix-containers@2025-10-12.yang"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user