Pro livepatch unable to mount file

Bug #2066231 reported by SAHC
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Livepatch Client
New
Undecided
Unassigned
snapd
New
Undecided
Unassigned
ubuntu-advantage-tools (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

Livepatch can't startup properly.
Message:
NOTICES
Error running canonical-livepatch status:
cannot create mount point for file "/tmp/snap.rootfs_ECExQZ/README.md": Permission denied

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: ubuntu-advantage-tools 31.2.3~22.04
ProcVersionSignature: Ubuntu 6.5.0-35.35~22.04.1-generic 6.5.13
Uname: Linux 6.5.0-35-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Tue May 21 09:33:59 2024
InstallationDate: Installed on 2023-10-24 (209 days ago)
InstallationMedia: Ubuntu 22.04 LTS "Jammy Jellyfish" - Release amd64 (20220419)
PackageArchitecture: all
SourcePackage: ubuntu-advantage-tools
UpgradeStatus: No upgrade log present (probably fresh install)
apparmor_logs.txt:

cloud-id.txt-error: Invalid command specified 'cloud-id'.
livepatch-status.txt-error: Failed running command '/snap/bin/canonical-livepatch status' [exit(1)]. Message: cannot create mount point for file "/tmp/snap.rootfs_Ic09fz/README.md": Permission denied
uaclient.conf:
 contract_url: https://contracts.canonical.com
 log_level: debug

Revision history for this message
SAHC (sahcadmin) wrote :
Revision history for this message
Renan Rodrigo (renanrodrigo) wrote :

Hello, sahcadmin, thanks for reporting this bug.

It seems there is a problem in querying Livepatch status, so I'll be tagging the Livepatch team to take a look.

On the Pro Client's side the behavior seems to be correct, but I'll keep it as incomplete until we have more input.

information type: Private → Public
Changed in ubuntu-advantage-tools (Ubuntu):
status: New → Incomplete
tags: removed: need-amd64-retrace
Revision history for this message
Kian Parvin (kian-parvin) wrote :

Hello,

From the Livepatch side of things I can see that the error is coming from SnapD. It also exactly resembles this issue on the snapcraft forums https://forum.snapcraft.io/t/22-04-4-lts-snap-firefox-chromium-permission-problems/39627 (no solution there).

Does this problem occur with other snaps? I recommend first trying to uninstall and reinstall the Livepatch snap.

- sudo snap remove canonical-livepatch
- sudo snap install canonical-livepatch
- sudo pro enable livepatch

If the same problem reoccurs I think we need to follow up with Snap.

Revision history for this message
SAHC (sahcadmin) wrote :

Hi,

Thanks for the quick response.
I tried the uninstall / reinstall, but that didn't solve the problem.

I'm also not able to add the computer to our Ubuntu Landscape. When trying to register, it finishes with:
Traceback (most recent call last):
Failure: twisted.internet.error.ConnectError: An error occurred while connecting: 2: No such file or directory

I haven't had a problem with other snaps.

Revision history for this message
Kian Parvin (kian-parvin) wrote :

Okay let me follow this up with Snap developers and see if they can shed some insight, can you please share the output from `snap version` and I'll follow up in a few days.

I'm not sure on the Landscape issues, a Google shows two results that may be relevant to you,
https://askubuntu.com/questions/1217826/what-does-twisted-internet-error-connecterror-mean-when-i-connect-to-a-landscape
https://bugs.launchpad.net/landscape-client/+bug/1868730

Revision history for this message
SAHC (sahcadmin) wrote :

The output from snap version:
snap 2.63
snapd 2.63
series 16
ubuntu 22.04
kernel 6.5.0-35-generic

I fixed the problem with Landscape. Apparently it was a rights issue.
This did the trick:
sudo chown landscape:root /etc/landscape/client.conf
sudo chmod 600 /etc/landscape/client.conf
sudo chown landscape:root /var/lib/landscape/client/broker.bpickle
sudo chmod 600 /var/lib/landscape/client/broker.bpickle

Revision history for this message
Kian Parvin (kian-parvin) wrote :

Thanks for the info, I've involved SnapD as well. To gather some more information can you tell us more about the following,

- What is the environment of the machine? E.g. VM, bare metal, cloud, etc.
- What filesystem is used on the machine? The output of `df` should be sufficient here.

Revision history for this message
SAHC (sahcadmin) wrote :

It's a self-build machine (Intel® Xeon(R) CPU E5-2697 v2 @ 2.70GHz, NVIDIA GeForce RTX 3090 & NVIDIA GeForce GTX 1660 Ti, 64,0 GiB RAM, 1,0 TB Disk).

df output:
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 6574656 2604 6572052 1% /run
/dev/mapper/vgubuntu-root 957062368 57267484 851105120 7% /
tmpfs 32873272 53940 32819332 1% /dev/shm
tmpfs 5120 4 5116 1% /run/lock
efivarfs 128 57 67 46% /sys/firmware/efi/efivars
/dev/nvme0n1p2 1684592 481392 1099316 31% /boot
/dev/nvme0n1p1 523248 6220 517028 2% /boot/efi
tmpfs 6574652 11716 6562936 1% /run/user/1000

Somehow Livepatch seems to be working fine again now.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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