Cant enable ua from GUI, works from CLI

Bug #1972809 reported by cm-t πŸ¦„πŸ‚πŸŒˆπŸŽ΅
38
This bug affects 5 people
Affects Status Importance Assigned to Milestone
ubuntu-advantage-desktop-daemon (Ubuntu)
Fix Released
High
Sebastien Bacher
Jammy
Fix Released
High
Sebastien Bacher

Bug Description

* Impact

Livepatch can't be enabled from software-properties-gtk

* Test Case

Try to attach your machine to an UA token from the livepatch tab from software-properties-gtk

Before the fix it was displayed an error message in red, with the fix it should display livepatch as activated

* Regression potential

The change reduces the hardening in the systemd unit which isn't optimal but is needed, the details of the change is on https://github.com/canonical/ubuntu-advantage-desktop-daemon/pull/15

What could go wrong would be if one of the changes were incorrect and leading to restrict an access allowed before, if that was the case ua could end up not being able to perform some of the actions needed

------------------------------

Hi,

I have the same UI red message when tryng to enable ua from the GUI on a 22.04 LTS fresh install:

https://askubuntu.com/questions/1403568/can-not-enable-livepatch-service-on-22-04

Step to reproduce:

 1 : open the GUI, a link to get the token is displayed ( https://ubuntu.com/advantage )
 2 : I copy past the token into the prompted field
 3 : The GUI says it is successfuly linked, but can't activate livepatch
 4 : Checking on the advantage page, only 1 active device out of a max of 3
 5 : I rebooted (to make sure it wasn't something due with the linux-firmware update just received few minutes earlier) and tryed again from the GUI: says device is linked, but using the switch on button doesnt enable successfuly livepatch
 6 : I use the anwser from the previous askubuntu link ( `sudo ua enable livepatch` )
 7 : it says it was enabled with success, top icon appear, a shield with a green check, opening the GUI says it is well enabled,

expected result:

on step 3 it should had work as same it worked from CLI and jump to step 7 (success)

note: note sure I reported it against the right package, sorry if that's the case, tryed ubuntu-bug ua, didnt worked, i just picked the first package in launchpad talking about advantage

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: ubuntu-advantage-tools 27.8~22.04.1
ProcVersionSignature: Ubuntu 5.15.0-27.28-generic 5.15.30
Uname: Linux 5.15.0-27-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu82
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Tue May 10 10:57:23 2022
InstallationDate: Installed on 2022-04-29 (10 days ago)
InstallationMedia: Ubuntu 22.04 LTS "Jammy Jellyfish" - Release amd64 (20220419)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
SourcePackage: ubuntu-advantage-tools
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
cm-t πŸ¦„πŸ‚πŸŒˆπŸŽ΅ (cm-t) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Confirmed, /var/log/ubuntu-advantage.log has

2022-05-10 11:17:23,560 - util.py:(596) [DEBUG]: Ran cmd: /usr/bin/snap wait system seed.loaded, rc: 0 stderr: b''
2022-05-10 11:17:23,613 - util.py:(640) [DEBUG]: Failed running command '/snap/bin/canonical-livepatch config remote-server=https://livepatch.canonical.com' [exit(1)]. Message: cmd_run.go:1044: WARNING: cannot create user data directory: cannot create snap home dir: mkdir /root/snap: read-only file system
cannot join mount namespace of pid 1: Operation not permitted

2022-05-10 11:17:23,613 - util.py:(642) [WARNING]: Stderr: cmd_run.go:1044: WARNING: cannot create user data directory: cannot create snap home dir: mkdir /root/snap: read-only file system
cannot join mount namespace of pid 1: Operation not permitted

Changed in ubuntu-advantage-tools (Ubuntu):
importance: Undecided → High
tags: added: rls-jj-incoming
Revision history for this message
Sebastien Bacher (seb128) wrote :
Changed in ubuntu-advantage-tools (Ubuntu):
status: New → In Progress
affects: ubuntu-advantage-tools (Ubuntu) → ubuntu-advantage-desktop-daemon (Ubuntu)
Changed in ubuntu-advantage-desktop-daemon (Ubuntu):
assignee: nobody → Sebastien Bacher (seb128)
Changed in ubuntu-advantage-desktop-daemon (Ubuntu):
status: In Progress → Fix Committed
description: updated
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello cm-t, or anyone else affected,

Accepted ubuntu-advantage-desktop-daemon into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-advantage-desktop-daemon/1.9~22.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in ubuntu-advantage-desktop-daemon (Ubuntu Jammy):
status: New → Fix Committed
tags: added: verification-needed verification-needed-jammy
Changed in ubuntu-advantage-desktop-daemon (Ubuntu Jammy):
assignee: nobody → Sebastien Bacher (seb128)
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-advantage-desktop-daemon - 1.9

---------------
ubuntu-advantage-desktop-daemon (1.9) kinetic; urgency=medium

  * src/ubuntu-advantage-desktop-daemon.service.in:
    - relax the hardening rules to fix livepatch and other services
      (lp: #1972809)

 -- Sebastien Bacher <email address hidden> Wed, 11 May 2022 12:47:28 +0200

Changed in ubuntu-advantage-desktop-daemon (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Sebastien Bacher (seb128) wrote :

Using 1.9~22.04.1 attaching the system to UA, enabling and disabling livepatch work as expected

tags: added: verification-done verification-done-jammy
removed: rls-jj-incoming verification-needed verification-needed-jammy
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-advantage-desktop-daemon - 1.9~22.04.1

---------------
ubuntu-advantage-desktop-daemon (1.9~22.04.1) jammy; urgency=medium

  * src/ubuntu-advantage-desktop-daemon.service.in:
    - relax the hardening rules to fix livepatch and other services
      (lp: #1972809)

 -- Sebastien Bacher <email address hidden> Wed, 11 May 2022 12:53:07 +0200

Changed in ubuntu-advantage-desktop-daemon (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for ubuntu-advantage-desktop-daemon has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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.