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

Fail if the cachedisk does not exist #50

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions roles/backend_setup/tasks/cache_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
# Extend the existing volume group with the SSD (assuming SSD is used for
# caching)

# Fail if the cache disk is not present
- name: Check if the cachedisk exists, else fail
Copy link
Member

Choose a reason for hiding this comment

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

can we move all such validations to a pre-checks dir? And execute the pre-checks in the main.yml?

Copy link
Member Author

Choose a reason for hiding this comment

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

We can do that, is there a possibility that RHHI would be installed without cache? If so we have to maintain the cachedisk check separate and call only when user calls for setting up cache.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, it's possible as cache setup is optional

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it's possible as cache setup is optional

@sabose I'm sorry I missed this. So, if cache is optional, we need not move it to main.yml and call this every time irrespective of whether user wants to setup cache or not. Over here it gets validated only if user tries to setup cache.

stat:
path: "{{ item.cachedisk }}"
register: result
failed_when: not result.stat.exists
with_items: "{{ gluster_infra_cache_vars }}"

- name: Extend volume group
lvg:
state: present
Expand Down