Skip to content

Commit

Permalink
many: remove robust-mount-namespace-updates experimental feature (#14117
Browse files Browse the repository at this point in the history
)

robust-mount-namespace-updates was not used anymore in any
code path.

Signed-off-by: Zeyad Gouda <[email protected]>
  • Loading branch information
ZeyadYasser authored Jan 30, 2025
1 parent 3e93828 commit 31518b0
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 25 deletions.
4 changes: 0 additions & 4 deletions cmd/snap-update-ns/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import (

update "github.com/snapcore/snapd/cmd/snap-update-ns"
"github.com/snapcore/snapd/dirs"
"github.com/snapcore/snapd/features"
"github.com/snapcore/snapd/logger"
"github.com/snapcore/snapd/osutil"
"github.com/snapcore/snapd/sandbox/cgroup"
Expand Down Expand Up @@ -169,9 +168,6 @@ func (s *mainSuite) TestRemovingSyntheticChanges(c *C) {
dirs.SetRootDir(c.MkDir())
defer dirs.SetRootDir("/")

c.Assert(os.MkdirAll(dirs.FeaturesDir, 0755), IsNil)
c.Assert(os.WriteFile(features.RobustMountNamespaceUpdates.ControlFile(), []byte(nil), 0644), IsNil)

// The snap `mysnap` no longer wishes to export it's usr/share/mysnap
// directory. All the synthetic changes that were associated with that mount
// entry can be discarded.
Expand Down
5 changes: 0 additions & 5 deletions features/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ const (
RefreshAppAwareness
// ClassicPreservesXdgRuntimeDir controls $XDG_RUNTIME_DIR in snaps with classic confinement.
ClassicPreservesXdgRuntimeDir
// RobustMountNamespaceUpdates controls how snap-update-ns updates existing mount namespaces.
RobustMountNamespaceUpdates
// UserDaemons controls availability of user mode service support.
UserDaemons
// DbusActivation controls whether snaps daemons can be activated via D-Bus
Expand Down Expand Up @@ -105,7 +103,6 @@ var featureNames = map[SnapdFeature]string{
RefreshAppAwareness: "refresh-app-awareness",

ClassicPreservesXdgRuntimeDir: "classic-preserves-xdg-runtime-dir",
RobustMountNamespaceUpdates: "robust-mount-namespace-updates",

UserDaemons: "user-daemons",
DbusActivation: "dbus-activation",
Expand Down Expand Up @@ -133,7 +130,6 @@ var featureNames = map[SnapdFeature]string{
var featuresEnabledWhenUnset = map[SnapdFeature]bool{
Layouts: true,
RefreshAppAwareness: true,
RobustMountNamespaceUpdates: true,
ClassicPreservesXdgRuntimeDir: true,
DbusActivation: true,
}
Expand All @@ -145,7 +141,6 @@ var featuresExported = map[SnapdFeature]bool{
ParallelInstances: true,

ClassicPreservesXdgRuntimeDir: true,
RobustMountNamespaceUpdates: true,
HiddenSnapDataHomeDir: true,
MoveSnapHomeDir: true,

Expand Down
4 changes: 0 additions & 4 deletions features/features_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ func (*featureSuite) TestName(c *C) {
check(features.PerUserMountNamespace, "per-user-mount-namespace")
check(features.RefreshAppAwareness, "refresh-app-awareness")
check(features.ClassicPreservesXdgRuntimeDir, "classic-preserves-xdg-runtime-dir")
check(features.RobustMountNamespaceUpdates, "robust-mount-namespace-updates")
check(features.UserDaemons, "user-daemons")
check(features.DbusActivation, "dbus-activation")
check(features.HiddenSnapDataHomeDir, "hidden-snap-folder")
Expand Down Expand Up @@ -92,7 +91,6 @@ func (*featureSuite) TestIsExported(c *C) {
check(features.PerUserMountNamespace, true)
check(features.RefreshAppAwareness, true)
check(features.ClassicPreservesXdgRuntimeDir, true)
check(features.RobustMountNamespaceUpdates, true)
check(features.UserDaemons, false)
check(features.DbusActivation, false)
check(features.HiddenSnapDataHomeDir, true)
Expand Down Expand Up @@ -218,7 +216,6 @@ func (*featureSuite) TestIsEnabledWhenUnset(c *C) {
check(features.PerUserMountNamespace, false)
check(features.RefreshAppAwareness, true)
check(features.ClassicPreservesXdgRuntimeDir, true)
check(features.RobustMountNamespaceUpdates, true)
check(features.UserDaemons, false)
check(features.DbusActivation, true)
check(features.HiddenSnapDataHomeDir, false)
Expand All @@ -240,7 +237,6 @@ func (*featureSuite) TestControlFile(c *C) {
c.Check(features.PerUserMountNamespace.ControlFile(), Equals, "/var/lib/snapd/features/per-user-mount-namespace")
c.Check(features.RefreshAppAwareness.ControlFile(), Equals, "/var/lib/snapd/features/refresh-app-awareness")
c.Check(features.ParallelInstances.ControlFile(), Equals, "/var/lib/snapd/features/parallel-instances")
c.Check(features.RobustMountNamespaceUpdates.ControlFile(), Equals, "/var/lib/snapd/features/robust-mount-namespace-updates")
c.Check(features.HiddenSnapDataHomeDir.ControlFile(), Equals, "/var/lib/snapd/features/hidden-snap-folder")
c.Check(features.MoveSnapHomeDir.ControlFile(), Equals, "/var/lib/snapd/features/move-snap-home-dir")
c.Check(features.RefreshAppAwarenessUX.ControlFile(), Equals, "/var/lib/snapd/features/refresh-app-awareness-ux")
Expand Down
3 changes: 0 additions & 3 deletions tests/regression/lp-1844496/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ details: |
essence of a failure encountered in the field by a real snap application
package, in order to show that the failure no longer occurs.
Historically this test also enabled the robust-mount-namespace-updates feature,
but it is now enabled by default.
This test is related to lp-1844496, lp-1852361 and lp-1867193.
prepare: |
Expand Down
3 changes: 0 additions & 3 deletions tests/regression/lp-1852361/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ details: |
essence of a failure encountered in the field by a real snap application
package, in order to show that the failure no longer occurs.
Historically this test also enabled the robust-mount-namespace-updates feature,
but it is now enabled by default.
This test is related to lp-1844496, lp-1852361 and lp-1867193.
environment:
Expand Down
3 changes: 0 additions & 3 deletions tests/regression/lp-1867193/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ details: |
essence of a failure encountered in the field by a real snap application
package, in order to show that the failure no longer occurs.
Historically this test also enabled the robust-mount-namespace-updates feature,
but it is now enabled by default.
This test is related to lp-1844496, lp-1852361 and lp-1867193.
systems: [ubuntu-18.04-64] # tight coupling with container guest
Expand Down
3 changes: 0 additions & 3 deletions tests/regression/lp-1867752/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ details: |
namespace updates was made aware of that corner-case and the error would
not longer cause issues with snap package removal.
Historically this test also enabled the robust-mount-namespace-updates feature,
but it is now enabled by default.
systems: [ubuntu-18.04-64] # tight coupling with container guest

prepare: |
Expand Down

0 comments on commit 31518b0

Please sign in to comment.