Creating focal-dev Starting focal-dev * Latest u-a-t is installed ########################################### ubuntu-advantage-tools: Installed: 31.2~20.04 Candidate: 31.2~20.04 Version table: *** 31.2~20.04 100 100 /var/lib/dpkg/status ########################################### * removing apparmor and rebooting ########################################### Reading package lists... Building dependency tree... Reading state information... The following package was automatically installed and is no longer required: squashfs-tools Use 'apt autoremove' to remove it. The following packages will be REMOVED: apparmor snapd 0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded. After this operation, 103 MB disk space will be freed. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 32194 files and directories currently installed.) Removing snapd (2.61.3+20.04) ... Stopping snap.lxd.activate.service Stopping unit snap.lxd.activate.service Waiting until unit snap.lxd.activate.service is stopped [attempt 1] snap.lxd.activate.service is stopped. Stopping snap.lxd.daemon.service Stopping unit snap.lxd.daemon.service Waiting until unit snap.lxd.daemon.service is stopped [attempt 1] snap.lxd.daemon.service is stopped. Stopping snap.lxd.daemon.unix.socket Stopping unit snap.lxd.daemon.unix.socket Waiting until unit snap.lxd.daemon.unix.socket is stopped [attempt 1] snap.lxd.daemon.unix.socket is stopped. Warning: Stopping snapd.service, but it can still be activated by: snapd.socket Removing apparmor (2.13.3-7ubuntu5.3) ... Processing triggers for man-db (2.9.1-1) ... Processing triggers for dbus (1.12.16-2ubuntu2.3) ... Processing triggers for mime-support (3.64ubuntu1) ... ########################################### * Confirming apt-news fails to start ########################################### Job for apt-news.service failed because the control process exited with error code. See "systemctl status apt-news.service" and "journalctl -xe" for details. * Exit status: 1 ● apt-news.service - Update APT News Loaded: loaded (/lib/systemd/system/apt-news.service; static; vendor preset: enabled) Active: failed (Result: exit-code) since Sun 2024-04-14 17:11:26 UTC; 57ms ago Process: 208 ExecStart=/usr/bin/python3 /usr/lib/ubuntu-advantage/apt_news.py (code=exited, status=231/APPARMOR) Main PID: 208 (code=exited, status=231/APPARMOR) CPU: 1ms Apr 14 17:11:26 focal-dev systemd[1]: Starting Update APT News... Apr 14 17:11:26 focal-dev systemd[208]: apt-news.service: Failed to prepare AppArmor profile change to ubuntu_pro_apt_news: No such file or directory Apr 14 17:11:26 focal-dev systemd[208]: apt-news.service: Failed at step APPARMOR spawning /usr/bin/python3: No such file or directory Apr 14 17:11:26 focal-dev systemd[1]: apt-news.service: Main process exited, code=exited, status=231/APPARMOR Apr 14 17:11:26 focal-dev systemd[1]: apt-news.service: Failed with result 'exit-code'. Apr 14 17:11:26 focal-dev systemd[1]: Failed to start Update APT News. * Exit status: 3 ########################################### * Installing update from proposed ########################################### deb http://archive.ubuntu.com/ubuntu focal-proposed main dpkg-preconfigure: unable to re-open stdin: No such file or directory ubuntu-advantage-tools: Installed: 31.2.2~20.04 Candidate: 31.2.2~20.04 Version table: *** 31.2.2~20.04 500 500 http://archive.ubuntu.com/ubuntu focal-proposed/main amd64 Packages 100 /var/lib/dpkg/status 31.2~20.04 500 500 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages 20.3 500 500 http://br.archive.ubuntu.com/ubuntu focal/main amd64 Packages 31.2.2~20.04 ########################################### * Confirming apt-news start without errors ########################################### + lxc exec focal-dev -- systemctl start apt-news.service + set +x * Exit status: 0 * Last 2-3 lines should show a successful start ########################################### ● apt-news.service - Update APT News Loaded: loaded (/lib/systemd/system/apt-news.service; static; vendor preset: enabled) Active: inactive (dead) Apr 14 17:11:26 focal-dev systemd[1]: Failed to start Update APT News. Apr 14 17:11:26 focal-dev systemd[1]: Starting Update APT News... Apr 14 17:11:26 focal-dev systemd[222]: apt-news.service: Failed to prepare AppArmor profile change to ubuntu_pro_apt_news: No such file or directory Apr 14 17:11:26 focal-dev systemd[222]: apt-news.service: Failed at step APPARMOR spawning /usr/bin/python3: No such file or directory Apr 14 17:11:26 focal-dev systemd[1]: apt-news.service: Main process exited, code=exited, status=231/APPARMOR Apr 14 17:11:26 focal-dev systemd[1]: apt-news.service: Failed with result 'exit-code'. Apr 14 17:11:26 focal-dev systemd[1]: Failed to start Update APT News. Apr 14 17:11:36 focal-dev systemd[1]: Starting Update APT News... Apr 14 17:11:36 focal-dev systemd[1]: apt-news.service: Succeeded. Apr 14 17:11:36 focal-dev systemd[1]: Finished Update APT News. ########################################### * And they do! :) * Reinstalling apparmor and reboot ########################################### Reading package lists... Building dependency tree... Reading state information... The following package was automatically installed and is no longer required: squashfs-tools Use 'apt autoremove' to remove it. Suggested packages: apparmor-profiles-extra apparmor-utils The following NEW packages will be installed: apparmor 0 upgraded, 1 newly installed, 0 to remove and 27 not upgraded. Need to get 505 kB of archives. After this operation, 2025 kB of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu focal-proposed/main amd64 apparmor amd64 2.13.3-7ubuntu5.4 [505 kB] dpkg-preconfigure: unable to re-open stdin: No such file or directory Fetched 505 kB in 1s (408 kB/s) Selecting previously unselected package apparmor. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 32075 files and directories currently installed.) Preparing to unpack .../apparmor_2.13.3-7ubuntu5.4_amd64.deb ... Unpacking apparmor (2.13.3-7ubuntu5.4) ... Setting up apparmor (2.13.3-7ubuntu5.4) ... Reloading AppArmor profiles Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd Processing triggers for man-db (2.9.1-1) ... Processing triggers for systemd (245.4-4ubuntu3.23) ... ########################################### * Confirm apt-news profile is loaded and in enforce mode ########################################### ubuntu_pro_apt_news (enforce) ########################################### * Confirm apt-news.service starts without errors * Confirming apt-news start without errors ########################################### + lxc exec focal-dev -- systemctl start apt-news.service + set +x * Exit status: 0 * Last 2-3 lines should show a successful start ########################################### ● apt-news.service - Update APT News Loaded: loaded (/lib/systemd/system/apt-news.service; static; vendor preset: enabled) Active: inactive (dead) Apr 14 17:11:47 focal-dev systemd[1]: Starting Update APT News... Apr 14 17:11:47 focal-dev systemd[1]: apt-news.service: Succeeded. Apr 14 17:11:47 focal-dev systemd[1]: Finished Update APT News. ########################################### * And they do! :) * Hack apt-news.service to sleep so we can check confinement ########################################### ExecStart=/usr/bin/python3 -c "import time;time.sleep(500)" ########################################### * Start apt-news in the background, and check if the process is confined ########################################### ubuntu_pro_apt_news (enforce) root 255 0.0 0.0 15904 9216 ? Ss 17:11 0:00 /usr/bin/python3 -c import time;time.sleep(500) ###########################################