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
Bug 1822326: Add extra checks for ipv6 addresses when checking the etcd env #296
Bug 1822326: Add extra checks for ipv6 addresses when checking the etcd env #296
Conversation
@retroflexer: This pull request references Bugzilla bug 1822326, 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
In response to this:
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. |
/test e2e-metal-ipi |
bindata/etcd/pod.yaml
Outdated
@@ -25,13 +25,15 @@ spec: | |||
: "${NODE_NODE_ENVVAR_NAME_ETCD_NAME?not set}" | |||
: "${NODE_NODE_ENVVAR_NAME_IP?not set}" | |||
|
|||
if [ "${NODE_NODE_ENVVAR_NAME_IP}" != "${NODE_IP}" ]; then | |||
# check for ipv4 addresses as well as ipv6 addresses with extra square brackets | |||
if [ "${NODE_NODE_ENVVAR_NAME_IP}" != "${NODE_IP}" -a "${NODE_NODE_ENVVAR_NAME_IP}" != "[${NODE_IP}]" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small nit use of -a
syntax has been depricated please use &&
[1].
I think we should add shellcheck to our unit tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is $NODE_IP
bracket wrapped?
I think it was a reasonable assumption in the original PR that a variable named $NODE_IP
was actually just an IP, so I'd be concerned about this problem surfacing again elsewhere. IMHO, the IP shouldn't be wrapped until it's included in the host portion of a URI.
net.JoinHostPort in go will handle it, and for scripts we have a helper in our env that might be able to be reused:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stbenjam Here NODE_IP doesn't come bracket wrapped, but NODE_NODE_ENVVAR_NAME_IP is bracket wrapped as it is used the host portion of a URI. We are trying to match these variables to check the validity of the environment, and hence the check in this init container.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh right, I misread what was being checked! Sorry.
I think the general point is still the same, it's a reasonable assumption for someone looking at a variable with the name "IP" to assume it's an IP, and not a host for a URI.
/test e2e-metal-ipi |
e2e-metal-ipi failure is new, due to metal3-io/metal3-dev-env#280 - we're getting it fixed now |
Should be fixed /test e2e-metal-ipi |
/test e2e-metal-ipi |
2dc8e58
to
1bbc1dd
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hexfusion, retroflexer 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 |
/retest Please review the full test history for this PR and help us cut down flakes. |
Not sure why e2e-metal-ipi is failing, it's not even getting to the point where etcd can run. Will have a look in the morning. |
/retest Please review the full test history for this PR and help us cut down flakes. |
2 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
It was some of the dual stack work (openshift-metal3/dev-scripts#1012) /test e2e-metal-ipi |
/retest Please review the full test history for this PR and help us cut down flakes. |
3 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest |
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
@retroflexer: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. |
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
@retroflexer: All pull requests linked via external trackers have merged: openshift/cluster-etcd-operator#296. Bugzilla bug 1822326 has been moved to the MODIFIED state. In response to this:
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. |
/cherrypick release-4.4 |
@retroflexer: #296 failed to apply on top of branch "release-4.4":
In response to this:
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. |
The fix for Bug 1817028 (https://bugzilla.redhat.com/show_bug.cgi?id=1817028) introduced a new init container to validate the etcd environment before firing up the etcd. However, the checks for ensuring the etcd environment rely on ipstring comparison which fail in the ipv6 environments.