diff options
author | Luca Boccassi <luca.boccassi@microsoft.com> | 2021-02-01 15:29:40 +0100 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@microsoft.com> | 2021-02-10 20:07:36 +0100 |
commit | e26fe5f91158a0d9133e61347650dfb73aadd6bb (patch) | |
tree | 1c64821ec0b4ade12c447e1f7ea6f98664d7b592 /shell-completion | |
parent | portable: allow Detach to match images with different version suffixes (diff) | |
download | systemd-e26fe5f91158a0d9133e61347650dfb73aadd6bb.tar.xz systemd-e26fe5f91158a0d9133e61347650dfb73aadd6bb.zip |
portable: add 'reattach' verb and DBUS interface
Add 'reattach' verb to portablectl, and corresponding DBUS interface
to systemd-portabled.
Takes the same parameters as 'attach', but it will do a 'detach' (and
it will refuse to proceed if it cannot be done) first, matching on
the unversioned prefix of the new image. Eg:
portablectl reattach /tmp/foo_2.raw
will cause foo_1.raw to be detached, and foo_2.raw to be attached.
The key difference with a manual 'detach old' plus 'attach new' is that
the running units are not disturbed until after the attach completed,
and if --now is passed they are then restarted.
A 'detach' is not allowed normally if the units are running.
By using a restart-after-deploy method, 'reattach' allows for minimal
interruption of service and also for features that only work on restart
(eg: file descriptor store) to work as intended.
The DBUS interface returns two lists: first the removals from the detach
that were not immediately re-added in the attach, so that the caller
can stop the relevant units, and then the list of additions that are
either new or updates, so that the caller can restart/enable the
relevant units. portablectl already implements this with the existing
--now/--enable switches.
Diffstat (limited to 'shell-completion')
-rw-r--r-- | shell-completion/bash/portablectl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shell-completion/bash/portablectl b/shell-completion/bash/portablectl index fe3d925d78..e18d04c7ea 100644 --- a/shell-completion/bash/portablectl +++ b/shell-completion/bash/portablectl @@ -40,7 +40,7 @@ _portablectl() { local -A VERBS=( [STANDALONE]='list' - [IMAGE]='attach detach inspect is-attached set-limit' + [IMAGE]='attach detach reattach inspect is-attached set-limit' [IMAGES]='remove' [IMAGE_WITH_BOOL]='read-only' ) |