2017-06-20 18:56:24 +00:00
|
|
|
nodeattrib(8) -- List or change confluent nodes attributes
|
2017-02-28 18:27:22 +00:00
|
|
|
=========================================================
|
|
|
|
|
|
|
|
## SYNOPSIS
|
|
|
|
|
2018-07-09 20:52:07 +00:00
|
|
|
`nodeattrib [-b] <noderange> [all|<nodeattribute>...]`
|
2017-06-20 18:56:24 +00:00
|
|
|
`nodeattrib <noderange> [<nodeattribute1=value1> <nodeattribute2=value2> ...]`
|
|
|
|
`nodeattrib -c <noderange> <nodeattribute1> <nodeattribute2> ...`
|
2018-02-22 14:55:46 +00:00
|
|
|
`nodeattrib -e <noderange> <nodeattribute1> <nodeattribute2> ...`
|
2018-09-04 13:56:51 +00:00
|
|
|
`nodeattrib -p <noderange> <nodeattribute1> <nodeattribute2> ...`
|
2017-02-28 18:27:22 +00:00
|
|
|
|
|
|
|
## DESCRIPTION
|
|
|
|
|
2017-06-20 18:56:24 +00:00
|
|
|
**nodeattrib** manages the attributes of confluent nodes. In
|
2017-02-28 18:27:22 +00:00
|
|
|
the simplest form, it simply takes the given noderange(5) and lists the
|
|
|
|
matching nodes, one line at a time.
|
|
|
|
|
|
|
|
If a list of node attribute names are given, the value of those are also
|
|
|
|
displayed. If `-b` is specified, it will also display information on
|
2017-06-20 18:56:24 +00:00
|
|
|
how inherited and expression based attributes are defined. Attributes can be
|
|
|
|
straightforward values, or an expression as documented in nodeattribexpressions(5).
|
|
|
|
For a full list of attributes, run `nodeattrib <node> all` against a node.
|
2018-07-13 13:50:08 +00:00
|
|
|
If `-c` is specified, this will set the nodeattribute to a null value.
|
2017-02-28 18:27:22 +00:00
|
|
|
This is different from setting the value to an empty string.
|
|
|
|
|
2019-03-28 15:12:36 +00:00
|
|
|
Attributes may be specified by wildcard, for example `net.*switch` will report
|
|
|
|
all attributes that begin with `net.` and end with `switch`.
|
|
|
|
|
2018-07-13 13:57:23 +00:00
|
|
|
If the word all is specified, then all available attributes are given.
|
|
|
|
Omitting any attribute name or the word 'all' will display only attributes
|
|
|
|
that are currently set.
|
|
|
|
|
2018-02-09 00:30:06 +00:00
|
|
|
For the `groups` attribute, it is possible to add a group by doing
|
2018-07-11 20:48:41 +00:00
|
|
|
`groups,=<newgroup>` and to remove by doing `groups^=<oldgroup>`
|
2018-02-09 00:30:06 +00:00
|
|
|
|
2017-06-20 18:56:24 +00:00
|
|
|
Note that `nodeattrib <group>` will likely not provide the expected behavior.
|
2021-11-09 13:26:35 +00:00
|
|
|
See nodegroupattrib(8) command on how to manage attributes on a group level. Running
|
|
|
|
nodeattrib on a group will simply set node-specific attributes on each individual
|
|
|
|
member of the group.
|
|
|
|
|
|
|
|
Additionally, if wanting to change from a node level attribute value to inherit from a
|
|
|
|
member group, it is required to use '-c' to clear the attribute. Conversely, assigning
|
|
|
|
to a blank value will allow masking a group defined attribute with an empty value.
|
2017-06-20 18:56:24 +00:00
|
|
|
|
2017-02-28 18:27:22 +00:00
|
|
|
## OPTIONS
|
|
|
|
|
|
|
|
* `-b`, `--blame`:
|
|
|
|
Annotate inherited and expression based attributes to show their base value.
|
2021-03-04 16:45:29 +00:00
|
|
|
|
2017-02-28 18:27:22 +00:00
|
|
|
* `-c`, `--clear`:
|
2021-03-04 16:45:29 +00:00
|
|
|
Clear specified nodeattributes.
|
|
|
|
|
2018-02-22 14:55:46 +00:00
|
|
|
* `-e`, `--environment`:
|
2021-03-04 16:45:29 +00:00
|
|
|
Set specified attributes based on exported environment variable of matching name.
|
|
|
|
Environment variable names may be lower case or all upper case.
|
|
|
|
Replace . with _ as needed (e.g. info.note may be specified as either $info_note or $INFO_NOTE
|
|
|
|
|
2018-09-04 13:56:51 +00:00
|
|
|
* `-p`, `--prompt`:
|
2021-03-04 16:45:29 +00:00
|
|
|
Request interactive prompting to provide values rather than the command line
|
|
|
|
or environment variables.
|
|
|
|
|
2021-03-19 14:50:59 +00:00
|
|
|
* `-m MAXNODES`, `--maxnodes=MAXNODES`:
|
2021-03-04 16:45:29 +00:00
|
|
|
Prompt if trying to set attributes on more than
|
|
|
|
specified number of nodes.
|
2017-02-28 18:27:22 +00:00
|
|
|
|
2021-03-19 14:50:59 +00:00
|
|
|
* `-h`, `--help`:
|
|
|
|
Show help message and exit
|
|
|
|
|
2017-02-28 18:27:22 +00:00
|
|
|
## EXAMPLES
|
|
|
|
* Listing matching nodes of a simple noderange:
|
2017-06-20 18:56:24 +00:00
|
|
|
`# nodeattrib n1-n2`
|
|
|
|
`n1: console.method: ipmi`
|
|
|
|
`n1: hardwaremanagement.manager: 172.30.3.1`
|
|
|
|
`n2: console.method: ipmi`
|
|
|
|
`n2: hardwaremanagement.manager: 172.30.3.2`
|
2017-02-28 18:27:22 +00:00
|
|
|
|
|
|
|
* Getting an attribute of nodes matching a noderange:
|
2017-06-20 18:56:24 +00:00
|
|
|
`# nodeattrib n1,n2 hardwaremanagement.manager`
|
|
|
|
`n1: hardwaremanagement.manager: 172.30.3.1`
|
|
|
|
`n2: hardwaremanagement.manager: 172.30.3.2`
|
2017-02-28 18:27:22 +00:00
|
|
|
|
|
|
|
* Getting a group of attributes while determining what group defines them:
|
2017-06-20 18:56:24 +00:00
|
|
|
`# nodeattrib n1,n2 hardwaremanagement --blame`
|
|
|
|
`n1: hardwaremanagement.manager: 172.30.3.1`
|
|
|
|
`n1: hardwaremanagement.method: ipmi (inherited from group everything)`
|
|
|
|
`n1: hardwaremanagement.switch: r8e1`
|
|
|
|
`n1: hardwaremanagement.switchport: 14`
|
|
|
|
`n2: hardwaremanagement.manager: 172.30.3.2`
|
|
|
|
`n2: hardwaremanagement.method: ipmi (inherited from group everything)`
|
|
|
|
`n2: hardwaremanagement.switch: r8e1`
|
|
|
|
`n2: hardwaremanagement.switchport: 2`
|
|
|
|
|
|
|
|
* Listing matching nodes of a simple noderange that are set:
|
|
|
|
`# nodeattrib n1-n2 current`
|
|
|
|
`n1: console.method: ipmi`
|
|
|
|
`n1: hardwaremanagement.manager: 172.30.3.1`
|
|
|
|
`n2: console.method: ipmi`
|
|
|
|
`n2: hardwaremanagement.manager: 172.30.3.2`
|
|
|
|
|
|
|
|
* Change attribute on nodes of a simple noderange:
|
|
|
|
`# nodeattrib n1-n2 console.method=serial`
|
|
|
|
`n1: console.method: serial`
|
|
|
|
`n1: hardwaremanagement.manager: 172.30.3.1`
|
|
|
|
`n2: console.method: serial`
|
|
|
|
`n2: hardwaremanagement.manager: 172.30.3.2`
|
|
|
|
|
|
|
|
* Clear attribute on nodes of a simple noderange, if you want to retain the variable set the attribute to "":
|
|
|
|
`# nodeattrib n1-n2 -c console.method`
|
|
|
|
`# nodeattrib n1-n2 console.method`
|
|
|
|
`n1: console.method: `
|
|
|
|
`n2: console.method: `
|
|
|
|
|
2019-03-28 15:12:36 +00:00
|
|
|
* List all switches that a node is described as connected to:
|
|
|
|
`# nodeattrib d1 net.*switch`
|
|
|
|
`d1: net.mgt.switch: mgtswitch1`
|
|
|
|
`d1: net.pxe.switch: pxeswitch1`
|
|
|
|
`d1: net.switch:`
|
|
|
|
|
2017-06-20 18:56:24 +00:00
|
|
|
## SEE ALSO
|
|
|
|
|
|
|
|
nodegroupattrib(8), nodeattribexpressions(5)
|
2020-04-02 15:00:45 +00:00
|
|
|
|
|
|
|
## ATTRIBUTES
|