New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add logic to check if local NVMe SSDs in node boot-up script #92258
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -364,6 +364,13 @@ function ensure-local-ssds() { | |
# The following mounts or symlinks NVMe devices | ||
get-local-disk-num "nvme" "block" | ||
local nvmeblocknum="${localdisknum}" | ||
get-local-disk-num "nvme" "fs" | ||
local nvmefsnum="${localdisknum}" | ||
# Check if NVMe SSD specified. | ||
if [ "${nvmeblocknum}" -eq "0" ] && [ "${nvmefsnum}" -eq "0" ]; then | ||
echo "No local NVMe SSD specified." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it more accurate to say here that an NVMe SSD boot disk has been detected? Because a blocknum of 0 doesn't mean there is no NVMe SSD IIUC. If the boot disk is SCSI, could there be an NVMe SSD with blocknum 0? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I see now. Thanks LGTM |
||
return | ||
fi | ||
local i=0 | ||
for ssd in /dev/nvme*; do | ||
if [ -e "${ssd}" ]; then | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding a TODO from @msau "we will have to watch out for this function when we add ephemeral local ssd support."