Skip to content

Commit 0934130

Browse files
authored
Merge pull request #35 from MaterializeInc/more-flexibility-for-gcp-disk-ids
Fix bug when identifying non NVME labeled disks
2 parents 8a307eb + 715dd88 commit 0934130

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ephemeral-storage-setup"
3-
version = "0.3.2"
3+
version = "0.3.3"
44
edition = "2024"
55
rust-version = "1.88.0"
66
resolver = "2"

src/detect.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,12 @@ impl DiskDetector {
170170
// filter to local SSDs. We don't only use `find`
171171
// because the devices might have partitions or other
172172
// children we need to filter out.
173-
let find_paths = self.find("/dev/disk/by-id", "google-local-nvme-ssd-*");
173+
// All local disks will take the form of google-local-*.
174+
// We'll make the assumption that the machine has homogeneous
175+
// disk setup, and that the disks the user configured or are
176+
// provided by the machine are NVME or equivilently fast.
177+
let find_paths = [self.find("/dev/disk/by-id", "google-local-*")].concat();
178+
174179
self.lsblk()
175180
.paths()
176181
.filter(|path| find_paths.contains(path))

0 commit comments

Comments
 (0)