Skip to content

Commit ee70752

Browse files
committed
Exit on connection loss
Exist when a driver closes its socket. 1. The attacher caches driver capabilities, which could (in theory) change after driver restart. 2. New driver may not come up for a while and the attacher should not act as leader during this time.
1 parent 88483a5 commit ee70752

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cmd/csi-attacher/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func main() {
105105
factory := informers.NewSharedInformerFactory(clientset, *resync)
106106
var handler controller.Handler
107107
// Connect to CSI.
108-
csiConn, err := connection.Connect(*csiAddress)
108+
csiConn, err := connection.Connect(*csiAddress, connection.OnConnectionLoss(connection.ExitOnConnectionLoss()))
109109
if err != nil {
110110
klog.Error(err.Error())
111111
os.Exit(1)

0 commit comments

Comments
 (0)