CLI Utilities

hades-agent

Run the celery command configured for Hades.

All arguments except -c/--config and -A/--app are passed to the Celery celery as is. You may not provide the -A/--app argument.

usage: hades-agent [-h] [-c CONFIG] [-v] [-q] [-V] [--syslog [SOCKET]]
                   [--pid-file PID_FILE]
                   [worker options]

Named Arguments

-c, --config

Path to config file

-v, --verbose

Be more verbose (use up to 4) times

Default: 1

-q, --quiet

Be quiet (ERROR and higher will still be logged)

-V, --version

show program's version number, configure options, copyright notice and exit

--syslog

Log to syslog instead of stderr. CRITICAL messages will still be logged on stderr too. A path to the log socket may be provided, defaults to /dev/log otherwise.

--pid-file

Default: "/usr/local/var/run/hades/agent/agent.pid"

hades-check-database

usage: hades-check-database [-h] [-c CONFIG] [-v] [-q] [-V]
                            [--syslog [SOCKET]]

Named Arguments

-c, --config

Path to config file

-v, --verbose

Be more verbose (use up to 4) times

Default: 1

-q, --quiet

Be quiet (ERROR and higher will still be logged)

-V, --version

show program's version number, configure options, copyright notice and exit

--syslog

Log to syslog instead of stderr. CRITICAL messages will still be logged on stderr too. A path to the log socket may be provided, defaults to /dev/log otherwise.

hades-deputy

Provides a DBus API to perform privileged operations

usage: hades-deputy [-h] [-c CONFIG] [-v] [-q] [-V] [--syslog [SOCKET]]

Named Arguments

-c, --config

Path to config file

-v, --verbose

Be more verbose (use up to 4) times

Default: 1

-q, --quiet

Be quiet (ERROR and higher will still be logged)

-V, --version

show program's version number, configure options, copyright notice and exit

--syslog

Log to syslog instead of stderr. CRITICAL messages will still be logged on stderr too. A path to the log socket may be provided, defaults to /dev/log otherwise.

hades-dhcp-script-standalone

Warning

Please don't use this script in production, as it interferes with the (synced) lease state of the DHCP server. In production, this script is not used, but instead the hades-lease-server.

dnsmasq leasefile dhcp-script to store leases in the Hades database

usage: hades-dhcp-script-standalone [-h] [-c CONFIG] [-v] [-q] [-V]
                                    [--syslog [SOCKET]]
                                    COMMAND ...

Positional Arguments

COMMAND

Possible choices: init, no-op, add, del, old

Named Arguments

-c, --config

Path to config file

-v, --verbose

Be more verbose (use up to 4) times

Default: 1

-q, --quiet

Be quiet (ERROR and higher will still be logged)

-V, --version

show program's version number, configure options, copyright notice and exit

--syslog

Log to syslog instead of stderr. CRITICAL messages will still be logged on stderr too. A path to the log socket may be provided, defaults to /dev/log otherwise.

Sub-commands

init

Print all leases in dnsmasq leasefile format

hades-dhcp-script-standalone init [-h]

no-op

==SUPPRESS==

hades-dhcp-script-standalone no-op [-h]

add

Add a lease

hades-dhcp-script-standalone add [-h] mac ip [hostname]
Positional Arguments
mac

MAC address

ip

IP address

hostname

Hostname

del

Delete a lease

hades-dhcp-script-standalone del [-h] mac ip [hostname]
Positional Arguments
mac

MAC address

ip

IP address

hostname

Hostname

old

Update a lease

hades-dhcp-script-standalone old [-h] mac ip [hostname]
Positional Arguments
mac

MAC address

ip

IP address

hostname

Hostname

hades-export-options

Export options as shell variables

usage: hades-export-options [-h] [-c CONFIG] [-v] [-q] [-V]
                            [--syslog [SOCKET]]
                            [--format {systemd,posix,bash,ksh,zsh}]
                            [FILE]

Positional Arguments

FILE

Output destination (default: stdout)

Default: -

Named Arguments

-c, --config

Path to config file

-v, --verbose

Be more verbose (use up to 4) times

Default: 1

-q, --quiet

Be quiet (ERROR and higher will still be logged)

-V, --version

show program's version number, configure options, copyright notice and exit

--syslog

Log to syslog instead of stderr. CRITICAL messages will still be logged on stderr too. A path to the log socket may be provided, defaults to /dev/log otherwise.

--format

Possible choices: systemd, posix, bash, ksh, zsh

Export format.

Default: "systemd"

Python sequence and mapping types will only be exported, if the destination format support it

hades-generate-config

usage: hades-generate-config [-h] [-c CONFIG] [-v] [-q] [-V]
                             [--syslog [SOCKET]] [-m MODE] [-g GROUP | GID]
                             SOURCE [DESTINATION]

Positional Arguments

SOURCE

Template file name or template directory name

DESTINATION

Destination file or directory (default is stdout for files; required for directories)

Named Arguments

-c, --config

Path to config file

-v, --verbose

Be more verbose (use up to 4) times

Default: 1

-q, --quiet

Be quiet (ERROR and higher will still be logged)

-V, --version

show program's version number, configure options, copyright notice and exit

--syslog

Log to syslog instead of stderr. CRITICAL messages will still be logged on stderr too. A path to the log socket may be provided, defaults to /dev/log otherwise.

-m, --mode

The mode of created files and directories. Only read, write, setgid, and sticky bits are respected. Files are never executable or setuid. Directories are always executable if they are readable and optionally have setgid and sticky bits set.

Default: 488

-g, --group

The group of created files and directories.

hades-lease-server

Listens for commands as output by hades-dhcp-script.

usage: hades-lease-server [-h] [-c CONFIG] [-v] [-q] [-V] [--syslog [SOCKET]]
                          [--socket [SOCKET]] (--auth | --unauth)

Named Arguments

-c, --config

Path to config file

-v, --verbose

Be more verbose (use up to 4) times

Default: 1

-q, --quiet

Be quiet (ERROR and higher will still be logged)

-V, --version

show program's version number, configure options, copyright notice and exit

--syslog

Log to syslog instead of stderr. CRITICAL messages will still be logged on stderr too. A path to the log socket may be provided, defaults to /dev/log otherwise.

--socket

Socket to listen on. Default: /usr/local/var/run/hades/auth-dhcp/script.sock

Default: "/usr/local/var/run/hades/auth-dhcp/script.sock"

--auth

Default: False

--unauth

Default: True

This server listens on a socket for commands communicating lease events. For detailed information about the functionality see hades-dhcp-script --help. It is the server component for what could have been a single python program, however because of performance reasons, it was necessary to circumvent the need for a complete python interpreter startup every time such a notification happens.

hades-portal

Does not take arguments.

hades-vrrp-notify

Hades keepalived VRRP notify script.

This script is called by keepalived, if a VRRP instance's state changes.

usage: hades-vrrp-notify [-h] [-c CONFIG] [-v] [-q] [-V] [--syslog [SOCKET]]
                         {GROUP,INSTANCE} {hades-auth,hades-root,hades-unauth}
                         {MASTER,BACKUP,FAULT} priority

Positional Arguments

type

Possible choices: GROUP, INSTANCE

Type indication

name

Possible choices: hades-auth, hades-root, hades-unauth

The name of the group or instance

state

Possible choices: MASTER, BACKUP, FAULT

The state it's transitioning to

priority

The priority value

Named Arguments

-c, --config

Path to config file

-v, --verbose

Be more verbose (use up to 4) times

Default: 1

-q, --quiet

Be quiet (ERROR and higher will still be logged)

-V, --version

show program's version number, configure options, copyright notice and exit

--syslog

Log to syslog instead of stderr. CRITICAL messages will still be logged on stderr too. A path to the log socket may be provided, defaults to /dev/log otherwise.