Charms are failing basic hooks with ImportError after X-B Upgrade - Forgot to 'juju upgrade-series <m> prepare'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Filebeat Charm |
Won't Fix
|
Medium
|
Unassigned | ||
NTP Charm |
Expired
|
Undecided
|
Unassigned | ||
Telegraf Charm |
Expired
|
Medium
|
Unassigned | ||
charm-sysconfig |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
After performing a Xenial to Bionic upgrad, a handful of charms have entered 'Error' state while running basic hooks:
nova-compute-kvm/30 active idle 32 10.55.65.18 Unit is ready
ceilometer-
filebeat/30 error idle 10.55.65.18 hook failed: "update-status"
landscape-
lldpd/6 active idle 10.55.65.18 LLDP daemon running
neutron-
nrpe-host/21 active idle 10.55.65.18 icmp,5666/tcp ready
ntp/25 error idle 10.55.65.18 123/udp hook failed: "update-status"
rsyslog-
sysconfig-
telegraf/28 error idle 10.55.65.18 9103/tcp hook failed: "update-status"
trilio-
Upon reviewing the juju unit logs all charms are encountering an ImportError:
2020-03-18 13:32:04 DEBUG juju.worker.
2020-03-18 13:32:04 DEBUG juju.machinelock machinelock.go:156 acquire machine lock for uniter (run update-status hook)
2020-03-18 13:32:04 DEBUG juju.machinelock machinelock.go:166 machine lock acquired for uniter (run update-status hook)
2020-03-18 13:32:04 DEBUG juju.worker.
2020-03-18 13:32:04 DEBUG juju.worker.
2020-03-18 13:32:04 DEBUG update-status Could not find platform independent libraries <prefix>
2020-03-18 13:32:04 DEBUG update-status Could not find platform dependent libraries <exec_prefix>
2020-03-18 13:32:04 DEBUG update-status Consider setting $PYTHONHOME to <prefix>
2020-03-18 13:32:04 DEBUG update-status Fatal Python error: Py_Initialize: Unable to get the locale encoding
2020-03-18 13:32:04 DEBUG update-status ImportError: No module named 'encodings'
2020-03-18 13:32:04 DEBUG update-status
2020-03-18 13:32:04 DEBUG update-status Current thread 0x00007fb437a56740 (most recent call first):
2020-03-18 13:32:05 ERROR juju.worker.
Changed in charm-sysconfig: | |
status: | Incomplete → Won't Fix |
Changed in filebeat-charm: | |
status: | Incomplete → Won't Fix |
Note: these are all reactive charms and are having problems with their virtual environments
ubuntu@ CMOOSCHSTUP7132 :/var/lib/ juju/agents$ source unit-ntp-25/.venv/ CMOOSCHSTUP7132 :/var/lib/ juju/agents$ source unit-ntp- 25/.venv/ bin/activate CMOOSCHSTUP7132 :/var/lib/ juju/agents$ python [:<exec_ prefix> ]
bin/ include/ lib/ share/
ubuntu@
(.venv) ubuntu@
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'
Current thread 0x00007f68373e0740 (most recent call first):
Aborted (core dumped)