Skip to content

Commit

Permalink
fix resolv.conf path
Browse files Browse the repository at this point in the history
  • Loading branch information
bparees committed Sep 25, 2017
1 parent c52a663 commit c43829a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/build/builder/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func getContainerNetworkMode() (string, string, error) {
return "", "", err
}
glog.V(0).Infof("crio spec:\n%#v", info)
pid := string(info.Pid)
pid := strconv.Itoa(info.Pid)
resolvConfHostPath := info.CrioAnnotations["io.kubernetes.cri-o.ResolvPath"]
if len(resolvConfHostPath) == 0 {
return "", "", errors.New("/etc/resolv.conf hostpath is empty")
Expand All @@ -160,8 +160,8 @@ func getContainerNetworkMode() (string, string, error) {
}
*/

glog.V(0).Infof("pid=%s, resolvpath=%s", pid, resolvConfHostPath)
return fmt.Sprintf("netns:/proc/%s/ns/net", pid), fmt.Sprintf("/var/run" + resolvConfHostPath), nil
glog.V(0).Infof("real pid=%s, resolvpath=%s", pid, resolvConfHostPath)
return fmt.Sprintf("netns:/proc/%s/ns/net", pid), resolvConfHostPath, nil
}
return "", "", nil
}
Expand Down

0 comments on commit c43829a

Please sign in to comment.