calico-node service fails to start on xenial due to ASCII encoding

Bug #1911220 reported by George Kraft
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Calico Charm
Fix Released
Medium
George Kraft
Canal Charm
Fix Released
Medium
George Kraft
Tigera Secure EE Charm
Fix Released
Medium
George Kraft

Bug Description

This appears to affect xenial only.

Calico units get stuck waiting/idle with status message: "Waiting to retry Calico node configuration". The units log an error from the calicoctl command:

2021-01-11 20:21:59 INFO juju-log b'null\nresource does not exist: Node(ip-172-30-0-150) with error: <nil>\n'

The node does not exist because calico-node fails to start:

Jan 11 20:24:36 ip-172-30-0-150 charm-env[26444]: Traceback (most recent call last):
Jan 11 20:24:36 ip-172-30-0-150 charm-env[26444]: File "/var/lib/juju/agents/unit-calico-0/.venv/bin/conctl", line 11, in <module>
Jan 11 20:24:36 ip-172-30-0-150 charm-env[26444]: load_entry_point('conctl-py35==0.1.2', 'console_scripts', 'conctl')()
Jan 11 20:24:36 ip-172-30-0-150 charm-env[26444]: File "/var/lib/juju/agents/unit-calico-0/.venv/lib/python3.5/site-packages/click/core.py", line 829, in __call__
Jan 11 20:24:36 ip-172-30-0-150 charm-env[26444]: return self.main(*args, **kwargs)
Jan 11 20:24:36 ip-172-30-0-150 charm-env[26444]: File "/var/lib/juju/agents/unit-calico-0/.venv/lib/python3.5/site-packages/click/core.py", line 760, in main
Jan 11 20:24:36 ip-172-30-0-150 charm-env[26444]: _verify_python3_env()
Jan 11 20:24:36 ip-172-30-0-150 charm-env[26444]: File "/var/lib/juju/agents/unit-calico-0/.venv/lib/python3.5/site-packages/click/_unicodefun.py", line 130, in _verify_python3_env
Jan 11 20:24:36 ip-172-30-0-150 charm-env[26444]: " mitigation steps.{}".format(extra)
Jan 11 20:24:36 ip-172-30-0-150 charm-env[26444]: RuntimeError: Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment. Consult https://click.palletsprojects.com/python3/ for mitigation steps.
Jan 11 20:24:36 ip-172-30-0-150 charm-env[26444]: This system supports the C.UTF-8 locale which is recommended. You might be able to resolve your issue by exporting the following environment variables:
Jan 11 20:24:36 ip-172-30-0-150 charm-env[26444]: export LC_ALL=C.UTF-8
Jan 11 20:24:36 ip-172-30-0-150 charm-env[26444]: export LANG=C.UTF-8
Jan 11 20:24:36 ip-172-30-0-150 systemd[1]: calico-node.service: Main process exited, code=exited, status=1/FAILURE

Revision history for this message
George Kraft (cynerva) wrote :

Added canal and tigera-secure-ee charms to this issue since they also use conctl and are likely also impacted.

Revision history for this message
George Kraft (cynerva) wrote :

The cause and solution for this are explained in detail by Click: https://click.palletsprojects.com/python3/

The charm will need to add these two lines to the systemd calico-node.service file:

Environment=LC_ALL=C.UTF-8
Environment=LANG=C.UTF-8

George Kraft (cynerva)
Changed in charm-calico:
importance: Undecided → Medium
Changed in charm-canal:
importance: Undecided → Medium
Changed in charm-tigera-secure-ee:
importance: Undecided → Medium
Changed in charm-calico:
status: New → In Progress
Changed in charm-canal:
status: New → In Progress
Changed in charm-tigera-secure-ee:
status: New → In Progress
Changed in charm-calico:
assignee: nobody → George Kraft (cynerva)
Changed in charm-canal:
assignee: nobody → George Kraft (cynerva)
Changed in charm-tigera-secure-ee:
assignee: nobody → George Kraft (cynerva)
Changed in charm-calico:
milestone: none → 1.20+ck1
Changed in charm-canal:
milestone: none → 1.20+ck1
Changed in charm-tigera-secure-ee:
milestone: none → 1.20+ck1
Revision history for this message
George Kraft (cynerva) wrote :
tags: added: review-needed
George Kraft (cynerva)
Changed in charm-calico:
status: In Progress → Fix Committed
Changed in charm-canal:
status: In Progress → Fix Committed
Changed in charm-tigera-secure-ee:
status: In Progress → Fix Committed
tags: added: backport-needed
removed: review-needed
Revision history for this message
George Kraft (cynerva) wrote :
tags: removed: backport-needed
Changed in charm-calico:
status: Fix Committed → Fix Released
Changed in charm-canal:
status: Fix Committed → Fix Released
Changed in charm-tigera-secure-ee:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.