~mvo/snapd/+git/snapd-mvo:auto-install-snapd-when-needed-2.39

Last commit made on 2019-05-02
Get this branch:
git clone -b auto-install-snapd-when-needed-2.39 https://git.launchpad.net/~mvo/snapd/+git/snapd-mvo

Branch merges

Branch information

Name:
auto-install-snapd-when-needed-2.39
Repository:
lp:~mvo/snapd/+git/snapd-mvo

Recent commits

e4f6cc0... by Michael Vogt

snapstate: update snapd auto-install code for 2.39

18eedcc... by Michael Vogt

snapstate: auto-install snapd when needed

* snapstate: auto-install snapd when needed

When installing a snap that does not require "core" on a fresh
system, currently we do nothing special. This means however that
on such systems there is no "core" or "snapd" snap installed.

This means that no system interfaces are available. This PR
fixes this by auto-installing the snapd snap if its missing.

As a side effect, "snap install snapd" on classic is no longer
blocked (it still is on core).

* snapstate: add more tests for snapd auto-install with core18/other-bases

* snapstate: rework the check if the snapd snap can be installed on a Core system

* snapstate: use isInstalled instead of {snapd,core}SnapInstalled

* snapstate: update doInstall now that the "snapd" install check moved to checkInstallPreconditions

a9b5d08... by Paweł Stołowski

Update static attributes of "content" interface connetions kept in the state when reloading connections.
This is a temporary fix for LP #1825883 and it is limited to "content" interface as this is the only interface where the problem is visible.
The proper fix will be proposed soon and will address all interfaces.

4bfb5f5... by Zygmunt Krynicki

overlord: use private YAML for TestDisconnectByHotplug

A number of tests reuse a "common" set of YAML documents that grew
organically and have lots of tentacles with quirky properties. An
upcoming change would start to detect those differences. As a step
towards cleaning that up, the various YAMLs are moving towards
individual tests where their content is close to the code using it,
making the test more readable and comprehensible.

This patch adjusts TestDisconnectByHotplug.

Signed-off-by: Zygmunt Krynicki <email address hidden>

22fd301... by Zygmunt Krynicki

overlord: use private YAML for TestManagerReloadsConnections

A number of tests reuse a "common" set of YAML documents that grew
organically and have lots of tentacles with quirky properties. An
upcoming change would start to detect those differences. As a step
towards cleaning that up, the various YAMLs are moving towards
individual tests where their content is close to the code using it,
making the test more readable and comprehensible.

This patch adjusts TestManagerReloadsConnections.

Signed-off-by: Zygmunt Krynicki <email address hidden>

cdf596e... by Zygmunt Krynicki

overlord: use private YAML for TestDisconnectByHotplug

A number of tests reuse a "common" set of YAML documents that grew
organically and have lots of tentacles with quirky properties. An
upcoming change would start to detect those differences. As a step
towards cleaning that up, the various YAMLs are moving towards
individual tests where their content is close to the code using it,
making the test more readable and comprehensible.

This patch adjusts TestDisconnectByHotplug.

Signed-off-by: Zygmunt Krynicki <email address hidden>

a6eda70... by Zygmunt Krynicki

overlord: use private YAML for TestDoRemove

A number of tests reuse a "common" set of YAML documents that grew
organically and have lots of tentacles with quirky properties. An
upcoming change would start to detect those differences. As a step
towards cleaning that up, the various YAMLs are moving towards
individual tests where their content is close to the code using it,
making the test more readable and comprehensible.

This patch adjusts TestDoRemove.

Signed-off-by: Zygmunt Krynicki <email address hidden>

440c7d0... by Zygmunt Krynicki

overlord: use private YAML for TestDisconnectUndo

A number of tests reuse a "common" set of YAML documents that grew
organically and have lots of tentacles with quirky properties. An
upcoming change would start to detect those differences. As a step
towards cleaning that up, the various YAMLs are moving towards
individual tests where their content is close to the code using it,
making the test more readable and comprehensible.

This patch adjusts TestDisconnectUndo.

Signed-off-by: Zygmunt Krynicki <email address hidden>

a205b92... by Michael Vogt

interfaces: add support for the snapd snap in the dbus backend

* interfaces: add support for the snapd snap in the dbus backend

When writing the userd service files we only looked at the core
snap so far. However when we transition to the snapd snap we
also need to look there for the right files.

* interfaces: ensure setupDbusServiceForUserd prefers the snapd snap

When both the core and the snapd snap are installed we need to
prefer the snapd snap or the content of the userd service file
will flip-flop.

* interfaces: add comment about racy setupDbusServiceForUserd

be3bf2a... by Paweł Stołowski

overlord/snapstate: tweak autorefresh logic if network is not available

* Handle auto-refresh error caused by network not being ready, e.g. on system startup. In such cases auto-refresh should not be considered as done and postponed till next scheduled time, but retried soon. Fixes LP:#1824226

* Handle UnretriedNetworkError in searchStore helper.

* Use override.conf to modify ExecLine of snapd.

* Do not hardcode /usr/lib/snapd/snapd path in the spread test when mainpulating service file. Disable ubuntu-14.04 for this test and enable core18

* Moved error inspection logic to two helpers (thanks mvo!) to have the code structured and more future-proof.

* Use type switch to simplify isNetworkDown check.

* Renamed UnretriedNetworkError to PersistentNetworkError. Reduced refreshRetryDelay to 20 minutes.