This script helps to clean up vmss nodes that may have Azure disks attached to it that should not be due to bugs in Kubernetes. The specific case for this is that a disk has been re-attached to by Kubernetes when it should not have been.
This DOES NOT detect a bad node/disk, only assists in cleaning it up.
$ ./vmssfix.sh NODE_NAME PV_NAME
This will trigger a detach of the pvc from the vmss instance in Azure. It will not perform any destructive action without user confirmation.