-
Notifications
You must be signed in to change notification settings - Fork 39
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
ansible-scylla-node: Allow auto-detecting nvme cards #394
Conversation
block: | ||
- name: Get list of NVMEs | ||
shell: | | ||
nvme list | awk '{print $1}' | tail -n +3 |
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.
nvme
is not installed by default. You need to install it before you can use it.
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.
On Ubuntu this is an nvme-cli
package for example.
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.
Other than that - very nice idea.
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.
I'm now installing nvme-cli
for both, Debian and RH.
block: | ||
- name: Get list of NVMEs | ||
shell: | | ||
nvme list | awk '{print $1}' | tail -n +3 |
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.
I tested on an AWS instance: it didn't have nvme-cli installed.
Perhaps lsblk is a safer option.
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.
lsblk
would show non-nvme disks as well.
I've added nvme-cli
to the list of dependencies in the role.
4f02361
to
dab72b2
Compare
This patch adds a detect_nvmes field, which when set to True will use 'nvme list' command for getting the list of nvme devices in the machine and pass all of them to scylla_raid_setup.
dab72b2
to
e2519f4
Compare
@@ -190,6 +190,7 @@ scylla_dependencies: | |||
- curl | |||
- wget | |||
- python3-yaml # this will fail on non centos systems |
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.
Unrelated to this PR: this comment is BS ;)
@@ -120,6 +120,11 @@ | |||
for i in `yum search python3|grep -i pyyaml|awk '{ print $1 }'`; do sudo yum -y install $i; done | |||
become: true | |||
|
|||
- name: install nvme-cli | |||
shell: | | |||
yum install -y nvme-cli |
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.
I wonder why we don't use scylla_dependencies
for RH too?
This patch adds a
detect_nvmes
field, which when set to True will use 'nvme list' command for getting the list of nvme devices in the machine and pass all of them to scylla_raid_setup.