diff options
| author | Paweł Stołowski <stolowski@gmail.com> | 2021-08-27 13:15:34 +0200 |
|---|---|---|
| committer | Paweł Stołowski <stolowski@gmail.com> | 2021-08-27 13:15:34 +0200 |
| commit | fe65e33ad6ea7a44d5390c93468c906ece18aec3 (patch) | |
| tree | d5fb84b8216c18b1fedf66b24a57f3ce489ed995 | |
| parent | 29b7271d42358a96a6b531e3081197ebce26640f (diff) | |
Set affectsPlugOnRefresh: true on network-control interface. Add TODO torefresh-control/ifaces-metadata
AffectsPlugOnRefresh docstring.
| -rw-r--r-- | interfaces/builtin/network_control.go | 4 | ||||
| -rw-r--r-- | interfaces/builtin/network_control_test.go | 1 | ||||
| -rw-r--r-- | interfaces/core.go | 3 |
3 files changed, 7 insertions, 1 deletions
diff --git a/interfaces/builtin/network_control.go b/interfaces/builtin/network_control.go index 361c3fac8d..4703e6f572 100644 --- a/interfaces/builtin/network_control.go +++ b/interfaces/builtin/network_control.go @@ -346,6 +346,8 @@ func init() { connectedPlugUpdateNSAppArmor: networkControlConnectedPlugUpdateNSAppArmor, suppressPtraceTrace: true, - }) + // affects the plug snap because of mount backend + affectsPlugOnRefresh: true, + }) } diff --git a/interfaces/builtin/network_control_test.go b/interfaces/builtin/network_control_test.go index bd7d6529f2..377c1e5282 100644 --- a/interfaces/builtin/network_control_test.go +++ b/interfaces/builtin/network_control_test.go @@ -131,6 +131,7 @@ func (s *NetworkControlInterfaceSuite) TestStaticInfo(c *C) { c.Assert(si.ImplicitOnClassic, Equals, true) c.Assert(si.Summary, Equals, `allows configuring networking and network namespaces`) c.Assert(si.BaseDeclarationSlots, testutil.Contains, "network-control") + c.Assert(si.AffectsPlugOnRefresh, Equals, true) } func (s *NetworkControlInterfaceSuite) TestAutoConnect(c *C) { diff --git a/interfaces/core.go b/interfaces/core.go index 1f16a7936c..d51f5a89c1 100644 --- a/interfaces/core.go +++ b/interfaces/core.go @@ -204,6 +204,9 @@ type StaticInfo struct { // due to e.g. namespace changes which require freezing and thawing of the // running processes. This flag is consulted when computing snaps affected // by refresh for auto-refresh gating with gate-auto-refresh hooks. + // TODO: if we change the snap-update-ns logic to avoid the freezeing/thawing + // if there are no changes, there are interfaces like appstream-metadata or + // system-packages-doc that could get the flag set back to false. AffectsPlugOnRefresh bool `json:"affects-plug-on-refresh,omitempty"` // BaseDeclarationPlugs defines an optional extension to the base-declaration assertion relevant for this interface. |
