Skip to content

Commit

Permalink
feature: remove system disk check failed
Browse files Browse the repository at this point in the history
  • Loading branch information
mowangdk committed Mar 12, 2024
1 parent 6479e99 commit e560f8a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions pkg/disk/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -1065,8 +1065,7 @@ func checkDeviceAvailable(mountinfoPath, devicePath, volumeID, targetPath string

// check the device is used for system
if devicePath == "/dev/vda" || devicePath == "/dev/vda1" {
msg := fmt.Sprintf("devicePath(%s) is system device, cannot used for Volume", devicePath)
return status.Error(codes.Internal, msg)
log.Warnf("checkDeviceAvailable: devicePath(%s) may be system device: %s", devicePath, volumeID)
}

if isDeviceMountedAt(mnts, devicePath, utils.KubeletRootDir) {
Expand Down
3 changes: 1 addition & 2 deletions pkg/ens/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -721,8 +721,7 @@ func checkDeviceAvailable(devicePath, volumeID, targetPath string) error {

// check the device is used for system
if devicePath == "/dev/vda" || devicePath == "/dev/vda1" {
err := fmt.Errorf("devicePath(%s) is system device, cannot used for Volume", devicePath)
return err
log.Warnf("checkDeviceAvailable: devicePath(%s) may be system device: %s", devicePath, volumeID)
}

checkCmd := fmt.Sprintf("mount | grep \"%s on %s type\" | wc -l", devicePath, utils.KubeletRootDir)
Expand Down

0 comments on commit e560f8a

Please sign in to comment.