File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed
pkg/controller/sub_controller Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -345,20 +345,25 @@ func (d *DisaggregatedSubDefaultController) PersistentVolumeBuildVolumesVolumeMo
345345 pathName [cachePaths [i ]] = path_i
346346 requiredPaths = append (requiredPaths , cachePaths [i ])
347347 }
348- default :
349348
350- }
349+ //generate the last path's name, the ordinal is length of cache paths.
350+ baseIndex := len (cachePaths )
351+ for _ , path := range v1pv .MountPaths {
352+ if _ , ok := pathName [path ]; ok {
353+ //compatible before name= storage+i
354+ continue
355+ }
351356
352- for _ , path := range v1pv .MountPaths {
353- if _ , ok := pathName [path ]; ok {
354- //compatible before name= storage+i
355- continue
357+ requiredPaths = append (requiredPaths , path )
358+ pathName [path ] = BECacheStorePreName + strconv .Itoa (baseIndex )
359+ baseIndex = baseIndex + 1
356360 }
357361
358- requiredPaths = append ( requiredPaths , path )
359- pathName [ path ] = BECacheStorePreName + strconv . Itoa ( len ( requiredPaths ))
362+ default :
363+
360364 }
361365
366+
362367 var vs []corev1.Volume
363368 var vms []corev1.VolumeMount
364369 var pvcs []corev1.PersistentVolumeClaim
You can’t perform that action at this time.
0 commit comments