Cannot use Ubuntu Pro with Juju on AWS
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Tried to configure Juju to launch Ubuntu Pro VMs in AWS by using the new `juju metadata add-image` feature in Juju 2.8. I bootstrapped a controller with Juju 2.8.1 in AWS us-west-2 and tried configuring Juju to use Pro with:
juju metadata add-image --series trusty ami-006bf064149
juju metadata add-image --series xenial ami-0261d1c600d
juju metadata add-image --series bionic ami-09109b16d2d
juju metadata add-image --series focal ami-037fd1e90f9
These AMI ids were obtained by subscribing to the corresponding Ubuntu Pro listing in AWS Marketplace and copying from the AMI shown on the "Configure" page.
Then did `juju deploy ubuntu` and observed status. Juju seems to be unable to find the Pro AMI. I'm using cloud credentials for the same account that I used to subscribe to the Pro marketplace offers so I should have access.
Every 2.0s: juju status slate: Wed Jul 29 12:36:53 2020
Model Controller Cloud/Region Version SLA Timestamp
test aws-us-west-2 aws/us-west-2 2.8.1 unsupported 12:36:54-05:00
App Version Status Scale Charm Store Rev OS Notes
ubuntu waiting 0/1 ubuntu jujucharms 15 ubuntu
Unit Workload Agent Machine Public address Ports Message
ubuntu/0 waiting allocating 0 waiting for machine
Machine State DNS Inst id Series AZ Message
0 pending pending bionic failed to start machine 0 (cannot run instances: The image id '[ami-09109b16d
I also tried copying Pro to my "Service Catalog" in the AWS Console and using the AMI from the generated template, same result.
See also https:/
At timclick's request in that discourse thread above, I gave this another attempt. This time, it worked. I bootstrapped in a different region, us-east-1, where I usually test pro -- and it got a little further!
The instance definitely looks like Ubuntu Pro, there's a marketplace product code!
ubuntu@ ip-172- 31-46-56: ~$ curl http:// 169.254. 169.254/ latest/ dynamic/ instance- identity/ document Zone" : "us-east-1a", tCodes" : null, roductCodes" : [ "ex9l8qw4x21426 rsfg7am8gym" ], d9d5779" , 393de", 29T21:43: 25Z",
{
"accountId" : "937910461948",
"architecture" : "x86_64",
"availability
"billingProducts" : null,
"devpayProduc
"marketplaceP
"imageId" : "ami-09109b16d2
"instanceId" : "i-08261909fac3
"instanceType" : "t3a.micro",
"kernelId" : null,
"pendingTime" : "2020-07-
"privateIp" : "172.31.46.56",
"ramdiskId" : null,
"region" : "us-east-1",
"version" : "2017-09-30"
}
However, ua client doesn't work on this instance and auto-attach fails (which is bad, because I'm paying for Pro...). The error in /var/lib/ ubuntu- advantage. log shows:
2020-07-29 21:47:53,331 - util.py:(373) [DEBUG]: Reading file: /sys/hypervisor /uuid dmi/id/ product_ uuid dmi/id/ product_ serial python3/ dist-packages/ uaclient/ cli.py" , line 614, in wrapper python3/ dist-packages/ uaclient/ cli.py" , line 660, in main python3/ dist-packages/ uaclient/ cli.py" , line 52, in new_f python3/ dist-packages/ uaclient/ cli.py" , line 425, in action_auto_attach token_from_ cloud_identity( cfg) python3/ dist-packages/ uaclient/ cli.py" , line 396, in _get_contract_ token_from_ cloud_identity get_instance_ id() python3/ dist-packages/ uaclient/ clouds/ identity. py", line 31, in get_instance_id ["cloud- init", "query", "instance_id"]) python3/ dist-packages/ uaclient/ util.py" , line 518, in subp python3/ dist-packages/ uaclient/ util.py" , line 478, in _subp err.decode( "utf-8" ), util.ProcessExe cutionError: Failed running command 'cloud-init query instance_id' [exit(1)]. Message: Traceback (most recent call last): cloud-init" , line 11, in <module> entry_point( 'cloud- init==20. 2', 'console_scripts', 'cloud-init')() python3/ dist-packages/ cloudinit/ cmd/main. py", line 893, in main uptime= True, func=functor, args=(name, args)) python3/ dist-packages/ cloudinit/ util.py" , line 2620, in log_time python3/ dist-packages/ cloudinit/ cmd/query. py", line 123, in handle_args data['user. ..
2020-07-29 21:47:53,331 - util.py:(373) [DEBUG]: Reading file: /sys/class/
2020-07-29 21:47:53,332 - util.py:(373) [DEBUG]: Reading file: /sys/class/
2020-07-29 21:47:53,332 - util.py:(373) [DEBUG]: Reading file: /etc/os-release
2020-07-29 21:47:54,916 - cli.py:(637) [ERROR]: Unhandled exception, please file a bug
Traceback (most recent call last):
File "/usr/lib/
return func(*args, **kwargs)
File "/usr/lib/
return args.action(args, cfg)
File "/usr/lib/
return f(*args, **kwargs)
File "/usr/lib/
token = _get_contract_
File "/usr/lib/
current_iid = identity.
File "/usr/lib/
out, _err = util.subp(
File "/usr/lib/
out, err = _subp(args, rcs, capture, timeout)
File "/usr/lib/
stderr=
uaclient.
File "/usr/bin/
load_
File "/usr/lib/
get_
File "/usr/lib/
ret = func(*args, **kwargs)
File "/usr/lib/
instance_