-
Notifications
You must be signed in to change notification settings - Fork 949
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
refactor(yaml): Included a task to check the volume status using mayactl #2303
Conversation
Signed-off-by: sathyaseelan <sathyaseelan.n@cloudbyte.com>
Signed-off-by: sathyaseelan <sathyaseelan.n@cloudbyte.com>
Signed-off-by: sathyaseelan <sathyaseelan.n@cloudbyte.com>
- name: Get the replicas access mode | ||
shell: > | ||
source ~/.profile; | ||
kubectl exec -it {{ mayapod.stdout }} -n openebs -- mayactl volume describe --volname "{{volname.stdout_lines[2].split()[1]}}" -n {{ ns }} | grep 'RW' | wc -l |
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.
Can we not use the PV name against the volname ?
delay: 30 | ||
retries: 15 | ||
changed_when: True | ||
when: "mayactl is version('0.7.0', '>')" |
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.
👍
@@ -103,15 +103,15 @@ | |||
- name: 3) Replace storage-class in app yaml to use jiva based storage engine | |||
replace: | |||
path: "{{ result_kube_home.stdout }}/{{ percona_files.0 }}" | |||
regexp: 'openebs-jiva-default' | |||
regexp: 'openebs-standard' |
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.
Let us be sure if this is the only place needing this change.
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.
yes. Here only we need these changes
- name: Set PV name to a variable | ||
set_fact: | ||
pvname: "{{pv_name.stdout.split()[10] }}" | ||
pvname: "{{pv_name.stdout.split()[10] }}" |
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.
Can we get PV name from PVC spec itself, instead of its o/p
delay: 30 | ||
retries: 15 | ||
changed_when: True | ||
when: "mayactl is version('0.7.0', '>')" |
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.
Considering describe is used in & also the check is for > 0.7.0, is there a plan to have an alternate task for =0.7.0 (in case of runs against some patches) ? Should we have another task with older mayactl/curl command for this ?
If not, do we need a version check at all ?
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 using ansible version compare test/filter
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.
@ksatchit in the next task itself checking the condition for <= 0.7.0 version
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.
Thx !
Signed-off-by: sathyaseelan <sathyaseelan.n@cloudbyte.com>
Signed-off-by: sathyaseelan <sathyaseelan.n@cloudbyte.com>
Signed-off-by: sathyaseelan sathyaseelan.n@cloudbyte.com
@yudaykiran @kmova can you please review this PR