mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-11-05 15:31:49 +08:00
Automatic merge from release/2.6.0 -> release/2.7.0
* commit '4eb314ab5ea31d04b11e9dda35aa20d9afd5da3c': disable host reset iptables fix delete disk panic
This commit is contained in:
@@ -1395,7 +1395,8 @@ func (self *SDisk) PerformPurge(ctx context.Context, userCred mcclient.TokenCred
|
||||
}
|
||||
|
||||
func (self *SDisk) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error {
|
||||
if self.GetCloudprovider().Provider == CLOUD_PROVIDER_HUAWEI && self.GetSnapshotCount() > 0 {
|
||||
provider := self.GetCloudprovider()
|
||||
if provider != nil && provider.Provider == CLOUD_PROVIDER_HUAWEI && self.GetSnapshotCount() > 0 {
|
||||
return httperrors.NewForbiddenError("not allow to delete. Virtual disk must not have snapshots")
|
||||
}
|
||||
|
||||
|
||||
@@ -228,10 +228,10 @@ func (h *SHostInfo) prepareEnv() error {
|
||||
return err
|
||||
}
|
||||
|
||||
err = h.resetIptables()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// err = h.resetIptables()
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
|
||||
if options.HostOptions.EnableKsm {
|
||||
h.EnableKsm(900)
|
||||
|
||||
Reference in New Issue
Block a user