Skip to content

Commit

Permalink
Remove rootless functionality
Browse files Browse the repository at this point in the history
- [x] Read the [Contributing document](../blob/-/.github/CONTRIBUTING.md).

Summary
---------------
Remove rootless functionality and tests. This abondoned feature was
broken when deployed.

Context: cloudfoundry/garden-runc-release#196

Backward Compatibility
---------------
Breaking Change? **Yes**

Remove rootless functionality

Signed-off-by: Amin Jamali <[email protected]>
  • Loading branch information
MarcPaquette authored and winkingturtle-vmw committed Apr 19, 2024
1 parent 8e03e16 commit 4c7e9b8
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 465 deletions.
26 changes: 0 additions & 26 deletions gqt/gqt_suite_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,21 @@
package gqt_test

import (
"os"
"strconv"

"code.cloudfoundry.org/garden"
"code.cloudfoundry.org/guardian/gqt/runner"
. "github.com/onsi/gomega"
)

var (
// the unprivileged user is baked into the cloudfoundry/garden-runc-release image
unprivilegedUID = uint32(5000)
unprivilegedGID = uint32(5000)
)

func restartGarden(client *runner.RunningGarden, config runner.GdnRunnerConfig) *runner.RunningGarden {
Expect(client.Ping()).To(Succeed(), "tried to restart garden while it was not running")
Expect(client.Stop()).To(Succeed())
return runner.Start(config)
}

func idToStr(id uint32) string {
return strconv.FormatUint(uint64(id), 10)
}

func removeSocket() {
_, err := os.Stat(config.BindSocket)
if err == nil {
Expect(os.Remove(config.BindSocket)).To(Succeed())
} else if !os.IsNotExist(err) {
Expect(err).NotTo(HaveOccurred())
}
}

func createRootfsTar(modifyRootfs func(string)) string {
return tarUpDir(createRootfs(modifyRootfs, 0755))
}

func uint32ptr(i uint32) *uint32 {
return &i
}

func runInContainer(container garden.Container, path string, args []string) {
runInContainerWithIO(container, ginkgoIO, path, args)
}
Loading

0 comments on commit 4c7e9b8

Please sign in to comment.