mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-19 02:37:24 +08:00
fix(host): avoid delete removed disk failed
This commit is contained in:
@@ -29,6 +29,7 @@ import (
|
||||
|
||||
api "yunion.io/x/onecloud/pkg/apis/compute"
|
||||
"yunion.io/x/onecloud/pkg/appctx"
|
||||
"yunion.io/x/onecloud/pkg/cloudprovider"
|
||||
"yunion.io/x/onecloud/pkg/hostman/hostutils"
|
||||
"yunion.io/x/onecloud/pkg/hostman/options"
|
||||
"yunion.io/x/onecloud/pkg/hostman/storageman/remotefile"
|
||||
@@ -85,11 +86,12 @@ func (d *SLocalDisk) Probe() error {
|
||||
if fileutils2.Exists(d.getPath()) {
|
||||
d.isAlter = false
|
||||
return nil
|
||||
} else if fileutils2.Exists(d.getAlterPath()) {
|
||||
}
|
||||
if fileutils2.Exists(d.getAlterPath()) {
|
||||
d.isAlter = true
|
||||
return nil
|
||||
}
|
||||
return fmt.Errorf("Disk not found")
|
||||
return errors.Wrapf(cloudprovider.ErrNotFound, "%s", d.getPath())
|
||||
}
|
||||
|
||||
func (d *SLocalDisk) UmountFuseImage() {
|
||||
|
||||
Reference in New Issue
Block a user