ceph-radosgw/0 charm fails install step with "No module named apt" error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Invalid
|
Undecided
|
Unassigned | ||
Ceph RADOS Gateway Charm |
Invalid
|
High
|
Ryan Beisner |
Bug Description
Since earlier today, our CI/CD has started failing deploying the ceph-radosgw/0 juju charm using the following bundle snippet (latest charm from store - same error with radosgw-262 too). We get an install error.
ceph-radosgw:
annotations:
gui-x: '1000'
gui-y: '250'
charm: cs:ceph-radosgw-263
num_units: 1
options:
source: cloud:bionic-rocky
to:
- lxd:0
Error from juju logs:
2019-02-08 17:34:42 DEBUG install dpkg-query: package 'python-apt' is not installed and no information is available
2019-02-08 17:34:42 DEBUG install Use dpkg --info (= dpkg-deb --info) to examine archive files,
2019-02-08 17:34:42 DEBUG install and dpkg --contents (= dpkg-deb --contents) to list their contents.
2019-02-08 17:34:42 DEBUG install Reading package lists...
2019-02-08 17:34:42 DEBUG install Building dependency tree...
2019-02-08 17:34:42 DEBUG install Reading state information...
2019-02-08 17:34:42 DEBUG install The following package was automatically installed and is no longer required:
2019-02-08 17:34:42 DEBUG install libfreetype6
2019-02-08 17:34:42 DEBUG install Use 'apt autoremove' to remove it.
2019-02-08 17:34:42 DEBUG install Suggested packages:
2019-02-08 17:34:42 DEBUG install python-apt-dbg python-apt-doc
2019-02-08 17:34:42 DEBUG install The following NEW packages will be installed:
2019-02-08 17:34:42 DEBUG install python-apt
2019-02-08 17:34:42 DEBUG install 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
2019-02-08 17:34:42 DEBUG install Need to get 149 kB of archives.
2019-02-08 17:34:42 DEBUG install After this operation, 682 kB of additional disk space will be used.
2019-02-08 17:34:42 DEBUG install Err:1 http://
2019-02-08 17:34:42 DEBUG install 404 Not Found [IP: 91.189.88.161 80]
2019-02-08 17:34:42 DEBUG install E: Failed to fetch http://
2019-02-08 17:34:42 DEBUG install E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
2019-02-08 17:34:42 DEBUG install dpkg-query: package 'python-pip' is not installed and no information is available
2019-02-08 17:34:42 DEBUG install Use dpkg --info (= dpkg-deb --info) to examine archive files,
2019-02-08 17:34:42 DEBUG install and dpkg --contents (= dpkg-deb --contents) to list their contents.
2019-02-08 17:34:42 DEBUG install Reading package lists...
2019-02-08 17:34:42 DEBUG install Building dependency tree...
2019-02-08 17:34:42 DEBUG install Reading state information...
2019-02-08 17:34:42 DEBUG install E: Unable to locate package python-pip
2019-02-08 17:34:43 DEBUG install Traceback (most recent call last):
2019-02-08 17:34:43 DEBUG install File "/var/lib/
2019-02-08 17:34:43 DEBUG install from charmhelpers.
2019-02-08 17:34:43 DEBUG install File "/var/lib/
2019-02-08 17:34:43 DEBUG install from charmhelpers.
2019-02-08 17:34:43 DEBUG install File "/var/lib/
2019-02-08 17:34:43 DEBUG install from charmhelpers.
2019-02-08 17:34:43 DEBUG install File "/var/lib/
2019-02-08 17:34:43 DEBUG install from charmhelpers.
2019-02-08 17:34:43 DEBUG install File "/var/lib/
2019-02-08 17:34:43 DEBUG install from apt import apt_pkg
2019-02-08 17:34:43 DEBUG install ImportError: No module named apt
2019-02-08 17:34:43 ERROR juju.worker.
Model Controller Cloud/Region Version SLA Timestamp
cicd-continuous google-controller google/us-east1 2.4.4 unsupported 18:47:22Z
App Version Status Scale Charm Store Rev OS Notes
central-monitor active 1 nagios jujucharms 28 ubuntu
ceph-mon 13.2.4+dfsg1 active 3 ceph-mon jujucharms 31 ubuntu
ceph-osd 13.2.4+dfsg1 active 3 ceph-osd jujucharms 273 ubuntu
ceph-radosgw error 1 ceph-radosgw jujucharms 262 ubuntu
cinder 13.0.2 active 1 cinder jujucharms 276 ubuntu
cinder-ceph 13.0.2 active 1 cinder-ceph jujucharms 238 ubuntu
glance 17.0.0 active 1 glance jujucharms 271 ubuntu
keystone 14.0.1 active 1 keystone jujucharms 288 ubuntu
mysql 5.7.20-29.24 active 1 percona-cluster jujucharms 272 ubuntu
neutron-api 13.0.2 active 1 neutron-api jujucharms 266 ubuntu
neutron-gateway 13.0.2 active 1 neutron-gateway jujucharms 256 ubuntu
neutron-openvswitch 13.0.2 active 1 neutron-openvswitch jujucharms 255 ubuntu
nova-cloud-
nova-compute 18.0.3 active 1 nova-compute jujucharms 419 ubuntu
ntp 3.2 active 2 ntp jujucharms 31 ubuntu
openstack-dashboard 14.0.1 active 1 openstack-dashboard local 32 ubuntu
rabbitmq-server 3.6.10 active 1 rabbitmq-server jujucharms 82 ubuntu
Unit Workload Agent Machine Public address Ports Message
central-monitor/0* active idle 0/lxd/0 252.1.120.137 80/tcp ready
ceph-mon/0 active idle 0/lxd/1 252.1.116.91 Unit is ready and clustered
ceph-mon/1 active idle 0/lxd/2 252.1.127.220 Unit is ready and clustered
ceph-mon/2* active idle 0/lxd/3 252.1.115.192 Unit is ready and clustered
ceph-osd/0 active idle 0/lxd/4 252.1.127.172 Unit is ready (3 OSD)
ceph-osd/1* active idle 0/lxd/5 252.1.112.238 Unit is ready (3 OSD)
ceph-osd/2 active idle 0/lxd/6 252.1.125.208 Unit is ready (3 OSD)
ceph-radosgw/0* error idle 0/lxd/7 252.1.113.230 hook failed: "install"
cinder/0* active idle 0/lxd/8 252.1.121.167 8776/tcp Unit is ready
cinder-ceph/0* active idle 252.1.121.167 Unit is ready
glance/0* active idle 0/lxd/9 252.1.126.205 9292/tcp Unit is ready
keystone/0* active idle 0/lxd/10 252.1.123.90 5000/tcp Unit is ready
This is deploying into an lxd container.
Manually trying to download http://
The package on the archive site seems to have been renamed "python-
Changed in juju: | |
assignee: | nobody → Ryan Beisner (1chb1n) |
Changed in charm-ceph-radosgw: | |
assignee: | nobody → Ryan Beisner (1chb1n) |
Changed in juju: | |
status: | New → Invalid |
Changed in charm-ceph-radosgw: | |
milestone: | none → 19.04 |
Changed in juju: | |
assignee: | Ryan Beisner (1chb1n) → nobody |
Changed in charm-ceph-radosgw: | |
status: | Incomplete → In Progress |
Changed in charm-ceph-radosgw: | |
status: | In Progress → Incomplete |
Changed in charm-ceph-radosgw: | |
status: | Incomplete → Invalid |
I'm working on reproducing this, I was able to reproduce a similar condition in a charm-upgrade:
2019-02-08 20:39:12 DEBUG upgrade-charm Unpacking python-markupsafe (1.0-1build1) ... jinja2_ 2.10-1_ all.deb ... juju/agents/ unit-ceph- radosgw- 0/charm/ hooks/upgrade- charm", line 90, in <module> contrib. hardening. harden import harden juju/agents/ unit-ceph- radosgw- 0/charm/ hooks/charmhelp ers/contrib/ hardening/ harden. py", line 25, in <module> contrib. hardening. host.checks import run_os_checks juju/agents/ unit-ceph- radosgw- 0/charm/ hooks/charmhelp ers/contrib/ hardening/ host/checks/ __init_ _.py", line 19, in <module> contrib. hardening. host.checks import ( juju/agents/ unit-ceph- radosgw- 0/charm/ hooks/charmhelp ers/contrib/ hardening/ host/checks/ apt.py" , line 16, in <module> contrib. hardening. audits. apt import ( juju/agents/ unit-ceph- radosgw- 0/charm/ hooks/charmhelp ers/contrib/ hardening/ audits/ apt.py" , line 16, in <module> uniter. operation runhook.go:132 hook "upgrade-charm" failed: exit status 1
2019-02-08 20:39:12 DEBUG upgrade-charm Selecting previously unselected package python-jinja2.
2019-02-08 20:39:12 DEBUG upgrade-charm Preparing to unpack .../python-
2019-02-08 20:39:12 DEBUG upgrade-charm Unpacking python-jinja2 (2.10-1) ...
2019-02-08 20:39:12 DEBUG upgrade-charm Setting up python-markupsafe (1.0-1build1) ...
2019-02-08 20:39:12 DEBUG upgrade-charm Setting up python-jinja2 (2.10-1) ...
2019-02-08 20:39:14 DEBUG upgrade-charm Traceback (most recent call last):
2019-02-08 20:39:14 DEBUG upgrade-charm File "/var/lib/
2019-02-08 20:39:14 DEBUG upgrade-charm from charmhelpers.
2019-02-08 20:39:14 DEBUG upgrade-charm File "/var/lib/
2019-02-08 20:39:14 DEBUG upgrade-charm from charmhelpers.
2019-02-08 20:39:14 DEBUG upgrade-charm File "/var/lib/
2019-02-08 20:39:14 DEBUG upgrade-charm from charmhelpers.
2019-02-08 20:39:14 DEBUG upgrade-charm File "/var/lib/
2019-02-08 20:39:14 DEBUG upgrade-charm from charmhelpers.
2019-02-08 20:39:14 DEBUG upgrade-charm File "/var/lib/
2019-02-08 20:39:14 DEBUG upgrade-charm from apt import apt_pkg
2019-02-08 20:39:14 DEBUG upgrade-charm ImportError: No module named apt
2019-02-08 20:39:14 ERROR juju.worker.