mirror of
https://github.com/containers/podman.git
synced 2025-12-08 14:48:48 +08:00
update buildah and c/common to latest
also includes bumps for c/storage and c/image Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
6
vendor/github.com/containers/common/pkg/cgroups/cgroups.go
generated
vendored
6
vendor/github.com/containers/common/pkg/cgroups/cgroups.go
generated
vendored
@@ -145,7 +145,7 @@ func getAvailableControllers(exclude map[string]controllerHandler, cgroup2 bool)
|
||||
}
|
||||
controllersFileBytes, err := ioutil.ReadFile(controllersFile)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed while reading controllers for cgroup v2 from %q: %w", controllersFile, err)
|
||||
return nil, fmt.Errorf("failed while reading controllers for cgroup v2: %w", err)
|
||||
}
|
||||
for _, controllerName := range strings.Fields(string(controllersFileBytes)) {
|
||||
c := controller{
|
||||
@@ -264,7 +264,7 @@ func (c *CgroupControl) initialize() (err error) {
|
||||
}()
|
||||
if c.cgroup2 {
|
||||
if err := createCgroupv2Path(filepath.Join(cgroupRoot, c.path)); err != nil {
|
||||
return fmt.Errorf("error creating cgroup path %s: %w", c.path, err)
|
||||
return fmt.Errorf("creating cgroup path %s: %w", c.path, err)
|
||||
}
|
||||
}
|
||||
for name, handler := range handlers {
|
||||
@@ -285,7 +285,7 @@ func (c *CgroupControl) initialize() (err error) {
|
||||
}
|
||||
path := c.getCgroupv1Path(ctr.name)
|
||||
if err := os.MkdirAll(path, 0o755); err != nil {
|
||||
return fmt.Errorf("error creating cgroup path for %s: %w", ctr.name, err)
|
||||
return fmt.Errorf("creating cgroup path for %s: %w", ctr.name, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
6
vendor/github.com/containers/common/pkg/cgroups/cgroups_linux.go
generated
vendored
6
vendor/github.com/containers/common/pkg/cgroups/cgroups_linux.go
generated
vendored
@@ -98,7 +98,7 @@ func getAvailableControllers(exclude map[string]controllerHandler, cgroup2 bool)
|
||||
}
|
||||
controllersFileBytes, err := ioutil.ReadFile(controllersFile)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed while reading controllers for cgroup v2 from %q: %w", controllersFile, err)
|
||||
return nil, fmt.Errorf("failed while reading controllers for cgroup v2: %w", err)
|
||||
}
|
||||
for _, controllerName := range strings.Fields(string(controllersFileBytes)) {
|
||||
c := controller{
|
||||
@@ -217,7 +217,7 @@ func (c *CgroupControl) initialize() (err error) {
|
||||
}()
|
||||
if c.cgroup2 {
|
||||
if err := createCgroupv2Path(filepath.Join(cgroupRoot, c.config.Path)); err != nil {
|
||||
return fmt.Errorf("error creating cgroup path %s: %w", c.config.Path, err)
|
||||
return fmt.Errorf("creating cgroup path %s: %w", c.config.Path, err)
|
||||
}
|
||||
}
|
||||
for name, handler := range handlers {
|
||||
@@ -238,7 +238,7 @@ func (c *CgroupControl) initialize() (err error) {
|
||||
}
|
||||
path := c.getCgroupv1Path(ctr.name)
|
||||
if err := os.MkdirAll(path, 0o755); err != nil {
|
||||
return fmt.Errorf("error creating cgroup path for %s: %w", ctr.name, err)
|
||||
return fmt.Errorf("creating cgroup path for %s: %w", ctr.name, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
2
vendor/github.com/containers/common/pkg/cgroups/cgroups_supported.go
generated
vendored
2
vendor/github.com/containers/common/pkg/cgroups/cgroups_supported.go
generated
vendored
@@ -80,7 +80,7 @@ func UserOwnsCurrentSystemdCgroup() (bool, error) {
|
||||
}
|
||||
s := st.Sys()
|
||||
if s == nil {
|
||||
return false, fmt.Errorf("error stat cgroup path %s", cgroupPath)
|
||||
return false, fmt.Errorf("stat cgroup path %s", cgroupPath)
|
||||
}
|
||||
|
||||
if int(s.(*syscall.Stat_t).Uid) != uid {
|
||||
|
||||
11
vendor/github.com/containers/common/pkg/cgroups/utils.go
generated
vendored
11
vendor/github.com/containers/common/pkg/cgroups/utils.go
generated
vendored
@@ -26,7 +26,7 @@ func readAcctList(ctr *CgroupControl, name string) ([]uint64, error) {
|
||||
p := filepath.Join(ctr.getCgroupv1Path(CPUAcct), name)
|
||||
data, err := ioutil.ReadFile(p)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("reading %s: %w", p, err)
|
||||
return nil, err
|
||||
}
|
||||
r := []uint64{}
|
||||
for _, s := range strings.Split(string(data), " ") {
|
||||
@@ -92,7 +92,12 @@ func cpusetCopyFileFromParent(dir, file string, cgroupv2 bool) ([]byte, error) {
|
||||
}
|
||||
data, err := ioutil.ReadFile(parentPath)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("open %s: %w", path, err)
|
||||
// if the file doesn't exist, it is likely that the cpuset controller
|
||||
// is not enabled in the kernel.
|
||||
if os.IsNotExist(err) {
|
||||
return nil, nil
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
if strings.Trim(string(data), "\n") != "" {
|
||||
return data, nil
|
||||
@@ -169,7 +174,7 @@ func (c *CgroupControl) createCgroupDirectory(controller string) (bool, error) {
|
||||
}
|
||||
|
||||
if err := os.MkdirAll(cPath, 0o755); err != nil {
|
||||
return false, fmt.Errorf("error creating cgroup for %s: %w", controller, err)
|
||||
return false, fmt.Errorf("creating cgroup for %s: %w", controller, err)
|
||||
}
|
||||
return true, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user