Skip to content

Commit

Permalink
scanner: add more logs
Browse files Browse the repository at this point in the history
    We encounter some weird issue that the ID is changed after reboot.
    Add these logs would help us to verify easily.

Signed-off-by: Vicente Cheng <[email protected]>
  • Loading branch information
Vicente-Cheng committed May 9, 2024
1 parent 7ee8a4e commit 448526d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/controller/blockdevice/scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ func (s *Scanner) collectAllDevices() []*deviceWithAutoProvision {
logrus.Infof("Skip adding non-identifiable block device /dev/%s", disk.Name)
continue
}
logrus.Infof("Adding the disk with block device /dev/%s, id(Name): %s on node %s", disk.Name, bd.Name, s.NodeName)
logrus.Infof("Some disk details like below:")
logrus.Infof(" - wwn: %v", bd.Status.DeviceStatus.Details.WWN)
logrus.Infof(" - vendor: %v", bd.Status.DeviceStatus.Details.Vendor)
logrus.Infof(" - model: %v", bd.Status.DeviceStatus.Details.Model)
logrus.Infof(" - SerialNumber: %v", bd.Status.DeviceStatus.Details.SerialNumber)
autoProv := s.ApplyAutoProvisionFiltersForDisk(disk)
allDevices = append(allDevices, &deviceWithAutoProvision{bd: bd, AutoProvisioned: autoProv})

Expand Down Expand Up @@ -133,9 +139,11 @@ func (s *Scanner) scanBlockDevicesOnNode() error {
}

oldBds, existingWWNs := convertBlockDeviceListToMap(oldBdList)
logrus.Debugf("The current BdList: %+v", oldBds)
for _, device := range allDevices {
bd := device.bd
autoProvisioned := device.AutoProvisioned
logrus.Debugf("Processing block device %s with wwn: %s", bd.Name, bd.Status.DeviceStatus.Details.WWN)
if oldBd, ok := oldBds[bd.Name]; ok {
if isDevPathChanged(oldBd, bd) {
logrus.Debugf("Enqueue block device %s for device path change", bd.Name)
Expand Down

0 comments on commit 448526d

Please sign in to comment.