A race condition can occur during the rescheduling of a workload when a Linode is shutdown. The csi-attacher will attempt to retry the Volume attach if the error returned by ControllerPublishVolume is part of this set.
Using codes.Unavailable if the Volume is "still attached" will allow the controller to retry attaching the Volume, rather than return a fatal, final error.
A race condition can occur during the rescheduling of a workload when a Linode is shutdown. The csi-attacher will attempt to retry the Volume attach if the error returned by ControllerPublishVolume is part of this set.
Using
codes.Unavailable
if the Volume is "still attached" will allow the controller to retry attaching the Volume, rather than return a fatal, final error.