Skip to content

Export CDI upload proxy lower-band port in CI clusters #1435

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

Merged
merged 1 commit into from
May 9, 2025

Conversation

Acedus
Copy link
Contributor

@Acedus Acedus commented May 4, 2025

What this PR does / why we need it:
Currently CI clusters already expose the upload proxy port which is later used for setting up a node-port.

Because the port belongs to the dynamic node-port allocation range (ala upper-band) by default[1] it makes it so that node-port can be claimed by a dynamic service which in turns causes a conflict once the upload proxy service is attempted to be created.

This commit adds a temporary UploadProxyLowerBand port from the static range to fix that.

[1] https://kubernetes.io/blog/2023/05/11/nodeport-dynamic-and-static-allocation/#default-range-30000-32767

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:
See #653 for reference.

Checklist

This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.

Release note:

none

Sorry, something went wrong.

Currently CI clusters already expose the upload proxy port which is
later used for setting up a node-port.

Because the port belongs to the dynamic node-port allocation
range (ala upper-band) by default[1] it makes it so that node-port can
be claimed by a dynamic service which in turns causes a conflict once
the upload proxy service is attempted to be created.

This commit adds a temporary UploadProxyLowerBand port from the static
range to fix that.

[1] https://kubernetes.io/blog/2023/05/11/nodeport-dynamic-and-static-allocation/#default-range-30000-32767

Signed-off-by: Adi Aloni <aaloni@redhat.com>
@kubevirt-bot kubevirt-bot requested a review from dhiller May 4, 2025 11:07
@kubevirt-bot kubevirt-bot added the dco-signoff: yes Indicates the PR's author has DCO signed all their commits. label May 4, 2025
@kubevirt-bot kubevirt-bot requested a review from oshoval May 4, 2025 11:07
Copy link

sourcery-ai bot commented May 4, 2025

Reviewer's Guide

This pull request introduces a new, dedicated port (PortUploadProxyLowerBand, 30085) for the CDI upload proxy in CI clusters to mitigate potential conflicts with dynamically allocated NodePorts. This is achieved by defining new port constants, updating the ports CLI command and related validation logic, adding the new port to VM port forwarding rules and the DNSMasq container configuration, and updating documentation.

File-Level Changes

Change Details Files
Defined a new port constant and name for the CDI upload proxy.
  • Added constant PortUploadProxyLowerBand with value 30085.
  • Added constant PortNameUploadProxyLowerBand with value "uploadproxy-lowerband".
cluster-provision/gocli/cmd/utils/ports.go
Updated the ports CLI command to recognize and handle the new port.
  • Added the new port name to the argument validation list.
  • Added logic to print the public port mapping for the new port name.
cluster-provision/gocli/cmd/ports.go
Configured port forwarding and container exposure for the new port.
  • Added the new port (30085) to the TCP port forwarding rules in the VM setup script.
  • Exposed the new port in the DNSMasq container configuration.
cluster-provision/centos9/scripts/vm.sh
cluster-provision/gocli/containers/dnsmasq.go
Updated documentation regarding forwarded ports.
  • Added the new port (30085) to the list of ports mentioned in the podman networking section.
PODMAN.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@dosubot dosubot bot added the sig/ci Denotes an issue or PR as being related to sig-ci, marks changes to the CI system. label May 4, 2025
@Acedus
Copy link
Contributor Author

Acedus commented May 4, 2025

/cc @akalenyu

@kubevirt-bot kubevirt-bot requested a review from akalenyu May 4, 2025 11:08
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @Acedus - I've reviewed your changes - here's some feedback:

  • Consider changing the existing PortUploadProxy constant to a static-range port instead of introducing a separate UploadProxyLowerBand.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label May 4, 2025
@akalenyu
Copy link
Contributor

akalenyu commented May 4, 2025

/cc @brianmcarey

@kubevirt-bot kubevirt-bot requested a review from brianmcarey May 4, 2025 11:14
@Acedus
Copy link
Contributor Author

Acedus commented May 6, 2025

/retest-required

@brianmcarey
Copy link
Member

/retest

1 similar comment
@akalenyu
Copy link
Contributor

akalenyu commented May 8, 2025

/retest

Copy link
Member

@brianmcarey brianmcarey left a comment

Choose a reason for hiding this comment

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

/approve

@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brianmcarey

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 May 9, 2025
@kubevirt-bot
Copy link
Contributor

kubevirt-bot commented May 9, 2025

@Acedus: 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
check-provision-k8s-1.30 3816d20 link true /test check-provision-k8s-1.30

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-sigs/prow repository. I understand the commands that are listed here.

@kubevirt-bot kubevirt-bot merged commit b6aa610 into kubevirt:main May 9, 2025
12 checks passed
kubevirt-bot added a commit to kubevirt-bot/kubevirt that referenced this pull request May 10, 2025
[a43ac80 feat: enable variable for requiring nested virtualization](kubevirt/kubevirtci#1397)
[b6aa610 Export CDI upload proxy lowerband port in CI clusters](kubevirt/kubevirtci#1435)
[5e59b56 feat: Add a new flag to configure the dynamic-networks-controller being deploy through CNAO](kubevirt/kubevirtci#1408)

```release-note
NONE
```

Signed-off-by: kubevirt-bot <kubevirtbot@redhat.com>
nirdothan pushed a commit to nirdothan/kubevirt that referenced this pull request May 13, 2025
[a43ac80 feat: enable variable for requiring nested virtualization](kubevirt/kubevirtci#1397)
[b6aa610 Export CDI upload proxy lowerband port in CI clusters](kubevirt/kubevirtci#1435)
[5e59b56 feat: Add a new flag to configure the dynamic-networks-controller being deploy through CNAO](kubevirt/kubevirtci#1408)

```release-note
NONE
```

Signed-off-by: kubevirt-bot <kubevirtbot@redhat.com>
akalenyu pushed a commit to akalenyu/kubevirt that referenced this pull request May 15, 2025
[a43ac80 feat: enable variable for requiring nested virtualization](kubevirt/kubevirtci#1397)
[b6aa610 Export CDI upload proxy lowerband port in CI clusters](kubevirt/kubevirtci#1435)
[5e59b56 feat: Add a new flag to configure the dynamic-networks-controller being deploy through CNAO](kubevirt/kubevirtci#1408)

```release-note
NONE
```

Signed-off-by: kubevirt-bot <kubevirtbot@redhat.com>
fra2404 pushed a commit to fra2404/kubevirt that referenced this pull request Jun 21, 2025
[a43ac80 feat: enable variable for requiring nested virtualization](kubevirt/kubevirtci#1397)
[b6aa610 Export CDI upload proxy lowerband port in CI clusters](kubevirt/kubevirtci#1435)
[5e59b56 feat: Add a new flag to configure the dynamic-networks-controller being deploy through CNAO](kubevirt/kubevirtci#1408)

```release-note
NONE
```

Signed-off-by: kubevirt-bot <kubevirtbot@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. sig/ci Denotes an issue or PR as being related to sig-ci, marks changes to the CI system. size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants