mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-29 16:57:18 +00:00
cgroups: quote some paths on errors.
Some errors propagate with printing showing a cgroup path. If for some reason this is empty is difficult to know looking at the logs. Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
This commit is contained in:
parent
6fdbef4ff5
commit
f45b2d9cc6
@ -1498,7 +1498,7 @@ func (c *Container) cgroupsDelete() error {
|
||||
}
|
||||
|
||||
if err := cgroup.Delete(); err != nil {
|
||||
return fmt.Errorf("Could not delete container cgroup %v: %v", c.state.CgroupPath, err)
|
||||
return fmt.Errorf("Could not delete container cgroup path='%v': error='%v'", c.state.CgroupPath, err)
|
||||
}
|
||||
|
||||
return nil
|
||||
@ -1519,7 +1519,7 @@ func (c *Container) cgroupsUpdate(resources specs.LinuxResources) error {
|
||||
|
||||
// update cgroup
|
||||
if err := cgroup.Update(&r); err != nil {
|
||||
return fmt.Errorf("Could not update cgroup %v: %v", c.state.CgroupPath, err)
|
||||
return fmt.Errorf("Could not update container cgroup path='%v': error='%v'", c.state.CgroupPath, err)
|
||||
}
|
||||
|
||||
// store new resources
|
||||
|
@ -1902,7 +1902,7 @@ func (s *Sandbox) cgroupsUpdate() error {
|
||||
}
|
||||
|
||||
if err := cgroup.Update(&resources); err != nil {
|
||||
return fmt.Errorf("Could not update cgroup %v: %v", s.state.CgroupPath, err)
|
||||
return fmt.Errorf("Could not update sandbox cgroup path='%v' error='%v'", s.state.CgroupPath, err)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user