Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add BaremetalHost annotation-based fencing
This commit adds one more way of fencing a compute node, using baremetal apis (metal3). It works by adding a reboot annotation, see: https://book.metal3.io/bmo/reboot_annotation.html {"annotations":{"reboot.metal3.io/iha":"{\"mode\": \"hard\"}"}} After the evacuation is completed this annotation is removed and the compute host powered back on. fencing.yaml should contain something like: FencingConfig: edpm-compute-1: agent: bmh token: <long-token> host: edpm-compute-1 The token is obtained with something like the following: kubectl create serviceaccount k8sadmin -n kube-system kubectl create clusterrolebinding k8sadmin --clusterrole=cluster-admin --serviceaccount=kube-system:k8sadmin kubectl -n kube-system describe secret $(sudo kubectl -n kube-system get secret | (grep k8sadmin || echo "$_") | awk '{print $1}') | grep token: | awk '{print $2}' Customers should create a serviceaccount that has enough rights to perform operations on the baremetalhost resources instead of using a cluster-admin.
- Loading branch information