Skip to content

Commit

Permalink
mount CNI_NETNS dir, in case it is some exotic location
Browse files Browse the repository at this point in the history
  • Loading branch information
rade authored and Martynas Pumputis committed Aug 16, 2016
1 parent faf5b14 commit afc6f49
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion weave
Original file line number Diff line number Diff line change
Expand Up @@ -1031,9 +1031,12 @@ peer_args() {
create_cni_script() {
cat >"$1" <<EOF
#!/bin/sh
[ -z "\$CNI_NETNS" -o \$(echo "\$CNI_NETNS" | grep "^/proc/") ] || \\
EXTRA_VOLUMES="-v \$(dirname \$CNI_NETNS):\$(dirname \$CNI_NETNS)"
docker run --rm $(docker_run_options) --pid=host -i \\
-e CNI_VERSION -e CNI_COMMAND -e CNI_CONTAINERID -e CNI_NETNS \\
-e CNI_IFNAME -e CNI_ARGS -e CNI_PATH -v /etc/cni:/etc/cni -v /opt/cni:/opt/cni \\
-e CNI_IFNAME -e CNI_ARGS -e CNI_PATH \\
-v /etc/cni:/etc/cni -v /opt/cni:/opt/cni \$EXTRA_VOLUMES \\
$PLUGIN_IMAGE $COVERAGE_ARGS $2
EOF
chmod a+x "$1"
Expand Down

0 comments on commit afc6f49

Please sign in to comment.