Skip to content
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

Merged
merged 1 commit into from Jun 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions cluster/gce/gci/configure-helper.sh
Expand Up @@ -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"
Copy link
Member

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."

local nvmefsnum="${localdisknum}"
# Check if NVMe SSD specified.
if [ "${nvmeblocknum}" -eq "0" ] && [ "${nvmefsnum}" -eq "0" ]; then
echo "No local NVMe SSD specified."
Copy link
Contributor

Choose a reason for hiding this comment

The 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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvmeblocknum refers to how many nvme raw block local ssds were requested in NODE_LOCAL_SSDS_EXT, and nvmefsnum refers to how many nvme formatted local ssds were requested.

Copy link
Contributor

Choose a reason for hiding this comment

The 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
Expand Down