wrappers for running commands on nodes based on roles
Real-world example from ticket 1646: Instance 708db215-
Why?
[root@fuel-pm ~]# for i in {1..9};do echo -n "compute-0$i ";ssh compute-0$i "grep -R [5]8004b /var/log"; done
...one command loop, and I got a list of errors related to that instance, and was able to inform the customer regarding the matter.
Had the compute nodes not been named nicely, compute-01 .. compute-0N, I would not have been able to do that.
Nothing forces end-users deploying clouds with fuel to name their nodes so as to accommodate this need, so the goal of this blueprint is to generalize the above idea and have fuel generate wrapper scripts or otherwise accommodate this need.
The script/scripts would allow an admin to run commands (via ssh) on...
* all controllers
* all compute nodes
* all ceph nodes
* ...etc.
Potential examples:
# onnodes --role=controller 'uname -s'
node-17:
Linux
Node-42:
Linux
Node-99:
Linux
#
# onnodes --role=compute 'ps ax|grep virsh|wc -l'
node-01:
4
node-09:
7
node-32:
9
#
The above shows one "onnodes" script which would query as needed to find the list of Ip addresses to ssh to.
Alternatively fuel could write out new scripts whenever the deployments change the nodes - generating files for example:
oncontrollers.sh
oncompute.sh
onceph.sh
etc.
...any questions please don't hesitate to contact me. -paul
Blueprint information
- Status:
- Not started
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- PaulReiber
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- New
- Series goal:
- Accepted for future
- Implementation:
-
Not started
- Milestone target:
-
next
- Started by
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
This could be done as a part of existing mco tool:
dockerctl shell astute
mco rpc -v execute_
But the filters based on node roles are wellcome