Skip to content

Commit

Permalink
controller/scanner: should consider the wwn of the added blockdevice
Browse files Browse the repository at this point in the history
    - We should also consider the wwn of the added blockdevice in
      the same round.

Signed-off-by: Vicente Cheng <vicente.cheng@suse.com>
  • Loading branch information
Vicente-Cheng committed Sep 21, 2024
1 parent 83b58dd commit c81c6f7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/controller/blockdevice/scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ func (s *Scanner) scanBlockDevicesOnNode() error {
logrus.Warnf("Skip adding duplicated WWN device %s, device path: %s", bd.Status.DeviceStatus.Details.WWN, bd.Spec.DevPath)
continue
}
existingWWNs = append(existingWWNs, bd.Status.DeviceStatus.Details.WWN)
logrus.Debugf("The current WWNs are: %v", existingWWNs)
logrus.Infof("Create new device %s with wwn: %s", bd.Name, bd.Status.DeviceStatus.Details.WWN)
if _, err := s.SaveBlockDevice(bd, autoProvisioned); err != nil && !errors.IsAlreadyExists(err) {
return err
Expand Down

0 comments on commit c81c6f7

Please sign in to comment.