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

ansible-scylla-node: Allow auto-detecting nvme cards #394

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

igorribeiroduarte
Copy link
Collaborator

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.

block:
- name: Get list of NVMEs
shell: |
nvme list | awk '{print $1}' | tail -n +3
Copy link
Collaborator

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.

Copy link
Collaborator

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.

Copy link
Collaborator

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.

Copy link
Collaborator Author

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
Copy link
Contributor

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.

Copy link
Collaborator Author

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.

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.
@@ -190,6 +190,7 @@ scylla_dependencies:
- curl
- wget
- python3-yaml # this will fail on non centos systems
Copy link
Collaborator

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
Copy link
Collaborator

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?

@vladzcloudius vladzcloudius merged commit dab935f into scylladb:master Jul 22, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants