[Bug 1950433] Re: Enabling service results in error

2021-11-24 Thread Lucas Albuquerque Medeiros de Moura
Awesome :)
I will close this bug then, but if anything else comes up, please let us know


** 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/1950433

Title:
  Enabling service results in error

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


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

[Bug 1950433] Re: Enabling service results in error

2021-11-23 Thread Htbaa
Hi Lucas,

Thanks, I was able to activate it this time. Problem solved.

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

Title:
  Enabling service results in error

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


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

[Bug 1950433] Re: Enabling service results in error

2021-11-22 Thread Lucas Albuquerque Medeiros de Moura
Hi c-kras, we have invalidated that token for you. You can now go to:
https://ubuntu.com/advantage

And get a new token for you.

Also, please verify if you have other machines using the old token as
well, just so you can update them to the new one

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

Title:
  Enabling service results in error

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


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

[Bug 1950433] Re: Enabling service results in error

2021-11-19 Thread Htbaa
Hi Lucas,

I've just run ua detach and removed the non-working apt repo links. Will
try again when I have a new key.

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

Title:
  Enabling service results in error

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


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

[Bug 1950433] Re: Enabling service results in error

2021-11-16 Thread Lucas Albuquerque Medeiros de Moura
Hi c-kras, to invalidate the token please:

1. Run ua detach on the machine
2. Inform us that the machine is detached

Once that is done, we will invalidate the token for you and we will let
you know when a new token will be available for you.

Now, regarding the error you posted, can you confirm if that apt repo
link works ? If not, then I think this error is expected and I suggest
changing for a valid apt repo link

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

Title:
  Enabling service results in error

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


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

[Bug 1950433] Re: Enabling service results in error

2021-11-15 Thread Htbaa
Hi Lucas,

Oops, that was not intended! Yes, I'd like to get some help with that.

I've attached the full logfile. I've redacted the domainname with the
SSL mismatch.

** Attachment added: "ubuntu-advantage.log"
   
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1950433/+attachment/5541023/+files/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/1950433

Title:
  Enabling service results in error

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


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

[Bug 1950433] Re: Enabling service results in error

2021-11-12 Thread Lucas Albuquerque Medeiros de Moura
Sorry c-kras, you have accidentally leaked your resource token in this thread.
You will need to invalidate your current token and generate a new one.
Let me know if you need any help with that.

And about the issue, can you send the full error that you see when you
run ua enable

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

Title:
  Enabling service results in error

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


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

[Bug 1950433] Re: Enabling service results in error

2021-11-12 Thread Htbaa
I can attach, but enabling a service still fails. I get some errors
about apt sources (old Docker repo) that doesn't have a release file.
But that shouldn't be an issue. The following does pop-up in the error
log though.

2021-11-12 16:21:45,050 - contract.py:(308) [ERROR]: Failed to process contract 
delta for esm-infra: {'entitlement': {'entitled': True, 'directives': 
{'aptKey': '56F7650A24C9E9ECF87C4D8D4067E40313CB4B13', 'aptURL': 
'https://esm.ubuntu.co
m/infra', 'suites': ['xenial-infra-security', 'xenial-infra-updates']}, 'type': 
'esm-infra', 'obligations': {'enableByDefault': True}, 'affordances': 
{'series': ['precise', 'trusty', 'xenial', 'bionic', 'focal'], 'architectures': 
['amd64
', 'i386', 'i686', 'x86_64']}}, 'resourceToken': 
'mAgJOEWNBV0RBYzVNbjluS1lLWV9OXzk5YWthd1N4WGd2bUtrWlNIQjR5U0NVYUtBOjFlYzU5YzEzMjhjMjRkYzg4NjQyZTViYTM3MTU5NzA4AAI4aXMtY29udHJhY3QgY0FXREFjNU1uOW5LWUtZX05fOTlha2F3U3hYZ3ZtS2taU0hCNHlTQ1VhS0
EAAhVpcy1yZXNvdXJjZSBlc20taW5mcmEAAAYgaEZ1XLeU94Oxi1Lx2tqlNq9z6Uy37ZXKYiIO4uG5rOA'}

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

Title:
  Enabling service results in error

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


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

[Bug 1950433] Re: Enabling service results in error

2021-11-11 Thread Lucas Albuquerque Medeiros de Moura
Awesome, so let's recreate that machine-id now:

1. Delete the /etc/machine-id file
2. Run systemd-machine-id-setup 

Hopefully this will create a machine-id without any special characters on it.
If that is true, you can just attach again and 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/1950433

Title:
  Enabling service results in error

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


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

[Bug 1950433] Re: Enabling service results in error

2021-11-11 Thread Htbaa
Works like a charm...?

# ua detach
Are you sure? (y/N) y
This machine is now detached.


2021-11-11 16:58:25,059 - cli.py:(1456) [DEBUG]: Executed with sys.argv: 
['/usr/bin/ua', 'detach']
2021-11-11 16:58:25,061 - util.py:(425) [DEBUG]: Reading file: 
/var/lib/ubuntu-advantage/private/machine-token.json
2021-11-11 16:58:25,070 - util.py:(425) [DEBUG]: Reading file: 
/var/lib/ubuntu-advantage/notices.json
2021-11-11 16:58:25,070 - config.py:(508) [DEBUG]: File does not exist: 
/var/lib/ubuntu-advantage/notices.json
2021-11-11 16:58:25,071 - util.py:(682) [DEBUG]: Writing file: 
/var/lib/ubuntu-advantage/notices.json
2021-11-11 16:58:25,071 - util.py:(682) [DEBUG]: Writing file: 
/var/lib/ubuntu-advantage/private/lock
2021-11-11 16:58:25,072 - util.py:(425) [DEBUG]: Reading file: 
/var/lib/ubuntu-advantage/notices.json
2021-11-11 16:58:25,072 - util.py:(425) [DEBUG]: Reading file: /etc/os-release
2021-11-11 16:58:25,327 - util.py:(608) [DEBUG]: Ran cmd: apt-cache policy, rc: 
0 stderr: b''
2021-11-11 16:58:25,430 - util.py:(608) [DEBUG]: Ran cmd: apt-cache policy, rc: 
0 stderr: b''
2021-11-11 16:58:25,537 - util.py:(608) [DEBUG]: Ran cmd: apt-cache policy, rc: 
0 stderr: b''
2021-11-11 16:58:25,651 - util.py:(608) [DEBUG]: Ran cmd: apt-cache policy, rc: 
0 stderr: b''
2021-11-11 16:58:25,653 - util.py:(425) [DEBUG]: Reading file: 
/var/lib/ubuntu-advantage/notices.json
2021-11-11 16:58:25,655 - util.py:(682) [DEBUG]: Writing file: 
/var/lib/ubuntu-advantage/notices.json
2021-11-11 16:58:25,760 - util.py:(608) [DEBUG]: Ran cmd: apt-cache policy, rc: 
0 stderr: b''
2021-11-11 16:58:25,763 - util.py:(425) [DEBUG]: Reading file: 
/var/lib/ubuntu-advantage/notices.json
2021-11-11 16:58:25,764 - util.py:(682) [DEBUG]: Writing file: 
/var/lib/ubuntu-advantage/notices.json
2021-11-11 16:58:27,097 - util.py:(425) [DEBUG]: Reading file: 
/var/lib/ubuntu-advantage/private/machine-id
2021-11-11 16:58:27,098 - config.py:(508) [DEBUG]: File does not exist: 
/var/lib/ubuntu-advantage/private/machine-id
2021-11-11 16:58:27,098 - contract.py:(211) [DEBUG]: Found new machine-id. Do 
not call detach on contract backend
2021-11-11 16:58:27,099 - util.py:(425) [DEBUG]: Reading file: 
/var/lib/ubuntu-advantage/notices.json
2021-11-11 16:58:27,099 - config.py:(508) [DEBUG]: File does not exist: 
/var/lib/ubuntu-advantage/notices.json
2021-11-11 16:58:27,107 - config.py:(959) [DEBUG]: Using UA client 
configuration file at /etc/ubuntu-advantage/uaclient.conf
2021-11-11 16:58:27,107 - util.py:(425) [DEBUG]: Reading file: 
/etc/ubuntu-advantage/uaclient.conf
2021-11-11 16:58:27,114 - config.py:(1102) [DEBUG]: Unable to update UA 
messages. Cannot import ua_update_messaging.
2021-11-11 16:58:27,115 - util.py:(425) [DEBUG]: Reading file: 
/var/lib/ubuntu-advantage/notices.json
2021-11-11 16:58:27,115 - config.py:(508) [DEBUG]: File does not exist: 
/var/lib/ubuntu-advantage/notices.json

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

Title:
  Enabling service results in error

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


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

[Bug 1950433] Re: Enabling service results in error

2021-11-11 Thread Lucas Albuquerque Medeiros de Moura
Fair enough, my mistake. I was running this directly on the interpreter.

But let me try something here, can you run this command without errors:
ua detach

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

Title:
  Enabling service results in error

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


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

[Bug 1950433] Re: Enabling service results in error

2021-11-11 Thread Htbaa
That script doesn't output anything, but I added a print() statement
(I'm not familiar with Python). Still includes the newline.

# python3 test.py
1ec59c1328c24dc88642e5ba37159708
f81

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

Title:
  Enabling service results in error

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


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

[Bug 1950433] Re: Enabling service results in error

2021-11-11 Thread Lucas Albuquerque Medeiros de Moura
Yeah, that's a really odd problem. I tried using the same machine-id you
provided on a Xenial container but was unable to reproduce any of the
problems here. The enable operation was successful even using the
machine-id with a newline character.

Can you run the following python script and append the result here:
--
from uaclient.config import UAConfig
from uaclient.util import get_machine_id
get_machine_id(UAConfig())


When I run this, this is the output I am getting on my Xenial machine:
'1ec59c1328c24dc88642e5ba37159708\\nf81'

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

Title:
  Enabling service results in error

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


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

[Bug 1950433] Re: Enabling service results in error

2021-11-10 Thread Htbaa
The ubuntu-advantage.log starting from the attach command.

** Attachment added: "The ubuntu-advantage.log starting from the attach 
command."
   
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1950433/+attachment/5539952/+files/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/1950433

Title:
  Enabling service results in error

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


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

[Bug 1950433] Re: Enabling service results in error

2021-11-10 Thread Lucas Albuquerque Medeiros de Moura
Hi Htbaa,

This is weird because I think this type of special character should not be 
allowed on the machine-id.
Also, it seems that you are already attached to an UA subscription. To attach 
we also use the machine-id so it is weird that attach worked and enable does 
not.

Can you attach /var/log/ubuntu-advantange.log here so I can verify what
happened during attach.

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

Title:
  Enabling service results in error

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


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

[Bug 1950433] Re: Enabling service results in error

2021-11-10 Thread Htbaa
Hi Lucas,

Yes, it's exactly the same id:

$ cat /etc/machine-id
1ec59c1328c24dc88642e5ba37159708
f81

No clue why this machine-id has a newline in it though. So it's probably
not a bug with ubuntu-advantage-tools perse I guess, though a more
specific error message in the CLI would be nice.

Up until now I had never heard of this machine-id. How does one generate
a new one and will it have any consequences on other parts of 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/1950433

Title:
  Enabling service results in error

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


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

[Bug 1950433] Re: Enabling service results in error

2021-11-10 Thread Lucas Albuquerque Medeiros de Moura
Hi Htbaa, I think that's exactly the problem we are facing.

Just to be clear, can you confirm if the id in /etc/machine-id is the
one reported in this issue.

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

Title:
  Enabling service results in error

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


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

[Bug 1950433] Re: Enabling service results in error

2021-11-10 Thread Htbaa
Looks to me the cause of the error is the inclusion of a newline (\n) in
the machineId. But how did it get there and how to change it?

"machineId": "1ec59c1328c24dc88642e5ba37159708\nf81"

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

Title:
  Enabling service results in error

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


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