Skip to content

Bug 2050466: Not allow empty string in icsp&image CR#2969

Merged
openshift-merge-robot merged 3 commits intoopenshift:masterfrom
QiWang19:empty-str-validation
Mar 1, 2022
Merged

Bug 2050466: Not allow empty string in icsp&image CR#2969
openshift-merge-robot merged 3 commits intoopenshift:masterfrom
QiWang19:empty-str-validation

Conversation

@QiWang19
Copy link
Copy Markdown
Member

@QiWang19 QiWang19 commented Feb 25, 2022

Fix: https://bugzilla.redhat.com/show_bug.cgi?id=2050466

2022-02-03T23:16:02.952318066Z I0203 23:16:02.952259    2590 run.go:18] Running: podman pull -q --authfile /var/lib/kubelet/config.json quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:6d4ff6bb5494c55c24f9a322b1a5faffb8a92ea0f572f1078db55f3f1abaa588
2022-02-03T23:16:03.033231339Z Error: error loading registries configuration "/etc/containers/registries.conf": invalid condition: mirror location is unset

Signed-off-by: Qi Wang qiwan@redhat.com

- What I did

- How to verify it

Apply the following icsp to the cluster:
it should logs error about the icsp is invalid and do not update the registries.conf.

apiVersion: operator.openshift.io/v1alpha1
kind: ImageContentSourcePolicy
metadata:
  generation: 1
  name: sonatyperepo
spec:
  repositoryDigestMirrors:
  - mirrors:
    - sonatyperepo.test.com
    source: docker.io
  - mirrors:
    - ""
    source: sonatyperepo.test.com:18594

- Description for the changelog

Signed-off-by: Qi Wang <qiwan@redhat.com>
Fix: https://bugzilla.redhat.com/show_bug.cgi?id=2050466
Add validation for image and icsp CR to not allow the empty string ("") in the CRD.
Empty string regsitries configurations will fail the machine config deamon operations
of pulling images and the nodes will stopped in NotReady state when node rebooting after node drain.

Signed-off-by: Qi Wang <qiwan@redhat.com>
Signed-off-by: Qi Wang <qiwan@redhat.com>
@openshift-ci openshift-ci Bot added bugzilla/severity-urgent Referenced Bugzilla bug's severity is urgent for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Feb 25, 2022
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Feb 25, 2022

@QiWang19: This pull request references Bugzilla bug 2050466, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.11.0) matches configured target release for branch (4.11.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

No GitHub users were found matching the public email listed for the QA contact in Bugzilla (schoudha@redhat.com), skipping review request.

Details

In response to this:

Bug 2050466: Not allow empty string in icsp&image CR

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
Copy Markdown
Contributor

openshift-ci Bot commented Feb 25, 2022

@QiWang19: This pull request references Bugzilla bug 2050466, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.11.0) matches configured target release for branch (4.11.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

No GitHub users were found matching the public email listed for the QA contact in Bugzilla (schoudha@redhat.com), skipping review request.

Details

In response to this:

Bug 2050466: Not allow empty string in icsp&image CR

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.

@QiWang19
Copy link
Copy Markdown
Member Author

@mtrmac PTAL. vendor in openshift/runtime-utils#14 to put in the validation for mirror and blocked/insecure/allowed together.

@kikisdeliveryservice
Copy link
Copy Markdown
Contributor

/assign @mtrmac

Copy link
Copy Markdown
Contributor

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

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

/lgtm

Thanks!

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Feb 25, 2022
@QiWang19
Copy link
Copy Markdown
Member Author

/retest-required

1 similar comment
@QiWang19
Copy link
Copy Markdown
Member Author

/retest-required

@QiWang19
Copy link
Copy Markdown
Member Author

QiWang19 commented Mar 1, 2022

@kikisdeliveryservice @yuqi-zhang PTAL

Copy link
Copy Markdown
Contributor

@yuqi-zhang yuqi-zhang left a comment

Choose a reason for hiding this comment

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

lgtm

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

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Mar 1, 2022

@QiWang19: 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-aws-workers-rhel8 0fb6004 link false /test e2e-aws-workers-rhel8
ci/prow/e2e-ovn-step-registry 0fb6004 link false /test e2e-ovn-step-registry
ci/prow/e2e-aws-disruptive 0fb6004 link false /test e2e-aws-disruptive
ci/prow/e2e-aws-workers-rhel7 0fb6004 link false /test e2e-aws-workers-rhel7
ci/prow/e2e-aws-upgrade-single-node 0fb6004 link false /test e2e-aws-upgrade-single-node
ci/prow/okd-e2e-aws 0fb6004 link false /test okd-e2e-aws

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.

@openshift-bot
Copy link
Copy Markdown
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

3 similar comments
@openshift-bot
Copy link
Copy Markdown
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Copy Markdown
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Copy Markdown
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@umohnani8
Copy link
Copy Markdown
Contributor

LGTM

@kikisdeliveryservice
Copy link
Copy Markdown
Contributor

Thanks for this updated PR @mtrmac and @QiWang19 👍

/approve

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Mar 1, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kikisdeliveryservice, mtrmac, QiWang19, yuqi-zhang

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:
  • OWNERS [kikisdeliveryservice,yuqi-zhang]

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

@openshift-bot
Copy link
Copy Markdown
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 080919d into openshift:master Mar 1, 2022
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Mar 1, 2022

@QiWang19: All pull requests linked via external trackers have merged:

Bugzilla bug 2050466 has been moved to the MODIFIED state.

Details

In response to this:

Bug 2050466: Not allow empty string in icsp&image CR

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.

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. bugzilla/severity-urgent Referenced Bugzilla bug's severity is urgent for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants