Skip to content

more robust resolv.conf check #53

Description

@wjayesh

As the comment below mentions, in order to check the resolv.conf for different namespaces, we have to look into the /etc/namespace/../ dir for that version of resolv.conf.

// check if etc/namespace exists or not
// this is because we can't access it directly as setns doesn't
// relocate etc/namespace/.../ to etc/resolv.conf

Currently only the one that version of resolv.conf is checked that is shared across all network namespaces. Those net ns that have their own versions are not checked.

//first, we check the resolv.conf file to check if resolvers are correct
//
cmd := exec.Command("cat", "/etc/resolv.conf")
output, err := cmd.CombinedOutput()

We can do that in the remedy.go file, keeping in mind that we already have the namespace information (as a netns object).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgood first issueGood for newcomershealthrelated to the health check, either memory or network

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions