snapd icon indicating copy to clipboard operation
snapd copied to clipboard

overlord, overlord/snapstate: install snapd on classic systems when m…

Open ernestl opened this issue 1 year ago • 0 comments

On classic systems always install snapd as prerequisite for any snap install.

Previously it was only installed on systems that do not have core installed already or to be installed as specified base. This change makes the experience of transitioning from re-executing snapd from core snap to re-executing snapd snap consistent for classic systems with core and those with other bases.

Importantly, for classic systems that, for whatever unlikely reason, had core installed first before automatic installation of snapd could happen, it now changes snapd upgrade path to not depend on core snap updates anymore, which is appropriate given its now in security only maintenance.

Approach for fixing unit tests: The simple change triggered a colourful explosion of unit test failures. The fixes can be grouped as follows:

  • Test with base setup with core snap and not snapd snap that broke because of unexpected presence of snapd that is automatically installed on classic systems
  • FIrst boot install failure with forever retries die to seed conflict error during prerequisite snapd install task prep

Opted to add snapd snap to baseMgrsSuite SetUpTest and snapmgrBaseTest SetUpTest to generally prevent automatic installation of snapd causing problems (lots of cases). For specific tests removed snapd to allow test to function as intended.

Jira: SNAPDENG-24011

ernestl avatar Jul 12 '24 07:07 ernestl