ROGER

Section: User Commands (1)
Updated: November 2013
Index Return to Main Contents


NAME

roger - Command-line tool to set alarm mask and drain state on AI machines

SYNOPSIS

roger [ --server HOSTNAME ] [ --port PORT ] [ --cert FILE --key FILE ] [ --config FILE ] [ --noexec ] [ --showurl ] [ --jfdi ] [ --help ] <subcommand>

DESCRIPTION

roger is a Python command line tool to get or set alarm mask and drain state of machines in a CERN context.

COMMAND OVERVIEW

roger show HOSTNAME(s) [ --history ] [ --help ]

roger update HOSTNAME(s) [ --all_alarms BOOL ] [ --appstate STATE ] [ --message MESSAGE ] [ --duration TIME || --remove_expires ]

A managed machine will normally have a config file defined making the top level options of server/port unnecessary, and by default kerberos is used.

Prerequisites:

Valid Kerberos5 ticket
The user invoking the script must have a valid (existent and not expired) Kerberos ticket in the file pointed by the environment variable KRB5CCNAME (should be fine if you're on aiadm).
Valid X509 Certificate
Alternatively the user invoking the script can provide a valid X509 key and certificate via options.

TOP LEVEL OPTIONS

-h, --help
Display usage and exit.
--server HOSTNAME
Provide the hostname of the roger server to connect to.
--port PORT
Provide to port number of the roger service to connect to.
--cert FILE
Provide file path for a valid X509 certificate
--key FILE
Provide file path for the key for the X509 certificate
--config FILE
Provide path for configuration file for client options. Defaults to a file specified by the ROGERCONF envfile or /etc/roger.conf.
--noexec
Do not execute commands, but display REST endpoints
--showurl
Show REST endpoints whilst executing
--jfdi
Ignore checks. Not recommended unless you know what you're doing.

SUBCOMMAND OPTIONS

show options:

HOSTNAME [...] Provide one or more hostnames to show. Will fqdn'ify shortnames as per resolv.conf resolution.

--history
Show history of previous state of the hostnames.
--help
Print subcommand help and exit.

update options

HOSTNAME [...] Provide one or more hostnames to update. Will fqdn'ify shortnames as per resolv.conf resolution.

--all_alarms true || false
Use "true" or "false" to turn on or off. Toggles alarm state, currently in foreman/LAS which is all or nothing. However the split of hw/os/nc/app will be set in the roger data store and these more fine grained controls will be available in GNI.
--appstate production || draining || quiesce
Set to "production", "draining" or "quiesce" which are current valid states. Has no effect on alarm status, but may be used to set application state.
--duration [n]d[n]h[n]min
Period for which the requested state will be active. Each [n] is an optional positive integer value, 'd' stands for days, 'h' for hours, and 'min' for minutes. Examples: '2d6h30min', '1d', '1h30', '200min'. Note: whilst alarms are set in foreman, it requires a downstream task to sync alarm state.
--remove_expires
If the current state has an expiry flag, this option will remove it, and make no other changes to state values.

EXAMPLES

show benvm03.cern.ch
$ roger show benvm03.cern.ch
show history
$ roger show benvm03.cern.ch --history
switch alarms on
$ roger update benvm03.cern.ch --all_alarms true
switch alarms off and set drain state
$ roger update benvm03.cern.ch --all_alarms false --appstate draining
set to draining state for a week
$ roger update benvm03.cern.ch --appstate draining --duration 7d
make previous temporary draining state permanent
$ roger update benvm03.cern.ch --remove_expires

BUGS

Oh, almost certainly. Open a support call on Jira (https://its.cern.ch/jira/) project "Agile Infrastructure".

AUTHOR

Ben Jones < ben.dylan.jones@cernNOSPAMPLEASE.ch>

SEE ALSO

roger_actions (1)


Index

NAME
SYNOPSIS
DESCRIPTION
COMMAND OVERVIEW
TOP LEVEL OPTIONS
SUBCOMMAND OPTIONS
EXAMPLES
BUGS
AUTHOR
SEE ALSO

-- BeJones - 18 Nov 2013

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2013-11-18 - BeJones
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback