Creating bionic-dev Starting bionic-dev dpkg-preconfigure: unable to re-open stdin: No such file or directory * Latest u-a-t is installed ########################################### ubuntu-advantage-tools: Installed: 31.2~18.04 Candidate: 31.2~18.04 Version table: *** 31.2~18.04 500 500 http://br.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages 100 /var/lib/dpkg/status 17 500 500 http://br.archive.ubuntu.com/ubuntu bionic/main amd64 Packages ########################################### * removing apparmor and rebooting ########################################### Reading package lists... Building dependency tree... Reading state information... The following packages were automatically installed and are no longer required: efibootmgr libefiboot1 libefivar1 libfreetype6 Use 'apt autoremove' to remove them. The following packages will be REMOVED: apparmor snapd 0 upgraded, 0 newly installed, 2 to remove and 6 not upgraded. After this operation, 173 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 ... 29294 files and directories currently installed.) Removing snapd (2.58+18.04.1) ... Warning: Stopping snapd.service, but it can still be activated by: snapd.socket Removing apparmor (2.12-4ubuntu5.1) ... Processing triggers for man-db (2.8.3-2ubuntu0.1) ... Processing triggers for dbus (1.12.2-1ubuntu1.4) ... Processing triggers for mime-support (3.60ubuntu1) ... ########################################### * 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:14:18 UTC; 43ms ago Process: 187 ExecStart=/usr/bin/python3 /usr/lib/ubuntu-advantage/apt_news.py (code=exited, status=231/APPARMOR) Main PID: 187 (code=exited, status=231/APPARMOR) Apr 14 17:14:18 bionic-dev systemd[1]: Starting Update APT News... Apr 14 17:14:18 bionic-dev systemd[187]: apt-news.service: Failed to prepare AppArmor profile change to ubuntu_pro_apt_news: No such file or directory Apr 14 17:14:18 bionic-dev systemd[187]: apt-news.service: Failed at step APPARMOR spawning /usr/bin/python3: No such file or directory Apr 14 17:14:18 bionic-dev systemd[1]: apt-news.service: Main process exited, code=exited, status=231/APPARMOR Apr 14 17:14:18 bionic-dev systemd[1]: apt-news.service: Failed with result 'exit-code'. Apr 14 17:14:18 bionic-dev systemd[1]: Failed to start Update APT News. * Exit status: 3 ########################################### * Installing update from proposed ########################################### deb http://archive.ubuntu.com/ubuntu bionic-proposed main dpkg-preconfigure: unable to re-open stdin: No such file or directory ubuntu-advantage-tools: Installed: 31.2.2~18.04 Candidate: 31.2.2~18.04 Version table: *** 31.2.2~18.04 500 500 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 Packages 100 /var/lib/dpkg/status 31.2~18.04 500 500 http://br.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages 17 500 500 http://br.archive.ubuntu.com/ubuntu bionic/main amd64 Packages 31.2.2~18.04 ########################################### * Confirming apt-news start without errors ########################################### + lxc exec bionic-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:14:18 bionic-dev systemd[1]: apt-news.service: Failed with result 'exit-code'. Apr 14 17:14:18 bionic-dev systemd[1]: Failed to start Update APT News. Apr 14 17:14:18 bionic-dev systemd[1]: Starting Update APT News... Apr 14 17:14:18 bionic-dev systemd[201]: apt-news.service: Failed to prepare AppArmor profile change to ubuntu_pro_apt_news: No such file or directory Apr 14 17:14:18 bionic-dev systemd[201]: apt-news.service: Failed at step APPARMOR spawning /usr/bin/python3: No such file or directory Apr 14 17:14:18 bionic-dev systemd[1]: apt-news.service: Main process exited, code=exited, status=231/APPARMOR Apr 14 17:14:18 bionic-dev systemd[1]: apt-news.service: Failed with result 'exit-code'. Apr 14 17:14:18 bionic-dev systemd[1]: Failed to start Update APT News. Apr 14 17:14:23 bionic-dev systemd[1]: Starting Update APT News... Apr 14 17:14:23 bionic-dev systemd[1]: Started Update APT News. ########################################### * And they do! :) * Reinstalling apparmor and reboot ########################################### Reading package lists... Building dependency tree... Reading state information... The following packages were automatically installed and are no longer required: efibootmgr libefiboot1 libefivar1 libfreetype6 Use 'apt autoremove' to remove them. Suggested packages: apparmor-profiles-extra apparmor-utils The following NEW packages will be installed: apparmor 0 upgraded, 1 newly installed, 0 to remove and 17 not upgraded. Need to get 488 kB of archives. After this operation, 1895 kB of additional disk space will be used. Get:1 http://br.archive.ubuntu.com/ubuntu bionic-updates/main amd64 apparmor amd64 2.12-4ubuntu5.3 [488 kB] dpkg-preconfigure: unable to re-open stdin: No such file or directory Fetched 488 kB in 0s (11.7 MB/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 ... 29166 files and directories currently installed.) Preparing to unpack .../apparmor_2.12-4ubuntu5.3_amd64.deb ... Unpacking apparmor (2.12-4ubuntu5.3) ... Setting up apparmor (2.12-4ubuntu5.3) ... Processing triggers for man-db (2.8.3-2ubuntu0.1) ... Processing triggers for ureadahead (0.100.0-21) ... Processing triggers for systemd (237-3ubuntu10.57) ... ########################################### * 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 bionic-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:14:32 bionic-dev systemd[1]: Starting Update APT News... Apr 14 17:14:32 bionic-dev systemd[1]: Started 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 308 0.0 0.0 38632 9600 ? Ss 17:14 0:00 /usr/bin/python3 -c import time;time.sleep(500) ###########################################