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.
The symlinks in the libc6 package for the 64 bit loaders are
absolute and point to the real system. We need symlinks relative
to the snapd rootfs. This PR fixes the links inside the snap
to be relative.
make the changes smaller at this stage, is better to explicitly pass the correct deviceCtx as needed that a dummy one inconditionally, simplify some test setup/teardown as well