Open hjensas opened 1 month ago
Hi @hjensas. Thanks for your PR.
I'm waiting for a openshift-metal3 member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test
on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test
label.
I understand the commands that are listed here.
/ok-to-test
For the agent installer I think the checks in the yaml files also need to change to check for 'true', e.g. mirror_images
is set here:
https://github.com/openshift-metal3/dev-scripts/blob/master/agent/roles/manifests/vars/main.yml#L36
And its currently being checked in multiple places like this: https://github.com/openshift-metal3/dev-scripts/blob/master/agent/roles/manifests/templates/install-config_baremetal_yaml.j2#L109
That should be changed to
{% if mirror_images == 'true' %}
For the agent installer I think the checks in the yaml files also need to change to check for 'true', e.g.
mirror_images
is set here: https://github.com/openshift-metal3/dev-scripts/blob/master/agent/roles/manifests/vars/main.yml#L36And its currently being checked in multiple places like this: https://github.com/openshift-metal3/dev-scripts/blob/master/agent/roles/manifests/templates/install-config_baremetal_yaml.j2#L109
That should be changed to
{% if mirror_images == 'true' %}
I changed it like this:
-mirror_images: "{{ lookup('env', 'MIRROR_IMAGES') != '' }}"
+mirror_images: "{{ lookup('env', 'MIRROR_IMAGES') | bool }}"
This means values true
, True
, TRUE
, 1
, yes
etc should make {% if mirror_images %}
evaluate to true
- empty string, false
, False
, FALSE
, no
, 0
etc it evaluates to false
. So no need to update the conditions? :crossed_fingers:
For the agent installer I think the checks in the yaml files also need to change to check for 'true', e.g.
mirror_images
is set here: https://github.com/openshift-metal3/dev-scripts/blob/master/agent/roles/manifests/vars/main.yml#L36 And its currently being checked in multiple places like this: https://github.com/openshift-metal3/dev-scripts/blob/master/agent/roles/manifests/templates/install-config_baremetal_yaml.j2#L109 That should be changed to{% if mirror_images == 'true' %}
I changed it like this:
-mirror_images: "{{ lookup('env', 'MIRROR_IMAGES') != '' }}" +mirror_images: "{{ lookup('env', 'MIRROR_IMAGES') | bool }}"
This means values
true
,True
,TRUE
,1
,yes
etc should make{% if mirror_images %}
evaluate totrue
- empty string,false
,False
,FALSE
,no
,0
etc it evaluates tofalse
. So no need to update the conditions? 🤞
Sounds good, thanks Harald
/lgtm
/test e2e-metal-ipi-serial-ipv4
the ipv4 job is currently fubar we're waiting for https://github.com/openshift/release/pull/53433
/test e2e-metal-ipi-serial-ipv4
https://github.com/openshift/release/pull/53433 is merged, so giving it a go.
@elfosardo - looking at logs[1] - I take the failure is not related to this change? dev-scripts install finished succesfully?
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please ask for approval from bfournie. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
I added another commit to use the ,,
to do case modification on MIRROR_IMAGES before comparing to false
- this allows the user to use False
, FALSE
etc. Nice to have when ansible is used to write the configuration.
/retest /lgtm it looks ok, just verifying failing jobs
/retest
@hjensas: The following test failed, say /retest
to rerun all failed tests or /retest-required
to rerun all mandatory failed tests:
Test name | Commit | Details | Required | Rerun command |
---|---|---|---|---|
ci/prow/e2e-metal-ipi-serial-ipv4 | bc515114beb13f7cfcf068220bdee0bafbaff163 | link | true | /test e2e-metal-ipi-serial-ipv4 |
Full PR test history. Your PR dashboard.
IPv6 forces MIRROR_IMAGES and sets disableAllDefaultSources for OperatorHub, and the pull-secret contains only an entry for the mirror. This probably makes sense for disconnected installs, but not when there is actual connectivity.
This changes the code to only set
MIRROR_IMAGES=true
when it is undefined, and all conditions onMIRROR_IMAGES
has been updated to treat the valuefalse
the same way it treatsunset
.This should allow to explicitly disable
MIRROR_IMAGES
, and thus allow deploying withIP_STACK=v6
without the image mirror.