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
[release-3.9] Fix version issue in openshift_facts when using custom image. #10413
Conversation
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.
This LGTM, I'm slightly concerned about creating a recursion loop but I think given it's a default in openshift_facts it should be fine as long as that role has been imported already.
@@ -866,7 +864,13 @@ def get_openshift_version(facts): | |||
image_tag = get_container_openshift_version(deployment_type) | |||
if image_tag is None: | |||
return version | |||
cli_image = image_type_dict[deployment_type] + ":" + image_tag | |||
|
|||
try: |
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.
openshift_cli_image = facts['common'].get('openshift_cli_image')
if not openshift_cli_image:
return 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.
Done, if you want to take another look.
fe54a6d
to
584927d
Compare
@patrickdillon: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
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.
/lgtm
/approve |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: michaelgugino, patrickdillon, sdodson If they are not already assigned, you can assign the PR to them by writing The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1634004
This fixes a bug where customers using internal registry mirrors and custom images would fail to have the version added to openshift facts by passing the openshift_cli_image variable to openshift_facts. The openshift_cli_image will use a custom image or the default images; before it only used the default images, which might not be available in this case with an internal registry.