Skip to content
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

Fix bug and change cri selection procedure of cluster-sync #2155

Merged
merged 1 commit into from
Nov 28, 2022

Conversation

jcanocan
Copy link
Contributor

@jcanocan jcanocan commented Nov 23, 2022

The command for getting the registry port gets more than one output, which breaks following commands in the deploying scripts. The output is now parsed to pickup just the first port.

Also the container runtime selection was hardcoded, now it uses the cri selection script of kubervirtci.

Further details can be found at issue 2153

Fixes #2153

Reviewer Checklist

Reviewers are supposed to review the PR for every aspect below one by one. To check an item means the PR is either "OK" or "Not Applicable" in terms of that item. All items are supposed to be checked before merging a PR.

  • PR Message
  • Commit Messages
  • How to test
  • Unit Tests
  • Functional Tests
  • User Documentation
  • Developer Documentation
  • Upgrade Scenario
  • Uninstallation Scenario
  • Backward Compatibility
  • Troubleshooting Friendly

Release note:

Fix make cluster-sync issue and changes the cri selection procedure

@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Nov 23, 2022
@kubevirt-bot
Copy link
Contributor

Hi @jcanocan. Thanks for your PR.

I'm waiting for a kubevirt 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.

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.

@kubevirt-bot kubevirt-bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Nov 23, 2022
@openshift-ci
Copy link

openshift-ci bot commented Nov 23, 2022

Hi @jcanocan. Thanks for your PR.

I'm waiting for a kubevirt 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.

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.

@jcanocan
Copy link
Contributor Author

/cc @tiraboschi

cluster/sync.sh Outdated
@@ -1,15 +1,15 @@
#!/bin/bash -ex

source ./hack/common.sh
source ${PWD}/_kubevirtci/cluster-up/cluster/ephemeral-provider-common.sh
Copy link
Member

Choose a reason for hiding this comment

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

Use same path style as above? . instead of ${PWD}?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree.

cluster/sync.sh Outdated
container_command=podman

registry_port=$(${container_command} ps | grep -Po '(?<=0.0.0.0:)\d+(?=->5000\/tcp)' || echo "")
container_command=$_cri_bin
Copy link
Member

Choose a reason for hiding this comment

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

Why not replace container_command with _cri_bin everywhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense for me too.

cluster/sync.sh Outdated

registry_port=$(${container_command} ps | grep -Po '(?<=0.0.0.0:)\d+(?=->5000\/tcp)' | head -n 1)
Copy link
Member

Choose a reason for hiding this comment

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

Did you check if the regex works for both podman and docker?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I just checked it.

The command for getting the registry port gets more than one output,
which breaks following commands in the deploying scripts. The output is
now parsed to pickup just the first port.

Also the container runtime selection was hardcoded, now it uses the cri
selection script of kubervirtci.

Co-authored-by: Felix Matouschek <fmatouschek@redhat.com>
Signed-off-by: Javier Cano Cano <jcanocan@redhat.com>
@sonarcloud
Copy link

sonarcloud bot commented Nov 23, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@0xFelix
Copy link
Member

0xFelix commented Nov 24, 2022

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Nov 24, 2022
@tiraboschi
Copy link
Member

/ok-to-test

@kubevirt-bot kubevirt-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 Nov 25, 2022
@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 3533846405

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.02%) to 85.419%

Files with Coverage Reduction New Missed Lines %
controllers/operands/operandHandler.go 1 84.34%
Totals Coverage Status
Change from base Build 3495979789: -0.02%
Covered Lines: 4634
Relevant Lines: 5425

💛 - Coveralls

@nunnatsa
Copy link
Collaborator

Coverage reduction seems not related to this PR, because it does not change code nor unit tests.

/override coverage/coveralls
/approve

@kubevirt-bot
Copy link
Contributor

@nunnatsa: Overrode contexts on behalf of nunnatsa: coverage/coveralls

In response to this:

Coverage reduction seems not related to this PR, because it does not change code nor unit tests.

/override coverage/coveralls
/approve

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.

@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nunnatsa

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 28, 2022
@kubevirt-bot kubevirt-bot merged commit 09fd80e into kubevirt:main Nov 28, 2022
tiraboschi pushed a commit to tiraboschi/hyperconverged-cluster-operator that referenced this pull request Mar 14, 2023
…#2155)

The command for getting the registry port gets more than one output,
which breaks following commands in the deploying scripts. The output is
now parsed to pickup just the first port.

Also the container runtime selection was hardcoded, now it uses the cri
selection script of kubervirtci.

Co-authored-by: Felix Matouschek <fmatouschek@redhat.com>
Signed-off-by: Javier Cano Cano <jcanocan@redhat.com>

Signed-off-by: Javier Cano Cano <jcanocan@redhat.com>
Co-authored-by: Felix Matouschek <fmatouschek@redhat.com>
kubevirt-bot pushed a commit that referenced this pull request Mar 20, 2023
* [release-1.8] Align github actions from newer branches

Backport a few configuration changes
in github actions.

Signed-off-by: stirabos <stirabos@redhat.com>

* Fix bug and change cri selection procedure of cluster-sync. (#2155)

The command for getting the registry port gets more than one output,
which breaks following commands in the deploying scripts. The output is
now parsed to pickup just the first port.

Also the container runtime selection was hardcoded, now it uses the cri
selection script of kubervirtci.

Co-authored-by: Felix Matouschek <fmatouschek@redhat.com>
Signed-off-by: Javier Cano Cano <jcanocan@redhat.com>

Signed-off-by: Javier Cano Cano <jcanocan@redhat.com>
Co-authored-by: Felix Matouschek <fmatouschek@redhat.com>

* cluster-up: Fix tag updating (#2189)

In case the _kubevirtci folder exists,
changing the tag won't reclone the folder.
The cluster-up folder won't be updated and it can lead
to bugs in case the folder is changed.

Fix it by deleting the folder in case of tag mismatch.
It will enforce a reclone.

Signed-off-by: Or Shoval <oshoval@redhat.com>

Signed-off-by: Or Shoval <oshoval@redhat.com>

* Bump the default kubevirtci provider

Signed-off-by: stirabos <stirabos@redhat.com>

* Workaround for SELinux boolean for chardev

Workaround for kubevirt/kubevirt#9434
we started setting SELinux boolean for chardev access
with kubevirt/kubevirtci#968
but it got reverted with kubevirt/kubevirtci#975
altough it's still needed with Kubevirt v0.58.1
TODO: let's remove this once kubevirt/kubevirt#9434
is fixed

Signed-off-by: stirabos <stirabos@redhat.com>

---------

Signed-off-by: stirabos <stirabos@redhat.com>
Signed-off-by: Javier Cano Cano <jcanocan@redhat.com>
Signed-off-by: Or Shoval <oshoval@redhat.com>
Co-authored-by: Javier Cano Cano <jcanocan@redhat.com>
Co-authored-by: Felix Matouschek <fmatouschek@redhat.com>
Co-authored-by: oscollabus <oshoval@redhat.com>
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. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. 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. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to build the hyperconverged-cluster-operator
6 participants