@@ -446,17 +446,17 @@ func (d *Driver) StartTask(cfg *drivers.TaskConfig) (*drivers.TaskHandle, *cstru
446
446
sanitizedName := strings .Replace (cfg .Name , "_" , "-" , - 1 )
447
447
448
448
// Mount /alloc
449
- allocVolName := fmt .Sprintf ("%s-%s-alloc" , cfg .ID , sanitizedName )
449
+ allocVolName := fmt .Sprintf ("%s-%s-alloc" , cfg .AllocID , sanitizedName )
450
450
prepareArgs = append (prepareArgs , fmt .Sprintf ("--volume=%s,kind=host,source=%s" , allocVolName , cfg .TaskDir ().SharedAllocDir ))
451
451
prepareArgs = append (prepareArgs , fmt .Sprintf ("--mount=volume=%s,target=%s" , allocVolName , "/alloc" ))
452
452
453
453
// Mount /local
454
- localVolName := fmt .Sprintf ("%s-%s-local" , cfg .ID , sanitizedName )
454
+ localVolName := fmt .Sprintf ("%s-%s-local" , cfg .AllocID , sanitizedName )
455
455
prepareArgs = append (prepareArgs , fmt .Sprintf ("--volume=%s,kind=host,source=%s" , localVolName , cfg .TaskDir ().LocalDir ))
456
456
prepareArgs = append (prepareArgs , fmt .Sprintf ("--mount=volume=%s,target=%s" , localVolName , "/local" ))
457
457
458
458
// Mount /secrets
459
- secretsVolName := fmt .Sprintf ("%s-%s-secrets" , cfg .ID , sanitizedName )
459
+ secretsVolName := fmt .Sprintf ("%s-%s-secrets" , cfg .AllocID , sanitizedName )
460
460
prepareArgs = append (prepareArgs , fmt .Sprintf ("--volume=%s,kind=host,source=%s" , secretsVolName , cfg .TaskDir ().SecretsDir ))
461
461
prepareArgs = append (prepareArgs , fmt .Sprintf ("--mount=volume=%s,target=%s" , secretsVolName , "/secrets" ))
462
462
@@ -481,7 +481,7 @@ func (d *Driver) StartTask(cfg *drivers.TaskConfig) (*drivers.TaskHandle, *cstru
481
481
} else if len (parts ) != 2 {
482
482
return nil , nil , fmt .Errorf ("invalid rkt volume: %q" , rawvol )
483
483
}
484
- volName := fmt .Sprintf ("%s-%s-%d" , cfg .ID , sanitizedName , i )
484
+ volName := fmt .Sprintf ("%s-%s-%d" , cfg .AllocID , sanitizedName , i )
485
485
prepareArgs = append (prepareArgs , fmt .Sprintf ("--volume=%s,kind=host,source=%s,readOnly=%s" , volName , parts [0 ], readOnly ))
486
486
prepareArgs = append (prepareArgs , fmt .Sprintf ("--mount=volume=%s,target=%s" , volName , parts [1 ]))
487
487
}
0 commit comments