[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 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 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

[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

[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.

[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

[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

[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

[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

[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:

[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

[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

[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:

[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

[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.

[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:

[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

[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:

[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:

[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)

[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

[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

[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:

[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

[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:

[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: |

[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.

[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

[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

[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:

[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,

[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

[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

[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