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

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

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

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

[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: 'collect-logs

[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

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

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

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

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

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

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

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

[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

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

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

[Bug 1927029] [NEW] ua attach command fails

2021-05-03 Thread Alex Trepca
Public bug reported: ua attach command fails with: $ sudo ua attach $TOKEN Enabling default service esm-infra Updating package lists UA Infra: ESM enabled A reboot is required to complete install. Enabling default service livepatch Unable to configure Livepatch: Failed running command '/snap/bin