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

Ping external ip to verify connectivity #202

Merged
merged 1 commit into from
Oct 8, 2019

Conversation

qinqon
Copy link
Member

@qinqon qinqon commented Oct 4, 2019

Signed-off-by: Quique Llorente [email protected]

@qinqon qinqon force-pushed the rollback_lost_connectivity branch 2 times, most recently from efec0a2 to 09cecb9 Compare October 4, 2019 11:09
@qinqon qinqon requested review from phoracek and SchSeba October 4, 2019 11:10
@qinqon
Copy link
Member Author

qinqon commented Oct 4, 2019

I am installing "iputils" but we may want to use golang tools like https://godoc.org/github.com/sparrc/go-ping both options are going to increase the size of Dockerfile

@phoracek
Copy link
Member

phoracek commented Oct 4, 2019

@qinqon at least we can use the container for network debugging when needed :)

pkg/helper/client.go Outdated Show resolved Hide resolved
@qinqon qinqon force-pushed the rollback_lost_connectivity branch from 09cecb9 to 262f9fc Compare October 4, 2019 12:05
@qinqon qinqon changed the title wip: ping external ip to verify connectivity Ping external ip to verify connectivity Oct 4, 2019
@qinqon qinqon requested a review from phoracek October 4, 2019 12:06
@@ -55,6 +55,11 @@ spec:
configMapKeyRef:
name: nmstate-config
key: interfaces_filter
- name: CONNECTIVITY_CHECK_ENDPOINT
Copy link
Member

Choose a reason for hiding this comment

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

If I was a user I would have no idea what the endpoint means. Maybe connectivity_check_ip_target?

Copy link
Member

Choose a reason for hiding this comment

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

But since it can be domain name, maybe just connectivity_check_target?

Copy link
Member Author

Choose a reason for hiding this comment

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

ack, is good name too.

@qinqon qinqon force-pushed the rollback_lost_connectivity branch 2 times, most recently from fc0e1cf to beaf1e6 Compare October 4, 2019 12:35
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.

We should have a test for this.

Copy link
Contributor

@SchSeba SchSeba left a comment

Choose a reason for hiding this comment

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

I am not sure this is a good solution for disconnected environment.

can we just save the environment default gateway before the change make the change and check it again?
also we can add a check that we can still query the k8s api.

@phoracek
Copy link
Member

phoracek commented Oct 5, 2019

@SchSeba the API ping would come later. We want to start with this since we work on single node environment, so access to API server is not that hard. However y the idea with default gateway sounds great. Less configuration variables.

@qinqon
Copy link
Member Author

qinqon commented Oct 7, 2019

@SchSeba @phoracek I like the idea of use the default gateway as the connectivity target, but want to keep the environment variable for testing purposes is that ok ?

@qinqon qinqon force-pushed the rollback_lost_connectivity branch 3 times, most recently from cac643a to e5ee2f7 Compare October 8, 2019 08:37
@qinqon
Copy link
Member Author

qinqon commented Oct 8, 2019

@phoracek @SchSeba in case we can modify the default gw with a bad value, we don't need the config to test it.

@SchSeba
Copy link
Contributor

SchSeba commented Oct 8, 2019

@qinqon for a test you can do it.

just run the ip route add command on the host to change the default one. (you need to remove the correct one and the create a new one)

Then just return the one you deleted on the afterEach

@phoracek
Copy link
Member

phoracek commented Oct 8, 2019

@qinqon @SchSeba we can configure the route via nmstate ;) https://nmstate.github.io/examples.html#route

@qinqon
Copy link
Member Author

qinqon commented Oct 8, 2019

@SchSeba my idea is to try to do it first using nmstate, if this renders impossible we can hack it at node.

@@ -159,12 +167,26 @@ func UpdateCurrentState(client client.Client, nodeNetworkState *nmstatev1alpha1.
return nil
}

func ping(target string) error {
Copy link
Member

Choose a reason for hiding this comment

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

It may be interesting to log the output of the ping too. Don't you think?

Copy link
Member Author

Choose a reason for hiding this comment

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

I want to see CI passing and then will cover this.

@qinqon qinqon force-pushed the rollback_lost_connectivity branch 2 times, most recently from d728669 to 3de0ab8 Compare October 8, 2019 13:21
@qinqon
Copy link
Member Author

qinqon commented Oct 8, 2019

@SchSeba @phoracek looks like we can change default gw with nmstate but they have an issue and it's only possible changing eth0 to static ip address, but at least is working.

pkg/helper/client.go Show resolved Hide resolved
pkg/helper/client.go Show resolved Hide resolved
pkg/helper/client.go Show resolved Hide resolved
pkg/helper/client.go Show resolved Hide resolved
test/e2e/rollback_test.go Outdated Show resolved Hide resolved
test/e2e/rollback_test.go Outdated Show resolved Hide resolved
test/e2e/rollback_test.go Outdated Show resolved Hide resolved
@qinqon qinqon force-pushed the rollback_lost_connectivity branch from 3de0ab8 to d5e6366 Compare October 8, 2019 13:55
@qinqon qinqon requested review from SchSeba and phoracek October 8, 2019 14:03
test/e2e/utils.go Show resolved Hide resolved
test/e2e/rollback_test.go Outdated Show resolved Hide resolved
@qinqon qinqon force-pushed the rollback_lost_connectivity branch from d5e6366 to bcfcd4e Compare October 8, 2019 14:20
@qinqon qinqon requested a review from phoracek October 8, 2019 14:21
@qinqon qinqon force-pushed the rollback_lost_connectivity branch 2 times, most recently from 281c436 to 440e52a Compare October 8, 2019 14:48
pkg/helper/client.go Outdated Show resolved Hide resolved
pkg/helper/client.go Outdated Show resolved Hide resolved
pkg/helper/client.go Outdated Show resolved Hide resolved
@qinqon qinqon force-pushed the rollback_lost_connectivity branch from 440e52a to 58fedf1 Compare October 8, 2019 15:05
@qinqon qinqon requested a review from phoracek October 8, 2019 15:05
phoracek
phoracek previously approved these changes Oct 8, 2019
In case it fails it will rollback nmstate changes.

Signed-off-by: Quique Llorente <[email protected]>
@phoracek phoracek merged commit 8e8df75 into nmstate:master Oct 8, 2019
cybertron pushed a commit to cybertron/kubernetes-nmstate that referenced this pull request Aug 27, 2021
Remove Brad and Toni from reviewers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants