ROGER_ACTIONS
Section: User Commands (1)
Updated: November 2013
Index Return to Main Contents
roger_actions - Command-line tool to run actions in response to state events
SYNOPSIS
roger_actions [
--server HOSTNAME ] [
--port PORT ] [
--state_dir DIR ] [
--rundir DIR ] [
--puppet ] [
--config FILE ] [
--debug ]
DESCRIPTION
roger_actions is a Python command line tool to execute actions in response to state change events. Running will use data from external source - either roger directly or via puppet - to receive current state settings. The new values will be compared with "current.yaml" in the --state_dir. If there are any deltas, then any command in --rundir/[key name]/* will be executed with $1 and $2 being set to the old and new values respectively.
Prerequisites
- Must be run as root.
-
- Valid kerberos host keytab
- $ :
OPTIONS
- --help
- Print help message and exit.
- --server HOSTNAME
- Hostname of server running roger service
- --port PORT
- Port number of roger service
- --state_dir DIR
- Directory where state files will be written (current.yaml)
- --rundir DIR
- Directory root where any subdirectories matching key names of roger data will be searched for executable scripts in the event of changes.
- --puppet
- Option used when run via puppet. Rather than connect to roger, it will instead look in "puppet.yaml" in the state directory for values. This file is written by a well configured puppet client.
- --config FILE
- Config file containing data such as server, port, state and run dirs. Defaults to the value of the env var ROGERCONF or /etc/roger.conf
- --debug
- Print some extra debug messages
- An example for nologin
- $ Where rundir is /etc/roger/actions::
- A script /etc/roger/actions/appstate/nologin.sh. When the value of "appstate" changes
- $ : from "production" to "draining" nologin.sh will be executed as:
-
- nologin.sh production draining
-
BUGS
Probably. Open a support call on jira
AUTHOR
Ben Jones <
ben.dylan.jones@cernNOSPAMPLEASE.ch>
SEE ALSO
roger (1)
Index
- roger_actions - Command-line tool to run actions in response to state events
-
- SYNOPSIS
-
- DESCRIPTION
-
- OPTIONS
-
- EXAMPLE SCRIPTS
-
- BUGS
-
- AUTHOR
-
- SEE ALSO
-
--
BeJones - 18 Nov 2013
Topic revision: r1 - 2013-11-18
- BeJones