Skip to content

Conversation

@wking
Copy link
Contributor

@wking wking commented Jan 7, 2022

The previous configuration created entries which included the full repository path within the registry. The installer creates ImageContentSourcePolicies from the install-config entries, and they end up in the cluster like:

$ curl -s https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/origin-ci-test/logs/openshift-kubernetes-1087-nightly-4.10-e2e-metal-ipi-upgrade-ovn-ipv6/1479101028317007872/artifacts/e2e-metal-ipi-upgrade-ovn-ipv6/gather-must-gather/artifacts/must-gather.tar | tar xOz quay-io-openshift-release-dev-ocp-v4-0-art-dev-sha256-6da7281285800ef1fca3ae4da6fad9f321ff757145212b74c94c4fe08fc3f055/cluster-scoped-resources/operator.openshift.io/imagecontentsourcepolicies/image-policy-0.yaml
---
apiVersion: operator.openshift.io/v1alpha1
kind: ImageContentSourcePolicy
metadata:
  creationTimestamp: "2022-01-06T15:52:21Z"
  generation: 1
  name: image-policy-0
  resourceVersion: "1567"
  uid: eb48e7b9-5768-42d9-b7a1-9bcec6800197
spec:
  repositoryDigestMirrors:
  - mirrors:
    - virthost.ostest.test.metalkube.org:5000/localimages/local-release-image
    source: registry.build01.ci.openshift.org/ci-op-1yt550tk/release

That repository path causes trouble when the referenced images use a different repository, like:

$ curl -s https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/origin-ci-test/logs/openshift-kubernetes-1087-nightly-4.10-e2e-metal-ipi-upgrade-ovn-ipv6/1479101028317007872/artifacts/e2e-metal-ipi-upgrade-ovn-ipv6/gather-extra/artifacts/pods.json | jq -r '.items[] | select(.metadata.namespace == "openshift-etcd-operator").status.containerStatuses[].state'
{
  "waiting": {
    "message": "Back-off pulling image \"registry.build01.ci.openshift.org/ci-op-1yt550tk/stable@sha256:b39240d76f42457511234d22b7d1dad72fe7917e7b55a25f520b41fd9dbbea53\"",
    "reason": "ImagePullBackOff"
  }
}

Compare ci-op-1yt550tk/stable with the ImageContentSourcePolicy's ci-op-1yt550tk/release.

With this commit, we'll move to having entries like:

source: registry.build01.ci.openshift.org

From the OpenShift docs:

  source: registry.redhat.io/openshift4 [3]
  ...
  [3]: You can configure a namespace inside a registry to use any
    image in that namespace. If you use a registry domain as a source,
    the ImageContentSourcePolicy resource is applied to all
    repositories from the registry.

The %% business is POSIX parameter expansion:

  ${parameter%%[word]}
    Remove Largest Suffix Pattern. The word shall be expanded to
    produce a pattern. The parameter expansion shall then result in
    parameter, with the largest portion of the suffix matched by the
    pattern deleted.

stripping the first slash in the pullspec and everything after it.

@openshift-ci openshift-ci bot requested review from cybertron and flaper87 January 7, 2022 23:32
@openshift-ci
Copy link

openshift-ci bot commented Jan 7, 2022

Hi @wking. 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.

Details

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.

@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jan 7, 2022
@wking wking force-pushed the registry-scoped-imageContentSources branch 2 times, most recently from 2df9eb4 to 2a1e3c4 Compare January 7, 2022 23:41
@wking
Copy link
Contributor Author

wking commented Jan 7, 2022

I don't know how to test this, since apparently no presubmits in this repo (if there were, we probably would have caught this issue sooner), but here's a tiny proof-of-concept to exercise some of code I'm adding:

$ cat test.sh 
#!/bin/bash

function pullspec_registry {
    PULLSPEC="${1}"
    echo "${PULLSPEC%%/*}"  # strip everything after the first slash                                                                                                                                                                                                                                                        
}

TAGGED=quay.io/openshift-release-dev/ocp-v4.0-art-dev
RELEASE=registry.build01.ci.openshift.org/ci-op-1yt550tk/release
CANONICAL_REGISTRIES="$(printf "%s\n%s\n" "${RELEASE}" "${TAGGED}" | while read PULLSPEC; do pullspec_registry "${PULLSPEC}"; done | sort | uniq)"
echo imageContentSources:
echo "${CANONICAL_REGISTRIES}" | while read REGISTRY; do
  printf -- "- mirrors:\n  - %s:\n  source: %s\n" "${LOCAL_REGISTRY_DNS_NAME}:${LOCAL_REGISTRY_PORT}/localimages/local-release-image" "${REGISTRY}"
done
$ ./test.sh
imageContentSources:
- mirrors:
  - :/localimages/local-release-image:
  source: quay.io
- mirrors:
  - :/localimages/local-release-image:
  source: registry.build01.ci.openshift.org

The previous configuration created entries which included the full
repository path within the registry.  The installer creates
ImageContentSourcePolicies from the install-config entries, and they
end up in the cluster like [1]:

  $ curl -s https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/origin-ci-test/logs/openshift-kubernetes-1087-nightly-4.10-e2e-metal-ipi-upgrade-ovn-ipv6/1479101028317007872/artifacts/e2e-metal-ipi-upgrade-ovn-ipv6/gather-must-gather/artifacts/must-gather.tar | tar xOz quay-io-openshift-release-dev-ocp-v4-0-art-dev-sha256-6da7281285800ef1fca3ae4da6fad9f321ff757145212b74c94c4fe08fc3f055/cluster-scoped-resources/operator.openshift.io/imagecontentsourcepolicies/image-policy-0.yaml
  ---
  apiVersion: operator.openshift.io/v1alpha1
  kind: ImageContentSourcePolicy
  metadata:
    creationTimestamp: "2022-01-06T15:52:21Z"
    generation: 1
    name: image-policy-0
    resourceVersion: "1567"
    uid: eb48e7b9-5768-42d9-b7a1-9bcec6800197
  spec:
    repositoryDigestMirrors:
    - mirrors:
      - virthost.ostest.test.metalkube.org:5000/localimages/local-release-image
      source: registry.build01.ci.openshift.org/ci-op-1yt550tk/release

That repository path causes trouble when the referenced images use a
different repository, like:

  $ curl -s https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/origin-ci-test/logs/openshift-kubernetes-1087-nightly-4.10-e2e-metal-ipi-upgrade-ovn-ipv6/1479101028317007872/artifacts/e2e-metal-ipi-upgrade-ovn-ipv6/gather-extra/artifacts/pods.json | jq -r '.items[] | select(.metadata.namespace == "openshift-etcd-operator").status.containerStatuses[].state'
  {
    "waiting": {
      "message": "Back-off pulling image \"registry.build01.ci.openshift.org/ci-op-1yt550tk/stable@sha256:b39240d76f42457511234d22b7d1dad72fe7917e7b55a25f520b41fd9dbbea53\"",
      "reason": "ImagePullBackOff"
    }
  }

Compare ci-op-1yt550tk/stable with the ImageContentSourcePolicy's
ci-op-1yt550tk/release.

With this commit, we'll move to having entries like:

  source: registry.build01.ci.openshift.org

From [2]:

  source: registry.redhat.io/openshift4 [3]
  ...
  [3]: You can configure a namespace inside a registry to use any
    image in that namespace. If you use a registry domain as a source,
    the ImageContentSourcePolicy resource is applied to all
    repositories from the registry.

The %% business is POSIX parameter expansion [3]:

  ${parameter%%[word]}
    Remove Largest Suffix Pattern. The word shall be expanded to
    produce a pattern. The parameter expansion shall then result in
    parameter, with the largest portion of the suffix matched by the
    pattern deleted.

stripping the first slash in the pullspec and everything after it.

[1]: https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/openshift-kubernetes-1087-nightly-4.10-e2e-metal-ipi-upgrade-ovn-ipv6/1479101028317007872#1:build-log.txt%3A54
[2]: https://docs.openshift.com/container-platform/4.9/openshift_images/image-configuration.html#images-configuration-registry-mirror_image-configuration
[3]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02
@wking wking force-pushed the registry-scoped-imageContentSources branch from 2a1e3c4 to 4c8b1cf Compare January 7, 2022 23:49
@cybertron
Copy link
Contributor

/ok-to-test

@openshift-ci openshift-ci bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 7, 2022
@cybertron
Copy link
Contributor

Hmm, the upgrade job doesn't run here though. We should probably get that added anyway.

/cc @ardaguclu @andfasano @derekhiggins

@wking
Copy link
Contributor Author

wking commented Jan 8, 2022

No update jobs, but the CI that runs is green except for e2e-metal-ipi-serial-ovn-ipv6, which failed with:

: [sig-imageregistry][Serial][Suite:openshift/registry/serial] Image signature workflow can push a signed image to openshift registry and verify it [Suite:openshift/conformance/serial] | 5m7s
-- | --
fail [github.com/openshift/origin/test/extended/images/signatures.go:34]: Unexpected error:
     <*errors.errorString \| 0xc0007da0a0>: {
              s: "timed out while waiting of an image stream tag e2e-test-registry-signing-2vsmb/signer:latest",
     }
     timed out while waiting of an image stream tag e2e-test-registry-signing-2vsmb/signer:latest occurred

: [sig-network-edge][Feature:Idling] Unidling should handle many TCP connections by possibly dropping those over a certain bound [Serial] [Suite:openshift/conformance/serial] | 43s
-- | --
fail [github.com/openshift/origin/test/extended/idling/idling.go:346]: Expected
     <int>: 0
  to be >=
     <int>: 16

All of which seems unrelated to my change.

@ardaguclu
Copy link
Contributor

/test e2e-metal-ipi-upgrade

@ardaguclu
Copy link
Contributor

ardaguclu commented Jan 10, 2022

Thanks for the PR @wking.

e2e-metal-ipi-ovn-ipv6 has no problem in any place.
e2e-metal-ipi-upgrade-ovn-ipv6 passes in periodics and fails in all presubmit runs(it also failed in my own unrelated PRs).

I wonder the problem you mentioned in this PR is actually in mirroring release that will be upgraded to; https://github.com/openshift/release/blob/4e105dca61a0a7dc4f0cec55bae692b752cd4c4c/ci-operator/step-registry/baremetalds/e2e/test/baremetalds-e2e-test-commands.sh#L48.

I've added ovn upgrade job in dev-scripts repo and whenever it is merged, we'll have a chance to test your PR.

and one last question: this repo is used for all versions and do you think there won't be problem for <4.10 versions?

@ardaguclu
Copy link
Contributor

/test e2e-metal-ipi-serial-ovn-ipv6
/test e2e-metal-ipi-upgrade-ovn-ipv6

@ardaguclu
Copy link
Contributor

/test e2e-metal-ipi-upgrade-ovn-ipv6

@openshift-ci
Copy link

openshift-ci bot commented Jan 10, 2022

@ardaguclu: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test e2e-metal-ipi
  • /test e2e-metal-ipi-ovn-ipv6
  • /test e2e-metal-ipi-serial-ipv4
  • /test e2e-metal-ipi-serial-ovn-ipv6
  • /test images

The following commands are available to trigger optional jobs:

  • /test e2e-metal-ipi-ovn-dualstack
  • /test e2e-metal-ipi-upgrade
  • /test e2e-metal-ipi-virtualmedia

Use /test all to run the following jobs that were automatically triggered:

  • pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi
  • pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi-ovn-dualstack
  • pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi-ovn-ipv6
  • pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi-serial-ipv4
  • pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi-serial-ovn-ipv6
  • pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi-virtualmedia
  • pull-ci-openshift-metal3-dev-scripts-master-images
Details

In response to this:

/test e2e-metal-ipi-upgrade-ovn-ipv6

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.

@ardaguclu
Copy link
Contributor

/test e2e-metal-ipi-upgrade-ovn-ipv6

1 similar comment
@ardaguclu
Copy link
Contributor

/test e2e-metal-ipi-upgrade-ovn-ipv6

@openshift-ci
Copy link

openshift-ci bot commented Jan 10, 2022

@ardaguclu: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test e2e-metal-ipi
  • /test e2e-metal-ipi-ovn-ipv6
  • /test e2e-metal-ipi-serial-ipv4
  • /test e2e-metal-ipi-serial-ovn-ipv6
  • /test images

The following commands are available to trigger optional jobs:

  • /test e2e-metal-ipi-ovn-dualstack
  • /test e2e-metal-ipi-upgrade
  • /test e2e-metal-ipi-virtualmedia

Use /test all to run the following jobs that were automatically triggered:

  • pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi
  • pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi-ovn-dualstack
  • pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi-ovn-ipv6
  • pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi-serial-ipv4
  • pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi-serial-ovn-ipv6
  • pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi-virtualmedia
  • pull-ci-openshift-metal3-dev-scripts-master-images
Details

In response to this:

/test e2e-metal-ipi-upgrade-ovn-ipv6

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.

@ardaguclu
Copy link
Contributor

/test e2e-metal-ipi-upgrade-ovn-ipv6

@openshift-ci
Copy link

openshift-ci bot commented Jan 10, 2022

@ardaguclu: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test e2e-metal-ipi
  • /test e2e-metal-ipi-ovn-ipv6
  • /test e2e-metal-ipi-serial-ipv4
  • /test e2e-metal-ipi-serial-ovn-ipv6
  • /test images

The following commands are available to trigger optional jobs:

  • /test e2e-metal-ipi-ovn-dualstack
  • /test e2e-metal-ipi-upgrade
  • /test e2e-metal-ipi-virtualmedia

Use /test all to run the following jobs that were automatically triggered:

  • pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi
  • pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi-ovn-dualstack
  • pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi-ovn-ipv6
  • pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi-serial-ipv4
  • pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi-serial-ovn-ipv6
  • pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi-virtualmedia
  • pull-ci-openshift-metal3-dev-scripts-master-images
Details

In response to this:

/test e2e-metal-ipi-upgrade-ovn-ipv6

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.

@ardaguclu
Copy link
Contributor

/test e2e-metal-ipi-upgrade-ovn-ipv6

@openshift-ci
Copy link

openshift-ci bot commented Jan 10, 2022

@ardaguclu: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test e2e-metal-ipi
  • /test e2e-metal-ipi-ovn-ipv6
  • /test e2e-metal-ipi-serial-ipv4
  • /test e2e-metal-ipi-serial-ovn-ipv6
  • /test images

The following commands are available to trigger optional jobs:

  • /test e2e-metal-ipi-ovn-dualstack
  • /test e2e-metal-ipi-upgrade
  • /test e2e-metal-ipi-virtualmedia

Use /test all to run the following jobs that were automatically triggered:

  • pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi
  • pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi-ovn-dualstack
  • pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi-ovn-ipv6
  • pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi-serial-ipv4
  • pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi-serial-ovn-ipv6
  • pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi-virtualmedia
  • pull-ci-openshift-metal3-dev-scripts-master-images
Details

In response to this:

/test e2e-metal-ipi-upgrade-ovn-ipv6

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.

@openshift-ci
Copy link

openshift-ci bot commented Jan 10, 2022

@andfasano: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test e2e-metal-ipi
  • /test e2e-metal-ipi-ovn-ipv6
  • /test e2e-metal-ipi-serial-ipv4
  • /test e2e-metal-ipi-serial-ovn-ipv6
  • /test images

The following commands are available to trigger optional jobs:

  • /test e2e-metal-ipi-ovn-dualstack
  • /test e2e-metal-ipi-upgrade
  • /test e2e-metal-ipi-virtualmedia

Use /test all to run the following jobs that were automatically triggered:

  • pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi
  • pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi-ovn-dualstack
  • pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi-ovn-ipv6
  • pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi-serial-ipv4
  • pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi-serial-ovn-ipv6
  • pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi-virtualmedia
  • pull-ci-openshift-metal3-dev-scripts-master-images
Details

In response to this:

/test e2e-metal-ipi-upgrade-ovn-ipv6

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.

@ardaguclu
Copy link
Contributor

/test e2e-metal-ipi-upgrade-ovn-ipv6

@ardaguclu
Copy link
Contributor

Let's run e2e-metal-ipi-ovn-ipv6 in 4.10(previous run in 4.9) just to assure;

/test e2e-metal-ipi-ovn-ipv6

@ardaguclu
Copy link
Contributor

ardaguclu commented Jan 10, 2022

OVN upgrade again got timeout. I think, indeed this is about the second mirroring which is for upgrade(https://github.com/openshift/release/blob/214ece4b1db7203a9f7f40a13c6fcf1e6c478800/ci-operator/step-registry/baremetalds/e2e/test/baremetalds-e2e-test-commands.sh#L49). But I could not figure out how it works in periodics and fails in presubmit jobs?, @wking do you have any suggestions about the problem?

@ardaguclu
Copy link
Contributor

ardaguclu commented Jan 10, 2022

For the last failed one;

All the pods using ci-op-xxxxxxxx/stable-initial initialized properly. However, kube-apiserver-operator and etcd-operator tried to use ci-op-xxxxxxxx/stable and got ImagePullErr.

@ardaguclu
Copy link
Contributor

Periodics are working without any problem because they all use quay.io/openshift-release-dev/ocp-v4.0-art-dev. I think, there are two possibilities; 1) we are doing something wrong about mirroring, 2) in disconnected environment mirroring(or kube-apiserver-operator and etcd-operator images) has a bug.

@wking
Copy link
Contributor Author

wking commented Jan 10, 2022

Digging into e2e-metal-ipi-upgrade-ovn-ipv6, here's the ImageContentSourcePolicy suggested by the initial-release mirror:

$ curl -s https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/origin-ci-test/pr-logs/pull/openshift-metal3_dev-scripts/1333/pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi-upgrade-ovn-ipv6/1480475015475367936/artifacts/e2e-metal-ipi-upgrade-ovn-ipv6/baremetalds-devscripts-setup/build-log.txt | grep -A11 ImageContentSourcePolicy
To use the new mirrored repository for upgrades, use the following to create an ImageContentSourcePolicy:

apiVersion: operator.openshift.io/v1alpha1
kind: ImageContentSourcePolicy
metadata:
  name: example
spec:
  repositoryDigestMirrors:
  - mirrors:
    - virthost.ostest.test.metalkube.org:5000/localimages/local-release-image
    source: registry.build01.ci.openshift.org/ci-op-1nt9l6xk/release
  - mirrors:
    - virthost.ostest.test.metalkube.org:5000/localimages/local-release-image
    source: registry.build01.ci.openshift.org/ci-op-1nt9l6xk/stable-initial
+(./04_setup_ironic.sh:118): main(): echo 'export MIRRORED_RELEASE_IMAGE=registry.build01.ci.openshift.org/ci-op-1nt9l6xk/release@sha256:1eeeffd103490e38aef66adb878a555e0af0dd29319b0267fdbf36ed55f3e9e1'

Here's the config suggested for the target release mirror:

$ curl -s https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/origin-ci-test/pr-logs/pull/openshift-metal3_dev-scripts/1333/pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi-upgrade-ovn-ipv6/1480475015475367936/artifacts/e2e-metal-ipi-upgrade-ovn-ipv6/baremetalds-e2e-test/build-log.txt | grep -A11 ImageContentSourcePolicy
To use the new mirrored repository for upgrades, use the following to create an ImageContentSourcePolicy:

apiVersion: operator.openshift.io/v1alpha1
kind: ImageContentSourcePolicy
metadata:
  name: example
spec:
  repositoryDigestMirrors:
  - mirrors:
    - virthost.ostest.test.metalkube.org:5000/localimages/local-release-image
    source: registry.build01.ci.openshift.org/ci-op-1nt9l6xk/release
  - mirrors:
    - virthost.ostest.test.metalkube.org:5000/localimages/local-release-image
    source: registry.build01.ci.openshift.org/ci-op-1nt9l6xk/stable
error: failed to retrieve cached signatures

And here's the config we actually get in the cluster (descended from the code I'm touching in this PR):

$ curl https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/origin-ci-test/pr-logs/pull/openshift-metal3_dev-scripts/1333/pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi-upgrade-ovn-ipv6/1480475015475367936/artifacts/e2e-metal-ipi-upgrade-ovn-ipv6/gather-must-gather/artifacts/must-gather.tar >must-gather.tar.gz
$ tar tz <must-gather.tar.gz | grep imagecontentsourcepolicies/ | while read X; do echo "${X}"; tar xOz "${X}" <must-gather.tar.gz; done
registry-build01-ci-openshift-org-ci-op-1nt9l6xk-stable-initial-sha256-b50cd11185a18aeb653e8d46721332576d08645835cb7da8708374422c0eb106/cluster-scoped-resources/operator.openshift.io/imagecontentsourcepolicies/image-policy-0.yaml
---
apiVersion: operator.openshift.io/v1alpha1
kind: ImageContentSourcePolicy
metadata:
  creationTimestamp: "2022-01-10T10:11:07Z"
  generation: 1
  name: image-policy-0
  resourceVersion: "1583"
  uid: 9b2b0c87-030f-47ee-9afe-134d5861264e
spec:
  repositoryDigestMirrors:
  - mirrors:
    - virthost.ostest.test.metalkube.org:5000/localimages/local-release-image
    source: registry.build01.ci.openshift.org/ci-op-1nt9l6xk/release
registry-build01-ci-openshift-org-ci-op-1nt9l6xk-stable-initial-sha256-b50cd11185a18aeb653e8d46721332576d08645835cb7da8708374422c0eb106/cluster-scoped-resources/operator.openshift.io/imagecontentsourcepolicies/image-policy-1.yaml
---
apiVersion: operator.openshift.io/v1alpha1
kind: ImageContentSourcePolicy
metadata:
  creationTimestamp: "2022-01-10T10:11:07Z"
  generation: 1
  name: image-policy-1
  resourceVersion: "1585"
  uid: 435776de-55b9-444a-8daa-4e9334101e9b
spec:
  repositoryDigestMirrors:
  - mirrors:
    - virthost.ostest.test.metalkube.org:5000/localimages/local-release-image
    source: registry.build01.ci.openshift.org/ci-op-1nt9l6xk/stable-initial

I had been aiming for source: registry.build01.ci.openshift.org without the suffix. My guess is that the issue is that these presubmits are actually using the current tip version of dev-scripts, and not actually pulling in the alterations I'm making to this repository yet. Can we land this PR, see if it helps in other presubmits, and then revert if it doesn't?

So we can debug why this doesn't seem to be working
@ardaguclu
Copy link
Contributor

@wking all tests passed and I think, we can move forward with the PR.

/lgtm

@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. and removed lgtm Indicates that a PR is ready to be merged. labels Jan 10, 2022
@ardaguclu
Copy link
Contributor

/test e2e-metal-ipi-upgrade-ovn-ipv6

@ardaguclu
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 10, 2022
@andfasano
Copy link
Member

/approve

@openshift-ci
Copy link

openshift-ci bot commented Jan 10, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andfasano

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 10, 2022
@ardaguclu
Copy link
Contributor

/test e2e-metal-ipi-serial-ipv4

Copy link
Contributor

@cybertron cybertron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately it doesn't look like this is going to fix the problem. Details inline.

echo "${CANONICAL_REGISTRIES}" | while read REGISTRY; do
printf -- "- mirrors:\n - %s:\n source: %s\n" "${LOCAL_REGISTRY_DNS_NAME}:${LOCAL_REGISTRY_PORT}/localimages/local-release-image" "${REGISTRY}"
done
else
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shoot, I think I misread the script. At least in my local tests, what we're getting is this side of the if branch. As a result, these changes are not having any effect because we get whatever the mirror command recommends.

You can see it happening in this log snippet:

2022-01-10 11:32:45 ++(utils.sh:382): image_mirror_config(): [[ ! -s /opt/dev-scripts/registry/ostest-image_mirror-4.10.0-0.nightly-2022-01-10-101431.log ]]
2022-01-10 11:32:45 ++(utils.sh:393): image_mirror_config(): cat /opt/dev-scripts/registry/ostest-image_mirror-4.10.0-0.nightly-2022-01-10-101431.log
2022-01-10 11:32:45 ++(utils.sh:393): image_mirror_config(): sed -n '/To use the new mirrored repository to install/,/To use the new mirrored repository for upgrades/p'
2022-01-10 11:32:45 ++(utils.sh:394): image_mirror_config(): sed -e '/^$/d' -e '/To use the new mirrored repository/d'
2022-01-10 11:32:45 ++(utils.sh:396): image_mirror_config(): cat

So unless CI doesn't use the log file to get the image config (which the repeated failures suggest it is) this isn't going to fix the problem. :-/

In fact, you can see the same log output in the ci job toward the bottom of this file: https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/origin-ci-test/pr-logs/pull/openshift-metal3_dev-scripts/1333/pull-ci-openshift-metal3-dev-scripts-master-e2e-metal-ipi-upgrade-ovn-ipv6/1480591379284365312/artifacts/e2e-metal-ipi-upgrade-ovn-ipv6/baremetalds-devscripts-setup/artifacts/root/dev-scripts/logs/05_create_install_config-2022-01-10-174239.log

@openshift-ci
Copy link

openshift-ci bot commented Jan 10, 2022

@wking: The following tests 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-ovn-dualstack 2bbf022 link false /test e2e-metal-ipi-ovn-dualstack
ci/prow/e2e-metal-ipi-virtualmedia 2bbf022 link false /test e2e-metal-ipi-virtualmedia
ci/prow/e2e-metal-ipi-serial-ovn-ipv6 2bbf022 link true /test e2e-metal-ipi-serial-ovn-ipv6
ci/prow/e2e-metal-ipi-upgrade-ovn-ipv6 2bbf022 link false /test e2e-metal-ipi-upgrade-ovn-ipv6

Full PR test history. Your PR dashboard.

Details

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.

@cybertron
Copy link
Contributor

Discussing this further with @wking, and maybe for upgrades we just want to do both mirroring operations up front instead of one in dev-scripts setup and one in the job steps? Ref: openshift/release#25123

That way we could put both ICS's in install-config and know they'll be correct when we run the upgrade.

@ardaguclu
Copy link
Contributor

Discussing this further with @wking, and maybe for upgrades we just want to do both mirroring operations up front instead of one in dev-scripts setup and one in the job steps? Ref: openshift/release#25123

That way we could put both ICS's in install-config and know they'll be correct when we run the upgrade.

After working on this openshift/release#25130, I concluded that the same thing @cybertron. Even if mirroring for upgrade image is successfully completed, kube-apiserver-operator and cluster-etcd-operator still can not find the image. I think as you said, we should put ICS's in install-config or do you think that there is a way to add new ICS's after installation is completed?

@ardaguclu
Copy link
Contributor

I think, if I create ImageContentSourcePolicy according to result of https://github.com/openshift/release/pull/25130/files#diff-7b4946fc316154f2f0fe2beac2371cf82bc14d8071298890e8a014417e88159fR52. This will work.

@ardaguclu
Copy link
Contributor

I did some testing for this patch in this #1334 (comment). Unfortunately, did not work and needs more changes in dev-scripts.

According to the CI jobs results, this PR openshift/release#25130 solves problem.

@wking if you don't mind, we can close this PR.

@ardaguclu
Copy link
Contributor

For the cleaning up PRs I have subscribe, assigned, etc.

/uncc

@openshift-ci openshift-ci bot removed the request for review from ardaguclu March 15, 2022 11:24
@ardaguclu ardaguclu removed their assignment Mar 15, 2022
@wking wking closed this Mar 16, 2022
@wking wking deleted the registry-scoped-imageContentSources branch March 16, 2022 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants