Calico charm generates an invalid CNI configuration file

Bug #2034737 reported by Mateo Florido
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Calico Charm
Fix Released
Medium
Mateo Florido

Bug Description

The charm generates a `10-calico.conflist` where the `assign_ipv4` and `assign_ipv6` fields contain an invalid value (`null`).

```
{
  "name": "k8s-pod-network",
  "cniVersion": "0.3.1",
  "plugins": [
    {
      "type": "calico",
      "log_level": "info",
      "log_file_path": "/var/log/calico/cni/cni.log",
      "etcd_endpoints": "https://172.30.0.43:2379,https://172.30.0.63:2379,https://172.30.1.153:2379",
      "etcd_key_file": "/etc/cni/net.d/calico-tls/etcd-key",
      "etcd_cert_file": "/etc/cni/net.d/calico-tls/etcd-cert",
      "etcd_ca_cert_file": "/etc/cni/net.d/calico-tls/etcd-ca",
      "mtu": 0,
      "ipam": {
        "type": "calico-ipam",
        "assign_ipv4": null,
        "assign_ipv6": null
      },
      "policy": {
        "type": "k8s"
      },
      "kubernetes": {
        "kubeconfig": "/etc/cni/net.d/calico-kubeconfig"
      }
    },
    {
      "type": "portmap",
      "snat": true,
      "capabilities": {
        "portMappings": true
      }
    },
    {
      "type": "bandwidth",
      "capabilities": {
        "bandwidth": true
      }
    }
  ]
}
```

Also, when attempting to update other configurations in the file (e.g. MTU value), the charm persists in setting the value to 0.

Revision history for this message
Mateo Florido (mateoflorido) wrote :
Changed in charm-calico:
importance: Undecided → Medium
status: New → Fix Committed
milestone: none → 1.28+ck1
assignee: nobody → Mateo Florido (mateoflorido)
Revision history for this message
Adam Dyess (addyess) wrote :

Backported to release_1.28 branch

Adam Dyess (addyess)
Changed in charm-calico:
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.