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

[OCPBUGS-16644] Fix nmstate-console-plugin for Single-Stack IPv6 clusters #1200

Merged
merged 1 commit into from
Jul 27, 2023

Conversation

orenc1
Copy link
Contributor

@orenc1 orenc1 commented Jul 26, 2023

Is this a BUG FIX or a FEATURE ?:

Uncomment only one, leave it on its own line:

/kind bug

/kind enhancement

What this PR does / why we need it:
When a single-stack IPv6 cluster is being used, the nginx server isn't listening on IPv6 requests, just IPv4. Changing the nginx configuration listen directive to [::]:9443 ipv6only=off ssl will accept connections both for IPv6 and IPv4. Also, parametrize the service port.
Special notes for your reviewer:

Release note:

fix nmstate-console-plugin in single-stack ipv6 clusters.

@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Jul 26, 2023
@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 Jul 26, 2023
@kubevirt-bot
Copy link
Collaborator

Hi @orenc1. Thanks for your PR.

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

@orenc1
Copy link
Contributor Author

orenc1 commented Jul 26, 2023

hi @qinqon ,
could you please comment here:
/ok-to-test
?
thanks

@kubevirt-bot
Copy link
Collaborator

@orenc1: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

hi @qinqon ,
could you please comment here:
/ok-to-test
?
thanks

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.

@@ -16,7 +16,7 @@ data:
default_type application/octet-stream;
keepalive_timeout 65;
server {
listen 9443 ssl;
listen [::]:{{ .PluginPort }} ipv6only=off ssl;
Copy link
Member

Choose a reason for hiding this comment

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

Do this work for ipv4 single stack ?

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, verified this also with IPv6 single stack and IPv4 single stack

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@qinqon , i verified it works also on a Dual-Stack IPv4+IPv6 cluster:

$ oc get network cluster -o json | jq .status
{
  "clusterNetwork": [
    {
      "cidr": "10.128.0.0/14",
      "hostPrefix": 23
    },
    {
      "cidr": "fd02::/48",
      "hostPrefix": 64
    }
  ],
  "clusterNetworkMTU": 1400,
  "networkType": "OVNKubernetes",
  "serviceNetwork": [
    "172.30.0.0/16",
    "fd03::/112"
  ]
}

from the nmstate-console-plugin pod logs:

::ffff:10.128.0.137 - - [26/Jul/2023:14:57:50 +0000] "GET /plugin-manifest.json HTTP/1.1" 200 3269 "https://console-openshift-console.apps.<REDACTED>/k8s/ns/openshift-nmstate/pods/nmstate-console-plugin-5d6ff7f8bd-stqf9/logs" "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0"

@qinqon
Copy link
Member

qinqon commented Jul 26, 2023

/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 Jul 26, 2023
…ters

When a single-stack IPv6 cluster is being used, the nginx server isn't listening on IPv6 requests, just IPv4.
Changing the nginx configuration listen directive to '[::]:9443 ipv6only=off ssl' will accept connections both for IPv6 and IPv4.
Also, parametrize the service port.

Signed-off-by: Oren Cohen <ocohen@redhat.com>
Copy link
Member

@phoracek phoracek left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Jul 27, 2023
@kubevirt-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: phoracek

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 Jul 27, 2023
@kubevirt-bot kubevirt-bot merged commit fbce671 into nmstate:main Jul 27, 2023
@orenc1 orenc1 deleted the console_plugin_ipv6_fix branch July 27, 2023 09:41
orenc1 added a commit to orenc1/kubernetes-nmstate that referenced this pull request Jul 27, 2023
…ters (nmstate#1200)

When a single-stack IPv6 cluster is being used, the nginx server isn't listening on IPv6 requests, just IPv4.
Changing the nginx configuration listen directive to '[::]:9443 ipv6only=off ssl' will accept connections both for IPv6 and IPv4.
Also, parametrize the service port.

Signed-off-by: Oren Cohen <ocohen@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. kind/bug 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.

4 participants