Skip to content
Commits on Source (4)
# Gitaly changelog
## 16.2.5 (2023-08-31)
No changes.
## 16.2.4 (2023-08-11)
No changes.
......
16.2.4
\ No newline at end of file
16.2.5
\ No newline at end of file
......@@ -42,7 +42,9 @@ type Manager interface {
// NewManager returns the appropriate Cgroups manager
func NewManager(cfg cgroups.Config, pid int) Manager {
if cfg.Repositories.Count > 0 {
return newCgroupManager(cfg, pid)
if manager := newCgroupManager(cfg, pid); manager != nil {
return manager
}
}
return &NoopManager{}
......
......@@ -49,7 +49,8 @@ func newCgroupManagerWithMode(cfg cgroupscfg.Config, pid int, mode cgrps.CGMode)
handler = newV2Handler(cfg, pid)
log.Warnf("Gitaly now includes experimental support for CgroupV2. Please proceed with caution and use this experimental feature at your own risk")
default:
log.Fatalf("unknown cgroup version")
log.Warnf("Gitaly has encountered an issue while trying to detect the version of the system's cgroup. As a result, all subsequent commands will be executed without cgroup support. Please check the system's cgroup configuration and try again")
return nil
}
return &CGroupManager{
......@@ -172,6 +173,5 @@ func pruneOldCgroupsWithMode(cfg cgroupscfg.Config, logger log.FieldLogger, mode
case cgrps.Unified:
pruneOldCgroupsV2(cfg, logger)
default:
log.Fatalf("unknown cgroup version")
}
}
......@@ -42,6 +42,8 @@ func TestNewManagerV1(t *testing.T) {
require.IsType(t, &cgroupV1Handler{}, manager.handler)
manager = newCgroupManagerWithMode(cfg, 1, cgrps.Hybrid)
require.IsType(t, &cgroupV1Handler{}, manager.handler)
manager = newCgroupManagerWithMode(cfg, 1, cgrps.Unavailable)
require.Nil(t, manager)
}
func TestSetup_ParentCgroups(t *testing.T) {
......