|
1 | 1 | package devicepathresolver |
2 | 2 |
|
3 | 3 | import ( |
4 | | - "path/filepath" |
5 | 4 | "sort" |
6 | 5 |
|
7 | 6 | bosherr "github.com/cloudfoundry/bosh-utils/errors" |
@@ -69,22 +68,17 @@ func (r *awsNVMeInstanceStorageResolver) DiscoverInstanceStorage(devices []boshs |
69 | 68 | continue |
70 | 69 | } |
71 | 70 |
|
72 | | - // Normalize path to use forward slashes for consistent comparison |
73 | | - // This is needed because ReadAndFollowLink may return OS-native paths |
74 | | - normalizedPath := filepath.ToSlash(absPath) |
75 | | - r.logger.Debug(r.logTag, "EBS volume: %s -> %s", symlink, normalizedPath) |
76 | | - ebsDevices[normalizedPath] = true |
| 71 | + r.logger.Debug(r.logTag, "EBS volume: %s -> %s", symlink, absPath) |
| 72 | + ebsDevices[absPath] = true |
77 | 73 | } |
78 | 74 |
|
79 | 75 | var instanceStorage []string |
80 | | - for _, device := range allNvmeDevices { |
81 | | - // Normalize device path for consistent comparison |
82 | | - normalizedDevice := filepath.ToSlash(device) |
83 | | - if !ebsDevices[normalizedDevice] { |
84 | | - instanceStorage = append(instanceStorage, device) |
85 | | - r.logger.Info(r.logTag, "Discovered instance storage: %s", device) |
| 76 | + for _, devicePath := range allNvmeDevices { |
| 77 | + if !ebsDevices[devicePath] { |
| 78 | + instanceStorage = append(instanceStorage, devicePath) |
| 79 | + r.logger.Info(r.logTag, "Discovered instance storage: %s", devicePath) |
86 | 80 | } else { |
87 | | - r.logger.Debug(r.logTag, "Excluding EBS volume: %s", device) |
| 81 | + r.logger.Debug(r.logTag, "Excluding EBS volume: %s", devicePath) |
88 | 82 | } |
89 | 83 | } |
90 | 84 |
|
|
0 commit comments