-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Idempotent repoquery_cmd usage #3119
Comments
The error message was something like this:
|
Good catch. I'll make sure this is included in the document @ewolinetz and I are producing. |
I also saw this error when running the 3.4 patch upgrade from v3.4.0.40. The error produced is
And when checking the oc version on the node the output is:
|
@tbielawa Do you have a card that this could be added to so we can ensure that it gets addressed? |
@mtnbikenc I just checked the board for open idempotency cards, there isn't one for this. Also, I'm not sure if this is specifically an idempotency issue so much as a general validation issue or something else buggering out. I'm going to guess that we might want to change those tasks you referenced to do some better validation - name: Check latest available OpenShift RPM version
command: >
{{ repoquery_cmd }} --qf '%{version}' "{{ openshift.common.service_type }}"
failed_when: false
changed_when: false
register: avail_openshift_version
when: not openshift.common.is_containerized | bool The subsequent verification step, when:
- not openshift.common.is_containerized | bool
- not avail_openshift_version | skipped
- avail_openshift_version.stdout | default('0.0', True) | version_compare(openshift_release, '<') I'm guessing that |
While I was testing the upgrade playbooks (#3057), I ran into a possibly idempotent issue on version checks. The first task possibly failed but returned nothing, which then caused the second task to fail because it was comparing to an empty string. Here are the tasks, and this pattern is repeated throughout the code base.
openshift-ansible/playbooks/common/openshift-cluster/upgrades/pre/verify_upgrade_targets.yml
Lines 30 to 41 in e23e9bf
Specifically, the
failed_when: false
can allow the task to complete but not actually do what is expected.This happened once during my testing so I don't have specific reproducability info or error message examples. However, this pattern in general could be improved to handle command failures.
The text was updated successfully, but these errors were encountered: