/usr/lib/snapd/snapd-apparmor: No such file or directory

Bug #1781919 reported by Francis Ginther
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
snapd (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

We have seen this issue in all cosmic cloud images built since July 7, 2018. This coincides with the promotion of version 2.34~pre1+18.10.2 to cosmic.

During boot, snapd.apparmor.service, fails to start with:

● snapd.apparmor.service - Load AppArmor profiles managed internally by snapd
   Loaded: loaded (/lib/systemd/system/snapd.apparmor.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2018-07-16 12:11:36 UTC; 1min 30s ago
  Process: 570 ExecStart=/usr/lib/snapd/snapd-apparmor start (code=exited, status=203/EXEC)
 Main PID: 570 (code=exited, status=203/EXEC)

Jul 16 12:11:36 cloudimg systemd[1]: Starting Load AppArmor profiles managed internally by snapd...
Jul 16 12:11:36 cloudimg systemd[570]: snapd.apparmor.service: Failed to execute command: No such file or directory
Jul 16 12:11:36 cloudimg systemd[570]: snapd.apparmor.service: Failed at step EXEC spawning /usr/lib/snapd/snapd-apparmor: No such file or directory
Jul 16 12:11:36 cloudimg systemd[1]: snapd.apparmor.service: Main process exited, code=exited, status=203/EXEC
Jul 16 12:11:36 cloudimg systemd[1]: snapd.apparmor.service: Failed with result 'exit-code'.
Jul 16 12:11:36 cloudimg systemd[1]: Failed to start Load AppArmor profiles managed internally by snapd.

Indeed, /usr/lib/snapd/snapd-apparmor, does not exist:

ubuntu@cloudimg:~$ file /usr/lib/snapd/snapd-apparmor
/usr/lib/snapd/snapd-apparmor: cannot open `/usr/lib/snapd/snapd-apparmor' (No such file or directory)

Here's the version installed:

ubuntu@cloudimg:~$ apt-cache policy snapd
snapd:
  Installed: 2.34~pre1+18.10.2
  Candidate: 2.34~pre1+18.10.2
  Version table:
 *** 2.34~pre1+18.10.2 500
        500 http://archive.ubuntu.com/ubuntu cosmic/main amd64 Packages
        100 /var/lib/dpkg/status

A failing cloud image is available at:
https://people.canonical.com/~fginther/images/bionic/20180715/livecd.ubuntu-cpc.img

A script for launching the image with kvm is available at:
https://people.canonical.com/~fginther/images/go

Revision history for this message
Oliver Grawert (ogra) wrote :

i see the same issue on UbuntuCore installs. It does not seem to cause any actual issues there though

Changed in snapd (Ubuntu):
status: New → Confirmed
Revision history for this message
Francis Ginther (fginther) wrote :

This is currently blocking automatic publication of cosmic daily cloud images. The automated tests check for a 'degraded boot' which this bug will cause.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I had a look at our packaging for snapd and we explicitly remove snapd.apparmor.service and the corresponding executable. This feels like a bug in cosmic packaging.

Please see this:
https://github.com/snapcore/snapd/blob/master/packaging/ubuntu-16.04/rules#L224

As an alternative just ship the /usr/lib/snapd/snapd-apparmor executable.

tags: added: id-5b4c8a94945cd28a6e68967e
tags: added: id-5b4e926166327e31e7c0b06a
Revision history for this message
Francis Ginther (fginther) wrote :

Our tests are passing again with snapd version 2.34.1+18.10.

Zygmunt Krynicki (zyga)
Changed in snapd (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
cariboo (cariboo) wrote :

I'm still having a problem updating. I get the following message on screen with the latest version of snapd:

sudo dpkg --configure -a
Setting up snapd (2.34.1+18.10) ...
snapd.snap-repair.service is a disabled or a static unit, not starting it.

snapd version:

sudo apt-cache policy snapd
[sudo] password for cariboo:
snapd:
  Installed: 2.34.1+18.10
  Candidate: 2.34.1+18.10
  Version table:
 *** 2.34.1+18.10 500
        500 http://ca.archive.ubuntu.com/ubuntu cosmic/main amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
cariboo (cariboo) wrote :

Additional info:

sudo systemctl status snapd.snap-repair.service
● snapd.snap-repair.service - Automatically fetch and run repair assertions
   Loaded: loaded (/lib/systemd/system/snapd.snap-repair.service; static; vendor
   Active: inactive (dead)
Condition: start condition failed at Sat 2018-07-21 11:28:33 PDT; 15s ago
           └─ ConditionKernelCommandLine=snap_core was not met
     Docs: man:snap(1)

Revision history for this message
Oliver Grawert (ogra) wrote :

@cariboo
this bug is about snapd.apparmor.service and snapd-apparmor, please file a new one...

Michael Vogt (mvo)
Changed in snapd (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.