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

Be more accuracy for getting def_route_int and def_route_ip #9448

Merged
merged 1 commit into from Aug 8, 2018

Conversation

bysnupy
Copy link
Member

@bysnupy bysnupy commented Aug 7, 2018

Fix the BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1613094

If the ip command output is unexpected order, it can cause the issues about DNS due to pointing upstream DNS in the resolv.conf.

For suppressing issues due to dependence of output order, we should filter to get required values.

@openshift-ci-robot openshift-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 7, 2018
@papr-bot
Copy link

papr-bot commented Aug 7, 2018

Can one of the admins verify this patch?
I understand the following commands:

  • bot, add author to whitelist
  • bot, test pull request
  • bot, test pull request once

@@ -44,8 +44,8 @@ if [[ $2 =~ ^(up|dhcp4-change|dhcp6-change)$ ]]; then
# couldn't find an existing method to determine if the interface owns the
# default route
def_route=$(/sbin/ip route list match 0.0.0.0/0 | awk '{print $3 }')
def_route_int=$(/sbin/ip route get to ${def_route} | awk '{print $3}')
def_route_ip=$(/sbin/ip route get to ${def_route} | awk '{print $5}')
def_route_int=$(/sbin/ip route get to ${def_route} | awk -F 'dev' '{print $2}' | awk '{print $1}')
Copy link
Contributor

Choose a reason for hiding this comment

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

this seems suitable, let's pipe the output of each ip command to head -n1 before awk to filter out cache line.

Copy link
Member Author

@bysnupy bysnupy Aug 8, 2018

Choose a reason for hiding this comment

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

@michaelgugino Thank you for your point. You're right. It include the new line, so head -n1 can remove it. I've updated.

@michaelgugino
Copy link
Contributor

/ok-to-test

@openshift-ci-robot openshift-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 8, 2018
Copy link
Contributor

@michaelgugino michaelgugino 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-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 8, 2018
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bysnupy, michaelgugino

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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 8, 2018
@openshift-ci-robot
Copy link

@bysnupy: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/prow/gcp abc8eb7 link /test gcp
ci/prow/gcp-crio abc8eb7 link /test gcp-crio

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.

@michaelgugino michaelgugino merged commit e4e96ab into openshift:master Aug 8, 2018
@michaelgugino
Copy link
Contributor

/cherrypick release-3.10

/cherrypick release-3.9

/cherrypick release-3.7

@openshift-cherrypick-robot

@michaelgugino: new pull request created: #9484

In response to this:

/cherrypick release-3.10

/cherrypick release-3.9

/cherrypick release-3.7

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. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants