livepatch is not able to enabled

Bug #1960689 reported by Gene Sun
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-advantage-tools (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I tried to enable livepatch without any success.

root@plis231v:~# sudo ua enable livepatch
One moment, checking your subscription first
Unexpected error(s) occurred.
For more details, see the log: /var/log/ubuntu-advantage.log
To file a bug run: ubuntu-bug ubuntu-advantage-tools

>> logs

22-02-11 22:27:00,410 - util.py:(429) [DEBUG]: Reading file: /var/lib/ubuntu-advantage/notices.json
2022-02-11 22:27:00,410 - util.py:(700) [DEBUG]: Writing file: /var/lib/ubuntu-advantage/notices.json
2022-02-11 22:27:00,411 - cli.py:(1499) [ERROR]: Unhandled exception, please file a bug
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 1458, in wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 1544, in main
    return args.action(args, cfg=cfg)
  File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 166, in new_f
    return f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 189, in new_f
    return f(args, cfg=cfg, **kwargs)
  File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 147, in new_f
    retval = f(*args, cfg=cfg, **kwargs)
  File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 888, in action_enable
    ent_ret, reason = entitlement.enable()
  File "/usr/lib/python3/dist-packages/uaclient/entitlements/base.py", line 197, in enable
    ret = self._perform_enable(silent=silent)
  File "/usr/lib/python3/dist-packages/uaclient/entitlements/livepatch.py", line 160, in _perform_ena
    [snap.SNAP_CMD, "wait", "system", "seed.loaded"], capture=True
  File "/usr/lib/python3/dist-packages/uaclient/util.py", line 662, in subp
    out, err = _subp(args, rcs, capture, timeout, env=env)
  File "/usr/lib/python3/dist-packages/uaclient/util.py", line 619, in _subp
    stderr=err.decode("utf-8"),
uaclient.util.ProcessExecutionError: Failed running command '/usr/bin/snap wait system seed.loaded' [sage: error: cannot communicate with server: Get http://localhost/v2/snaps/system/conf?keys=seed.load /run/snapd.socket: connect: no such file or directory

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: ubuntu-advantage-tools 27.4.1~16.04.1
ProcVersionSignature: Ubuntu 4.15.0-167.175~16.04.1-generic 4.15.18
Uname: Linux 4.15.0-167-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.30+esm3
Architecture: amd64
Date: Fri Feb 11 23:01:08 2022
InstallationDate: Installed on 2010-12-02 (4089 days ago)
InstallationMedia: Ubuntu-Server 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.2)
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: ubuntu-advantage-tools
UpgradeStatus: Upgraded to xenial on 2017-01-21 (1847 days ago)

Revision history for this message
Gene Sun (gsunipipeline) wrote :
Revision history for this message
Gene Sun (gsunipipeline) wrote :

root@plis231v:~# uname -a
Linux plis231v 4.15.0-167-generic #175~16.04.1-Ubuntu SMP Mon Jan 17 16:44:18 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
root@plis231v:~#
root@plis231v:~#
root@plis231v:~# sudo ua enable livepatch
One moment, checking your subscription first
Unexpected error(s) occurred.
For more details, see the log: /var/log/ubuntu-advantage.log
To file a bug run: ubuntu-bug ubuntu-advantage-tools
root@plis231v:~#
root@plis231v:~#
root@plis231v:~#
root@plis231v:~# ubuntu-bug ubuntu-advantage-tools

*** Collecting problem information

The collected information can be sent to the developers to improve the
application. This might take a few minutes.
........

*** Send problem report to the developers?

After the problem report has been sent, please fill out the form in the
automatically opened web browser.

What would you like to do? Your options are:
  S: Send report (5.6 KB)
  V: View report
  K: Keep report file for sending later or copying to somewhere else
  I: Cancel and ignore future crashes of this program version
  C: Cancel
Please choose (S/V/K/I/C): S

*** Uploading problem information

The collected information is being sent to the bug tracking system.
This might take a few minutes.
90%

*** To continue, you must visit the following URL:

  https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+filebug/710f8fc2-8bb8-11ec-b78d-40a8f0308420?

You can launch a browser now, or copy this URL into a browser on another computer.

Choices:
  1: Launch a browser now
  C: Cancel
Please choose (1/C): 1

Revision history for this message
Grant Orndorff (orndorffgrant) wrote :

Hello Gene Sun, thank you for taking the time to file a bug!

The livepatch service is installed as a snap when you run `ua enable livepatch`. It looks like the `snap` command is failing because the snapd.socket isn't available.

Can you verify that the snap service is working or not by running a snap command like `snap services`?

Revision history for this message
Gene Sun (gsunipipeline) wrote : RE: [Bug 1960689] Re: livepatch is not able to enabled
Download full text (5.6 KiB)

Here is what I saw. (I had reinstalled snap)

root@plis231v:~# snap services

error: cannot communicate with server: Get http://localhost/v2/apps?select=service: dial unix /run/snapd.socket: connect: no such file or directory

root@plis231v:~#

-----Original Message-----
From: <email address hidden> <email address hidden> On Behalf Of Grant Orndorff
Sent: Monday, February 14, 2022 1:54 PM
To: Gene Sun <email address hidden>
Subject: [Bug 1960689] Re: livepatch is not able to enabled

CAUTION: EXTERNAL EMAIL

Hello Gene Sun, thank you for taking the time to file a bug!

The livepatch service is installed as a snap when you run `ua enable livepatch`. It looks like the `snap` command is failing because the snapd.socket isn't available.

Can you verify that the snap service is working or not by running a snap command like `snap services`?

--

You received this bug notification because you are subscribed to the bug report.

https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugs.launchpad.net%2Fbugs%2F1960689&amp;data=04%7C01%7Cgsun%40ipipeline.com%7C3e181dee376048827e9d08d9efec511f%7C4adda90d810f42fc852f18ed6744d7b3%7C0%7C0%7C637804620527924141%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=XvcdaEP3%2BW9P5Xo01dtDrfknUZ0%2Fsj23FMZRDBeBEys%3D&amp;reserved=0

Title:

  livepatch is not able to enabled

Status in ubuntu-advantage-tools package in Ubuntu:

  New

Bug description:

  I tried to enable livepatch without any success.

  root@plis231v:~# sudo ua enable livepatch

  One moment, checking your subscription first

  Unexpected error(s) occurred.

  For more details, see the log: /var/log/ubuntu-advantage.log

  To file a bug run: ubuntu-bug ubuntu-advantage-tools

  >> logs

  22-02-11 22:27:00,410 - util.py:(429) [DEBUG]: Reading file: /var/lib/ubuntu-advantage/notices.json

  2022-02-11 22:27:00,410 - util.py:(700) [DEBUG]: Writing file: /var/lib/ubuntu-advantage/notices.json

  2022-02-11 22:27:00,411 - cli.py:(1499) [ERROR]: Unhandled exception, please file a bug

  Traceback (most recent call last):

    File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 1458, in wrapper

      return func(*args, **kwargs)

    File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 1544, in main

      return args.action(args, cfg=cfg)

    File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 166, in new_f

      return f(*args, **kwargs)

    File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 189, in new_f

      return f(args, cfg=cfg, **kwargs)

    File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 147, in new_f

      retval = f(*args, cfg=cfg, **kwargs)

    File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 888, in action_enable

      ent_ret, reason = entitlement.enable()

    File "/usr/lib/python3/dist-packages/uaclient/entitlements/base.py", line 197, in enable

      ret = self._perform_enable(silent=silent)

    File "/usr/lib/python3/dist-packages/uaclient/entitlements/livepatch.py", line 160, in _perform_ena

      [snap.SNAP_CMD, "wait", "system", "seed.loaded"], capture=Tru...

Read more...

Revision history for this message
Lucas Albuquerque Medeiros de Moura (lamoura) wrote :

Hello Gene Sun,

It seems there is something wrong if your snapd service.
What is the output of running:

$ systemctl status snapd

And if the service is not running, can you run:

$ systemctl start snapd.service

And double check if snap services is now running as expected ?

Revision history for this message
Gene Sun (gsunipipeline) wrote :
Download full text (5.5 KiB)

Snap doesn't seem work, any workaround?

root@plis231v:~# systemctl status snapd
Failed to get properties: No such interface ''
root@plis231v:~# systemctl start snapd.service
Failed to start snapd.service: Unknown unit: snapd.service
See system logs and 'systemctl status snapd.service' for details.
root@plis231v:~#

-----Original Message-----
From: <email address hidden> <email address hidden> On Behalf Of Lucas Albuquerque Medeiros de Moura
Sent: Tuesday, February 15, 2022 8:11 AM
To: Gene Sun <email address hidden>
Subject: [Bug 1960689] Re: livepatch is not able to enabled

CAUTION: EXTERNAL EMAIL

Hello Gene Sun,

It seems there is something wrong if your snapd service.
What is the output of running:

$ systemctl status snapd

And if the service is not running, can you run:

$ systemctl start snapd.service

And double check if snap services is now running as expected ?

--
You received this bug notification because you are subscribed to the bug report.
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugs.launchpad.net%2Fbugs%2F1960689&amp;data=04%7C01%7Cgsun%40ipipeline.com%7C0dcfb69159a34629aeef08d9f085fae3%7C4adda90d810f42fc852f18ed6744d7b3%7C0%7C0%7C637805280526405489%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=50KuzPBQWzrLLnk%2F2VLoKlgaC7wBoC4e0ZvO5vPcpS0%3D&amp;reserved=0

Title:
  livepatch is not able to enabled

Status in ubuntu-advantage-tools package in Ubuntu:
  New

Bug description:

  I tried to enable livepatch without any success.

  root@plis231v:~# sudo ua enable livepatch
  One moment, checking your subscription first
  Unexpected error(s) occurred.
  For more details, see the log: /var/log/ubuntu-advantage.log
  To file a bug run: ubuntu-bug ubuntu-advantage-tools

  >> logs

  22-02-11 22:27:00,410 - util.py:(429) [DEBUG]: Reading file: /var/lib/ubuntu-advantage/notices.json
  2022-02-11 22:27:00,410 - util.py:(700) [DEBUG]: Writing file: /var/lib/ubuntu-advantage/notices.json
  2022-02-11 22:27:00,411 - cli.py:(1499) [ERROR]: Unhandled exception, please file a bug
  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 1458, in wrapper
      return func(*args, **kwargs)
    File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 1544, in main
      return args.action(args, cfg=cfg)
    File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 166, in new_f
      return f(*args, **kwargs)
    File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 189, in new_f
      return f(args, cfg=cfg, **kwargs)
    File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 147, in new_f
      retval = f(*args, cfg=cfg, **kwargs)
    File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 888, in action_enable
      ent_ret, reason = entitlement.enable()
    File "/usr/lib/python3/dist-packages/uaclient/entitlements/base.py", line 197, in enable
      ret = self._perform_enable(silent=silent)
    File "/usr/lib/python3/dist-packages/uaclient/entitlements/livepatch.py", line 160, in _perform_ena
      [snap.SNAP_CMD, "wait", "system", "seed.loaded"], capture=True
    File "/usr/lib/python3/d...

Read more...

Revision history for this message
Lucas Albuquerque Medeiros de Moura (lamoura) wrote :

Hi Gene Sun,

This is a really odd issue and I have never experienced it before. I think the best path forward is to contact the snapd team and ask for help there, as this could be a bug on the package:
https://bugs.launchpad.net/ubuntu/+source/snapd

Since this is issue is snapd related, I am closing this issue for now. But if you are able to sort the snapd issue and livepatch still fails, please contact us again and we will more than glad to help you with that.

Changed in ubuntu-advantage-tools (Ubuntu):
status: New → Invalid
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.