[Bug 1927029] Re: ua attach command fails

2021-05-17 Thread Richard Harding
** Changed in: ubuntu-advantage-tools (Ubuntu)
   Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1927029] Re: ua attach command fails

2021-05-14 Thread Alex Trepca
Tried the cloud-init steps above on an instance and it worked; also
restarting a server fixed it, 'ua attach' reports as attached and 'ua
status' shows the enabled services.

I'll reach out to support to revoke the existing UA token.

Thanks for the help, this can be closed.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1927029] Re: ua attach command fails

2021-05-14 Thread Alex Trepca
How do I revoke the token? I never typed it in, the livepatch enable was
probably done as part of the "sudo ua attach $TOKEN" command, where I
used our token. I don't see any livepatch token in our Ubuntu Advantage
account, just for UA.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1927029] Re: ua attach command fails

2021-05-13 Thread Lucas Albuquerque Medeiros de Moura
Hi Alex, I think this error is happening because cloud-init has not
fully run. I think rebooting the machines would be enough to handle that
issue.

But if you don't want to do that, you can restart cloud-init manually by
running:

DI_LOG=stderr /usr/lib/cloud-init/ds-identify --force
cloud-init clean --logs
cloud-init init --local
cloud-init init > /dev/null
cloud-init modules --mode=config
cloud-init modules --mode=final
cloud-init status --wait --long

This will run all of the cloud-init modules. Let me know if that fix it.

Also, regarding the token, you will need to revoke it unfortunately :(

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1927029] Re: ua attach command fails

2021-05-13 Thread Alex Trepca
Hope the long string after "Ran cmd: /snap/bin/canonical-livepatch
enable $LONG_STRING" in the log above is not sensitive, if it is can
someone please remove it? Just noticed it, sorry.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1927029] Re: ua attach command fails

2021-05-13 Thread Alex Trepca
I take that back, on to something else:

$ sudo ua detach
Detach will disable the following services:
esm-infra
livepatch
Are you sure? (y/N) y
Updating package lists
This machine is now detached.

$ sudo ua attach 
Enabling default service esm-infra
Updating package lists
UA Infra: ESM enabled
Enabling default service livepatch
Canonical livepatch enabled.
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
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

Excerpt from the ubuntu-advantage.log file:

2021-05-13 14:49:53,778 - util.py:(414) [DEBUG]: Reading file: 
/var/lib/ubuntu-advantage/status.json
2021-05-13 14:49:53,779 - config.py:(357) [DEBUG]: File does not exist: 
/var/lib/ubuntu-advantage/status.json
2021-05-13 14:49:53,779 - config.py:(357) [DEBUG]: File does not exist: 
/var/lib/ubuntu-advantage/status.json
2021-05-13 14:49:53,784 - util.py:(414) [DEBUG]: Reading file: 
/var/lib/ubuntu-advantage/private/machine-token.json
2021-05-13 14:49:53,784 - util.py:(414) [DEBUG]: Reading file: 
/var/lib/ubuntu-advantage/private/machine-token.json
2021-05-13 14:49:53,885 - util.py:(572) [DEBUG]: Ran cmd: apt-cache policy, rc: 
0 stderr: b''
2021-05-13 14:49:53,885 - util.py:(572) [DEBUG]: Ran cmd: apt-cache policy, rc: 
0 stderr: b''
2021-05-13 14:49:53,887 - util.py:(414) [DEBUG]: Reading file: 
/var/lib/ubuntu-advantage/notices.json
2021-05-13 14:49:53,887 - util.py:(414) [DEBUG]: Reading file: 
/var/lib/ubuntu-advantage/notices.json
2021-05-13 14:49:53,888 - util.py:(646) [DEBUG]: Writing file: 
/var/lib/ubuntu-advantage/notices.json
2021-05-13 14:49:53,888 - util.py:(646) [DEBUG]: Writing file: 
/var/lib/ubuntu-advantage/notices.json
2021-05-13 14:49:53,888 - config.py:(672) [DEBUG]: Using UA client 
configuration file at /etc/ubuntu-advantage/uaclient.conf
2021-05-13 14:49:53,888 - config.py:(672) [DEBUG]: Using UA client 
configuration file at /etc/ubuntu-advantage/uaclient.conf
2021-05-13 14:49:53,889 - util.py:(414) [DEBUG]: Reading file: 
/etc/ubuntu-advantage/uaclient.conf
2021-05-13 14:49:53,889 - util.py:(414) [DEBUG]: Reading file: 
/etc/ubuntu-advantage/uaclient.conf
2021-05-13 14:49:54,176 - contract.py:(274) [ERROR]: Unexpected error 
processing contract delta for fips: {'entitlement': {'entitled': True, 
'affordances': {'architectures': ['amd64', 'ppc64el', 'ppc64le', 's390x', 
'x86_64'], 'series': ['xenial', 'bionic']}, 'type': 'fips', 'obligations': 
{'enableByDefault': False}, 'directives': {'aptKey': '', 
'additionalPackages': ['ubuntu-fips'], 'suites': ['xenial', 'bionic'], 
'aptURL': 'https://esm.ubuntu.com/fips'}}}
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/uaclient/contract.py", line 260, in 
process_entitlements_delta
series_overrides=series_overrides,
  File "/usr/lib/python3/dist-packages/uaclient/contract.py", line 330, in 
process_entitlement_delta
orig_access, deltas, allow_enable=allow_enable
  File "/usr/lib/python3/dist-packages/uaclient/entitlements/repo.py", line 
202, in process_contract_deltas
if super().process_contract_deltas(orig_access, deltas, allow_enable):
  File "/usr/lib/python3/dist-packages/uaclient/entitlements/base.py", line 
447, in process_contract_deltas
can_enable = self.can_enable(silent=True)
  File "/usr/lib/python3/dist-packages/uaclient/entitlements/base.py", line 
166, in can_enable
applicability_status, details = self.applicability_status()
  File "/usr/lib/python3/dist-packages/uaclient/entitlements/base.py", line 
263, in applicability_status
for error_message, functor, expected_result in self.static_affordances:
  File "/usr/lib/python3/dist-packages/uaclient/entitlements/fips.py", line 
267, in static_affordances
static_affordances = super().static_affordances
  File "/usr/lib/python3/dist-packages/uaclient/entitlements/fips.py", line 
113, in static_affordances
cloud_id = get_cloud_type() or ""
  File "/usr/lib/python3/dist-packages/uaclient/config.py", line 735, in new_f
return f()
  File "/usr/lib/python3/dist-packages/uaclient/clouds/identity.py", line 65, 
in get_cloud_type
out, _err = util.subp(["cloud-id"])
  File "/usr/lib/python3/dist-packages/uaclient/util.py", line 608, in subp
out, err = _subp(args, rcs, capture, timeout, env=env)
  File "/usr/lib/python3/dist-packages/uaclient/util.py", line 565, in _subp
stderr=err.decode("utf-8"),
uaclient.util.ProcessExecutionError: Failed running command 'cloud-id' 
[exit(1)]. Message: ERROR: File not found '/run/cloud-init/instance-data.json'. 
Provide a path to instance data json file using --instance-data

2021-05-13 14:49:54,176 - contract.py:(274) [ERROR]: Unexpected error 
processing contract delta for fips: {'entitlement': {'entitled': True, 
'affordances': {'architectures': ['amd64', 'ppc64el', 'ppc64le', 's390x',

[Bug 1927029] Re: ua attach command fails

2021-05-13 Thread Alex Trepca
I installed cloud-init version 21.1-19-gbad84ad4-0ubuntu1~16.04.2 on all
the instances that had the issue, and things are now fine. No idea why
they were stuck with the old cloud-init version, I'll look into that.

Thanks for the help,

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1927029] Re: ua attach command fails

2021-05-13 Thread Richard Harding
$ cloud-init --version
cloud-init 0.7.8

Can you give us more background on that image you're using? Cloud-init
went to an annual naming convention in 2017 e.g. 17.1, 17.2 and is up to
21.1 currently. That seems to me like you've got a VERY outdated cloud-
init on this system? It should have been upgraded through normal
security updates on the host.

I'm going to guess that getting that into a better place will help a lot
in this situation. We update cloud-init to help make sure it's working
well as the clouds update themselves.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1927029] Re: ua attach command fails

2021-05-12 Thread Alex Trepca
These log files exist:

$ ll /var/log/cloud*
-rw-r--r-- 1 syslog adm  379779 May 12 03:01 /var/log/cloud-init.log
-rw-r--r-- 1 root   root  65452 May 12 03:01 /var/log/cloud-init-output.log

They're filled with "IsADirectoryError: [Errno 21] Is a directory:
'/var/lib/cloud/instance'", I can attach them if needed.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1927029] Re: ua attach command fails

2021-05-12 Thread Alex Trepca
There's no collect-logs for the installed cloud-init version:

$ cloud-init collect-logs
usage: cloud-init [-h] [--version] [--file FILES] [--debug] [--force]
  {init,modules,query,single,dhclient-hook} ...
cloud-init: error: invalid choice: 'collect-logs' (choose from 'init', 
'modules', 'query', 'single', 'dhclient-hook')


$ cloud-init --version
cloud-init 0.7.8

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1927029] Re: ua attach command fails

2021-05-12 Thread Lucas Albuquerque Medeiros de Moura
Looking at the logs, I am seeing two distinct errors. One is livepatch
issue that we have:

Failed running command '/snap/bin/canonical-livepatch config remote-
server=https://livepatch.canonical.com' [exit(1)]. Message: 2021/05/04
15:18:29 error executing config: Livepatchd error: Couldn't setup system
logger.

And the other one is related to cloud-init:
  File "/usr/lib/python3/dist-packages/uaclient/clouds/identity.py", line 56, 
in get_cloud_type_from_result_file
dsname = result["v1"]["datasource"].split()[0].lower()
AttributeError: 'NoneType' object has no attribute 'split'

What is interesting in this error is that we are calling the
get_cloud_type_from_result_file function. We should only be calling this
function if we don't have the cloud-id command in the machine. Since we
are running on xenial machines, was not expecing that to happen.

So there is something wrong with cloud-init here. Maybe that is related
to the snap issue we are seeing.

Can you run the following cloud-init command and attach the logs here please
cloud-init collect-logs

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1927029] Re: ua attach command fails

2021-05-11 Thread Alex Trepca
More info, instance is an empty directory, and there's instances too,
with the subdirs below:

$ ls -al /var/lib/cloud
total 36
drwxr-xr-x  9 root root 4096 Feb 12  2017 .
drwxr-xr-x 52 root root 4096 May  3 23:46 ..
drwxr-xr-x  2 root root 4096 May 14  2019 data
drwxr-xr-x  2 root root 4096 Oct 14  2016 handlers
drwxr-xr-x  2 root root 4096 Feb 12  2017 instance
drwxr-xr-x  4 root root 4096 Feb 12  2017 instances
drwxr-xr-x  6 root root 4096 Oct 14  2016 scripts
drwxr-xr-x  2 root root 4096 Oct 14  2016 seed
drwxr-xr-x  2 root root 4096 Oct 14  2016 sem

$ ls -al /var/lib/cloud/instance
total 8
drwxr-xr-x 2 root root 4096 Feb 12  2017 .
drwxr-xr-x 9 root root 4096 Feb 12  2017 ..

$ ls -al /var/lib/cloud/instances
total 16
drwxr-xr-x 4 root root 4096 Feb 12  2017 .
drwxr-xr-x 9 root root 4096 Feb 12  2017 ..
drwxr-xr-x 5 root root 4096 Feb 12  2017 i-d04c5fc8
drwxr-xr-x 3 root root 4096 Feb 12  2017 iid-datasource-none

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1927029] Re: ua attach command fails

2021-05-11 Thread Alex Trepca
$ cat /var/lib/cloud/data/result.json
{
 "v1": {
  "datasource": null,
  "errors": [
   "[Errno 21] Is a directory: '/var/lib/cloud/instance'",
   "[Errno 21] Is a directory: '/var/lib/cloud/instance'",
   "[Errno 21] Is a directory: '/var/lib/cloud/instance'",
   "[Errno 21] Is a directory: '/var/lib/cloud/instance'"
  ]
 }
}

Can confirm that's a directory:

$ ls -ald /var/lib/cloud/instance
drwxr-xr-x 2 root root 4096 Jun 22  2017 /var/lib/cloud/instance

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1927029] Re: ua attach command fails

2021-05-11 Thread Richard Harding
It looks like an issue parsing the file: /var/lib/cloud/data/result.json

Are you able to look at share those contents as well? If there's
sensitive content I can mark this bug security private to assist.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1927029] Re: ua attach command fails

2021-05-10 Thread Alex Trepca
I uploaded it to this Gist:
https://gist.githubusercontent.com/atrepca/dede1e2f4b894a444d6ac0f0abeaf5dd/raw/e5877b08940773e01e5ef93596f31ede49cb69e0
/ubuntu-advantage.log

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1927029] Re: ua attach command fails

2021-05-10 Thread Alex Trepca
Trying again...

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1927029] Re: ua attach command fails

2021-05-10 Thread Alex Trepca
I can't seem to be able to attach, ok to post the full log here? It's
1342 lines.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1927029] Re: ua attach command fails

2021-05-10 Thread Domas Monkus
Hello, Alex,
I don't see the attachment.

Domas

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1927029] Re: ua attach command fails

2021-05-10 Thread Alex Trepca
Attaching the full ubuntu-advantage.log file too.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1927029] Re: ua attach command fails

2021-05-10 Thread Alex Trepca
snap --version:

$ snap --version
snap2.49.2
snapd   2.49.2
series  16
ubuntu  16.04
kernel  4.4.0-145-generic


Tried the steps here:

$ sudo ua disable livepatch
Livepatch is not currently enabled
See: sudo ua status
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

$ sudo snap remove --purge livepatch
snap "livepatch" is not installed

$ sudo ua enable livepatch
One moment, checking your subscription first
Unable to configure Livepatch: Failed running command 
'/snap/bin/canonical-livepatch config 
remote-server=https://livepatch.canonical.com' [exit(1)]. Message: 2021/05/10 
18:04:55 error executing config: Livepatchd error: Couldn't setup system logger.

ERROR: Unable to configure Livepatch: Failed running command '/snap/bin
/canonical-livepatch config remote-
server=https://livepatch.canonical.com' [exit(1)]. Message: 2021/05/10
18:04:55 error executing config: Livepatchd error: Couldn't setup system
logger.

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

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1927029] Re: ua attach command fails

2021-05-06 Thread Domas Monkus
Also, please provide the output of:
```
snap --version
```

And please try the following steps:
1. sudo ua disable livepatch
2. sudo snap remove --purge livepatch
3. sudo ua enable livepatch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1927029] Re: ua attach command fails

2021-05-06 Thread Domas Monkus
Thank you for the information. Could you also provide the full ubuntu-
advantage.log file?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1927029] Re: ua attach command fails

2021-05-05 Thread Alex Trepca
1. Correct. It's 10 EC2 instances of different types, and using a few different 
Xenial AMIs:
- ami-e1fe2281 20160921
- ami-a9d276c9 20161020
- ami-7ac6491a 20170307

To make it more confusing, other instances using these same AMIs are
fine.

2. It was installed following the steps here: 
https://discourse.ubuntu.com/t/ubuntu-advantage-client/21788:
- Add ppa:ua-client/stable
- Install ubuntu-advantage-tools package

3. Not sure, what do you mean by non standard? I'd say no but let me
know if you're looking for anything specifically and I can check.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1927029] Re: ua attach command fails

2021-05-05 Thread Domas Monkus
A couple of follow-up questions:
1. This is running on ec2, correct? Which AMI was used?
2. How was ubuntu-advantage installed?
3. Is there anything else that is non-standard about the system?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1927029] Re: ua attach command fails

2021-05-04 Thread Alex Trepca
dmesg has a ton of audit messages, no errors of any kind.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1927029] Re: ua attach command fails

2021-05-04 Thread Alex Trepca
snap info canonical-livepatch:

$ snap info canonical-livepatch
name:  canonical-livepatch
summary:   Canonical Livepatch Client
publisher: Canonical✓
store-url: https://snapcraft.io/canonical-livepatch
contact:   sn...@canonical.com
license:   unset
description: |
  Canonical Livepatch Client
commands:
  - canonical-livepatch
services:
  canonical-livepatch.canonical-livepatchd: simple, enabled, inactive
snap-id:  
tracking: latest/stable
refresh-date: yesterday at 23:51 UTC
channels:
  latest/stable:9.6.1 2021-04-16 (98) 9MB -
  latest/candidate: 9.6.0 2021-04-12 (97) 9MB -
  latest/beta:  9.6.0 2021-04-12 (97) 9MB -
  latest/edge:  9.6.1 2021-04-14 (98) 9MB -
installed:  9.6.1(98) 9MB -


canonical-livepatch status --verbose:

$ canonical-livepatch status --verbose
2021/05/04 17:37:37 error executing status: Livepatchd error: Couldn't setup 
system logger.


lsb_release -a:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:Ubuntu 16.04.1 LTS
Release:16.04
Codename:   xenial


uname -a:

$ uname -a
Linux  4.4.0-145-generic #171-Ubuntu SMP Tue Mar 26 12:43:40 
UTC 2019 x86_64 x86_64 x86_64 GNU/Linux


journalctl -t canonical-livepatch:

$ sudo journalctl -t canonical-livepatch
-- No entries --


snap connections:

$ snap connections
Interface  Plug   Slot  
  Notes
hardware-observe   canonical-livepatch:hardware-observe   
:hardware-observe   -
kernel-module-control  canonical-livepatch:kernel-module-control  
:kernel-module-control  -
network-bind   canonical-livepatch:network-bind   :network-bind 
  -
network-controlcanonical-livepatch:network-control
:network-control-
network-managercanonical-livepatch:network-manager
:network-manager-
system-observe canonical-livepatch:system-observe 
:system-observe -


-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1927029] Re: ua attach command fails

2021-05-04 Thread Domas Monkus
Hello,
we need more information to debug this.

Please include the output from the following commands in your report as
plain text.

snap info canonical-livepatch
canonical-livepatch status --verbose
lsb_release -a
uname -a
journalctl -t canonical-livepatch
snap connections
dmesg

Thank you.

Domas Monkus

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1927029] Re: ua attach command fails

2021-05-04 Thread Alex Trepca
This is happening with more than one instance, it's 10+ 16.04 servers
that were all launched around the same time. I'm running the Ansible
code again to get an exact count, and look for any similarities.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1927029] Re: ua attach command fails

2021-05-04 Thread Alex Trepca
> Is this a persistent issue or does it eventually resolve with retries?

Persistent issue, doesn't go away.

> Did this happen early in the machine uptime, perhaps in cloud-init?

This is not during the boot process, the instance has been up for a
while, I just installed ubuntu-advantage-tools and ran `sudo ua attach
$TOKEN` to enable esm_infra.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1927029] Re: ua attach command fails

2021-05-04 Thread Alex Trepca
$ sudo ua enable livepatch
One moment, checking your subscription first
Unable to configure Livepatch: Failed running command 
'/snap/bin/canonical-livepatch config 
remote-server=https://livepatch.canonical.com' [exit(1)]. Message: 2021/05/04 
15:18:29 error executing config: Livepatchd error: Couldn't setup system logger.

ERROR: Unable to configure Livepatch: Failed running command '/snap/bin
/canonical-livepatch config remote-
server=https://livepatch.canonical.com' [exit(1)]. Message: 2021/05/04
15:18:29 error executing config: Livepatchd error: Couldn't setup system
logger.

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


The error in /var/log/ubuntu-advantage.log is the same.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1927029] Re: ua attach command fails

2021-05-04 Thread Alex Trepca
$ sudo snap logs canonical-livepatch.canonical-livepatchd
2021-05-03T23:52:02Z canonical-livepatch.canonical-livepatchd[8596]: 2021/05/03 
23:52:02 Couldn't setup system logger.
2021-05-03T23:52:02Z systemd[1]: 
snap.canonical-livepatch.canonical-livepatchd.service: Main process exited, 
code=exited, status=1/FAILURE
2021-05-03T23:52:02Z systemd[1]: 
snap.canonical-livepatch.canonical-livepatchd.service: Unit entered failed 
state.
2021-05-03T23:52:02Z systemd[1]: 
snap.canonical-livepatch.canonical-livepatchd.service: Failed with result 
'exit-code'.
2021-05-03T23:52:02Z systemd[1]: 
snap.canonical-livepatch.canonical-livepatchd.service: Service hold-off time 
over, scheduling restart.
2021-05-03T23:52:02Z systemd[1]: Stopped Service for snap application 
canonical-livepatch.canonical-livepatchd.
2021-05-03T23:52:02Z systemd[1]: 
snap.canonical-livepatch.canonical-livepatchd.service: Start request repeated 
too quickly.
2021-05-03T23:52:02Z systemd[1]: Failed to start Service for snap application 
canonical-livepatch.canonical-livepatchd.
2021-05-03T23:52:02Z systemd[1]: 
snap.canonical-livepatch.canonical-livepatchd.service: Unit entered failed 
state.
2021-05-03T23:52:02Z systemd[1]: 
snap.canonical-livepatch.canonical-livepatchd.service: Failed with result 
'start-limit-hit'.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1927029] Re: ua attach command fails

2021-05-04 Thread Casey Marshall
I suspect it might be an issue with snapd not being ready to execute
snaps, this might help confirm.

Is this a persistent issue or does it eventually resolve with retries?

Did this happen early in the machine uptime, perhaps in cloud-init?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1927029] Re: ua attach command fails

2021-05-04 Thread Lucas Albuquerque Medeiros de Moura
Also, can you please provide the livepatch logs by running:

 sudo snap logs canonical-livepatch.canonical-livepatchd

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1927029] Re: ua attach command fails

2021-05-04 Thread Lucas Albuquerque Medeiros de Moura
Hello Alex, thanks for reporting this bug. If you still have that
machine running, can you run:

ua enable livepatch

And verify if the command works. I have one hypothesis here, but if that
enable fails as well, then it cannot be what I am thinking.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927029

Title:
  ua attach command fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1927029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs