Scroll to navigation

REBOOTMGRCTL(1) rebootmgrctl REBOOTMGRCTL(1)

NAME

rebootmgrctl - Tool to control and configure the reboot manager daemon.

SYNOPSIS

rebootmgrctl [--help | --version]

rebootmgrctl is-active [--quiet]

rebootmgrctl reboot [fast | now]

rebootmgrctl cancel

rebootmgrctl status [--quiet]

rebootmgrctl set-strategy best-effort | etcd-lock | maint-window | instantly | off

rebootmgrctl get-strategy

rebootmgrctl set-group group

rebootmgrctl get-group

rebootmgrctl set-window time duration

rebootmgrctl get-window

rebootmgrctl set-max [--group group] number

rebootmgrctl lock [--group group] [machine-id]

rebootmgrctl unlock [--group group] [machine-id]

DESCRIPTION

rebootmgrctl is used to query and configure the rebootmgrd(8) process. Options regarding to etcd-lock are only available if rebootmgrctl was compiled with etcd support.

OPTIONS

--help

display help text and exit

--version

output version information and exit

cancel

Cancels an already running reboot.

is-active [--quiet]

Prints if the rebootmgrd is running and active or not. With the [--quiet] option, rebootmgrctl does not print any output, but returns 0 if rebootmgrd is running or 1 if not.

reboot [fast|now]

Tells rebootmgr to schedule a reboot. With the [now] option, a forced reboot is done, no lock from etcd is requested and a set maintenance window is ignored. With the [fast] option, a lock from etcd is requested if needed, but a defined maintenance window is ignored.

status [--quiet]

Prints the current status of rebootmgrd, including current data structure stored in etcd if available. With the [--quiet] option, rebootmgrctl does not print any output, but returns the current reboot status as return value. Valid values are:

0

No reboot requested

1

Reboot requested

2

Reboot requested, waiting for maintenance window

3

Reboot requested, waiting for etcd lock.

set-strategy best-effort|etcd-lock|maint-window|instantly|off

A new strategy to reboot the machine is set and written into /etc/rebootmgr.conf.

best-effort

This is the default strategy. If etcd is running, etcd-lock is used. If no etcd is running, but a maintenance window is specified, the strategy will be maint-window. If no maintenance window is specified, the machine is immediately rebooted (instantly).

etcd-lock

A lock at etcd for the specified lock-group will be acquired before reboot. If a maintenance window is specified, the lock is only acquired during this window.

maint-window

Reboot does happen only during a specified maintenance window. If no window is specified, the instantly strategy is followed.

instantly

Other services will be informed that a reboot will happen. Reboot will be done without getting any locks or waiting for a maintenance window.

off

Reboot requests are temporary ignored. /etc/rebootmgr.conf is not modified.

get-strategy

The currently used reboot strategy of rebootmgrd will be printed.

set-window time duration

Set's the maintenance window. The format of time is the same as described in systemd.time(7). The format of duration is [XXh][YYm].

get-window

The currently set maintenance window will be printed.

set-group etcd-lock-group

Set's the group, to which this machine belongs to get a reboot lock from etcd.

get-group

The currently set lock group for etcd.

set-max [--group group] number

Set the maximal number of hosts in a group, which are allowed to reboot at the same time.

lock [--group group] [machine-id]

Lock a machine. If no group is specified, the local default group will be used. If no machine-id is specified, the local machine will be locked.

The machine-id is a network wide, unique ID. Per default the ID from /etc/machine-id is used.

unlock [--group group] [machine-id]

Unlock a machine. If no group is specified, the local default group will be used. If no machine-id is specified, the local machine will be unlocked.

SEE ALSO

systemd.time(7)

AUTHOR

Thorsten Kukuk <kukuk@suse.de>

06/30/2020 rebootmgr