Skip to content

Commit

Permalink
Fix nsenter mounter in protokube
Browse files Browse the repository at this point in the history
We don't have any shared directories, and certainly not root!
  • Loading branch information
justinsb committed Oct 19, 2018
1 parent 0f5825f commit 568484f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions protokube/pkg/protokube/volume_mounter.go
Expand Up @@ -119,11 +119,11 @@ func (k *VolumeMountController) safeFormatAndMount(volume *Volume, mountpoint st
return fmt.Errorf("error building ns-enter object: %v", err)
}

// When used with kubelet, rootDir is supposed to be /var/lib/kubelet
rootDir := "/"
// This is a directory that is mounted identically on the container and the host; we don't have that.
sharedDir := "/no-shared-directories"

// Build mount & exec implementations that execute in the host namespaces
safeFormatAndMount.Interface = mount.NewNsenterMounter(rootDir, ne)
safeFormatAndMount.Interface = mount.NewNsenterMounter(sharedDir, ne)
safeFormatAndMount.Exec = NewNsEnterExec()

// Note that we don't use pathFor for operations going through safeFormatAndMount,
Expand Down

0 comments on commit 568484f

Please sign in to comment.