This repository has been archived by the owner on Jun 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add use_maintenance_policy parameter
This patch add new use_maintenance_policy parameter to handle if the cluster policy should be switched to cluster_maintenance during upgrade or if the policy should be unchanged. Change-Id: I0ec567283282575d0e90bd00a96de5172db0dde9 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1539761 Signed-off-by: Ondra Machacek <[email protected]>
- Loading branch information
1 parent
42386f6
commit 948ecd8
Showing
3 changed files
with
36 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
- name: Get cluster facts | ||
ovirt_clusters_facts: | ||
auth: "{{ ovirt_auth }}" | ||
pattern: "name={{ cluster_name }}" | ||
check_mode: "no" | ||
|
||
- name: Get name of the original scheduling policy | ||
ovirt_scheduling_policies_facts: | ||
auth: "{{ ovirt_auth }}" | ||
id: "{{ ovirt_clusters[0].scheduling_policy.id }}" | ||
check_mode: "no" | ||
|
||
- name: Remember the cluster scheduling policy | ||
set_fact: | ||
cluster_scheduling_policy: "{{ ovirt_scheduling_policies[0].name }}" | ||
|
||
- name: Get API facts | ||
# TODO: Change when Ansible 2.5 is released: | ||
# ovirt_api_facts: | ||
ovirt_api_facts_internal_25: | ||
auth: "{{ ovirt_auth }}" | ||
check_mode: "no" | ||
|
||
- name: Set in cluster upgrade policy | ||
ovirt_clusters: | ||
auth: "{{ ovirt_auth }}" | ||
name: "{{ cluster_name }}" | ||
scheduling_policy: cluster_maintenance | ||
register: cluster_policy | ||
when: | ||
- (ovirt_api.product_info.version.major >= 4 and ovirt_api.product_info.version.major >= 2) or | ||
(ovirt_api.product_info.version.major == 4 and ovirt_api.product_info.version.major == 1 and ovirt_api.product_info.version.revision >= 4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters