mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-10-31 02:38:07 +08:00
Merge pull request #11300 from swordqiu/automated-cherry-pick-of-#11299-upstream-release-3.7
Automated cherry pick of #11299: fix: hpssacli should skip empty slots
This commit is contained in:
@@ -20,9 +20,8 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"yunion.io/x/log"
|
||||
"yunion.io/x/pkg/errors"
|
||||
"yunion.io/x/pkg/tristate"
|
||||
"yunion.io/x/pkg/util/stringutils"
|
||||
"yunion.io/x/pkg/utils"
|
||||
@@ -382,11 +381,18 @@ func (r *HPSARaid) parsePhyDevs(lines []string) error {
|
||||
r.adapters = append(r.adapters, adapter)
|
||||
}
|
||||
}
|
||||
var errs []error
|
||||
for _, a := range r.adapters {
|
||||
if err := a.ParsePhyDevs(); err != nil {
|
||||
return err
|
||||
err := a.ParsePhyDevs()
|
||||
if err != nil {
|
||||
log.Errorf("parse adapter %d fail: %s", a.GetIndex(), err)
|
||||
errs = append(errs, err)
|
||||
}
|
||||
}
|
||||
if len(errs) == len(r.adapters) {
|
||||
// all failed
|
||||
return errors.NewAggregate(errs)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user