Skip to content

Commit d8a9697

Browse files
authored
Merge pull request #17581 from ameukam/custom-install-cgrougfs-mount
Install cgroupfs-mount for distros lower than Debian Trixie
2 parents 7850359 + b336829 commit d8a9697

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

nodeup/pkg/model/packages.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ func (b *PackagesBuilder) Build(c *fi.NodeupModelBuilderContext) error {
4040
if b.Distribution.IsDebianFamily() {
4141
// From containerd: https://github.com/containerd/cri/blob/master/contrib/ansible/tasks/bootstrap_ubuntu.yaml
4242
c.AddTask(&nodetasks.Package{Name: "bridge-utils"})
43-
c.AddTask(&nodetasks.Package{Name: "cgroupfs-mount"})
43+
if (b.Distribution.IsDebian() && b.Distribution.Version() < 13) || (b.Distribution.IsUbuntu() && b.Distribution.Version() < 25.10) {
44+
c.AddTask(&nodetasks.Package{Name: "cgroupfs-mount"})
45+
}
4446
c.AddTask(&nodetasks.Package{Name: "conntrack"})
4547
c.AddTask(&nodetasks.Package{Name: "ebtables"})
4648
c.AddTask(&nodetasks.Package{Name: "ethtool"})

util/pkg/distributions/distributions.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ func (d *Distribution) IsDebianFamily() bool {
6868
return d.packageFormat == "deb"
6969
}
7070

71+
// IsDebian returns true if this distribution is Debian
72+
func (d *Distribution) IsDebian() bool {
73+
return d.project == "debian"
74+
}
75+
7176
// IsUbuntu returns true if this distribution is Ubuntu (but not debian)
7277
func (d *Distribution) IsUbuntu() bool {
7378
return d.project == "ubuntu"

0 commit comments

Comments
 (0)