Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
roles: cluster_upgrade: Add progress tracking/reporting (#415)
* roles: cluster_upgrade: Add progress tracking/reporting Since cluster upgrade is a very long running process, adding progress tracking allows users and admins to easily track status. Progress tracking is done by posting well formatted events. Bug-Url: https://bugzilla.redhat.com/2040474 Signed-off-by: Scott J Dickerson <sdickers@redhat.com> * Allow `engine_correlation_id` to be optional * Remove commented out tasks * Remove option `stopped_vms` - It is not used by the cluster upgrade wizard in ovirt's admin portal. - The VMs are not stopped anywhere within the role, so this task doesn't really do anything useful. * Revert 'Remove option ' Co-authored-by: mnecas <necas.marty@gmail.com>
- Loading branch information
Showing
5 changed files
with
330 additions
and
174 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
minor_changes: | ||
- cluster_upgrade - Add progress tracking via event logs to the role (https://github.com/oVirt/ovirt-ansible-collection/pull/415) |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
- name: Get name of the original scheduling policy | ||
ovirt_scheduling_policy_info: | ||
auth: "{{ ovirt_auth }}" | ||
|
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,23 @@ | ||
--- | ||
# vars: | ||
# progress: % complete | ||
# cluster_name: (if available) what cluster is being worked on | ||
# host_name: (if avaiable) what host in the cluster is being worked on | ||
# description: what part of the process is actually done | ||
|
||
- block: | ||
- name: Log progress as an event | ||
vars: | ||
message: | ||
- "Cluster upgrade progress: {{ progress }}%" | ||
- "{{ ', Cluster: ' + cluster_name if (cluster_name is defined and cluster_name) else '' }}" | ||
- "{{ ', Host: ' + host_name if (host_name is defined and host_name) else '' }}" | ||
- " [{{ description }}]" | ||
ovirt_event: | ||
auth: "{{ ovirt_auth }}" | ||
state: present | ||
severity: normal | ||
custom_id: "{{ 2147483647 | random | int }}" | ||
origin: "cluster_upgrade" | ||
description: "{{ message | join('') }}" | ||
cluster: "{{ cluster_id | default(omit) }}" |
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
Oops, something went wrong.