Use Kubernetes labels to store ScaleIO sdc-guid value
vladimirvivien opened this issue · comments
The current version of the ScaleIO Kubernetes volume plugin relies on the presence drv_cfg
binary being installed on ScaleIO SDC nodes for the simple reason of retrieving the machine's SDC guid
to ultimately get the instance ID. This can be an issue if the binary has been moved or installed in non-standard location.
Label Nodes with SDC GUID
This proposal is to forego the need to use the drv_cfg
binary to get the value of the SDC GUID. Instead, it relies on the Kubernetes resource labeling facility to store the SDC GUID.
The following label will be used to store the instance ID of a node:
scaleio.sdcGuid=<instance-id-value>
For instance, the following attaches the scaleio.instance_guid
label to node foo
:
kubectl label node fooNode scaleio.sdcGuid=ABCD-EFG-HIJKLMN-OPQRSTU
How it works
- Each SDC node in the cluster must be labeled with the proper (and correct) SDC GUID value.
- A badly labeled instance ID value will cause the storage operation failures on that node.
- If the node is not labeled, the code will attempt to use the
drv_cfg
binary as a best effort. - If the binary is not installed and there is no
scaleio.instance_guid
label provided, storage operations will fail.
Done!