-
Notifications
You must be signed in to change notification settings - Fork 9
Allow detecting if the disk is a SSD or HDD #28
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
base: master
Are you sure you want to change the base?
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 |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| --- | ||
| - debug: | ||
| msg: "Checking if the disk {{ satellite_physical_disk }} is SSD" | ||
| - name: Retrieve the contents of the disk | ||
| shell: | ||
| cat "/sys/block/{{ satellite_physical_disk }}/queue/rotational | ||
|
Collaborator
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. Given a default, this would expand into "/sys/block//dev/sda/queue/rotational" and that does not seems right
Contributor
Author
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. @jhutar I am a little bit confused here on which approach to take:
|
||
| register: is_ssd | ||
| - set_fact: | ||
| ssd: true | ||
| when: "{{ is_ssd.stdout | int }}" == 0 | ||
| - set_fact: | ||
| ssd: false | ||
| when: "{{ is_ssd.stdout | int }}" == 1 | ||
| ... | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| --- | ||
| satellite_physical_disk: /dev/sda | ||
|
Collaborator
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. Can we autodetect this? In lots of cases this will be on LVM and mounted from somewhere else.
Collaborator
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. Hmm, that would be probably too hard to do it right. What about simple role which would change the values + documentation for that role + having it commented out in https://github.com/redhat-performance/satellite-tune/blob/master/ansible/postgresql.yaml by default?
Contributor
Author
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. @jhutar I agree, this will be a much better approach, leaving the control in the hand of user, if they want to run this detection feature or not.
Collaborator
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. Yep, I would just call the role postgresql-on-ssd so it would be up to user to use the role or not. No auto-detection needed IMO. |
||
| ... | ||
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.
Missing '"' at the end?