if machine has 'Inst id' with capitals, deploy fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Calico Charm |
Triaged
|
Medium
|
Unassigned |
Bug Description
I looked into this after seeing that the calico charm does not successfully deploy and gets stuck in state "retry calico configuration"
Further investigation showed:
```
unit-calico-23: 16:47:40 INFO unit.calico/
File "/var/lib/
node = calicoctl_
File "/var/lib/
output = calicoctl(*args)
File "/var/lib/
subprocess.
```
Manually adding the node shows the supposed faulty scenario; Adding a node on calico level fails if it has capitals.
```
./calicoctl create -f me.yaml
Failed to create 'Node' resource: [error with field Metadata.Name = 'NLDW1-6-26-1' (name must consist of lower case alphanumeric characters, '-' or '.' (regex: [a-z0-9]
```
Changing the node's name in MAAS to lower case solved this for me.
description: | updated |
Changed in charm-calico: | |
importance: | Undecided → Medium |
status: | Confirmed → Triaged |
tags: | added: cdo-qa |
Thanks for the report. Looks like the calico charm uses gethostname() in a few places to determine the node name, where it should be using gethostname( ).lower( ).