Calico configuration file has yaml format error

Bug #1843453 reported by Takeo Komiyama
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
High
Al Bailey

Bug Description

Brief Description
-----------------
When run ansible-playbook for bootstrap, in /var/log/daemon.log, it says,

2019-09-06T17:07:29.779 localhost kubelet[851987]: info W0906 17:07:29.779351 851987 cni.go:149] Error loading CNI config list file /etc/cni/net.d/10-calico.conflist: error parsing configuration list: invalid character '"' after object key:value pair

In role template,
/usr/share/ansible/stx-ansible/playbooks/bootstrap/roles/bringup-essential-services/templates/calico-cni.yaml.j2

It seems that "}," are missing at

  cni_network_config: |-
    {
      "name": "k8s-pod-network",
      "cniVersion": "0.3.0",
      "plugins": [
        {
          "type": "calico",
          "log_level": "info",
          "datastore_type": "kubernetes",
          "nodename": "__KUBERNETES_NODE_NAME__",
          "mtu": __CNI_MTU__,
          "ipam": {
            "type": "calico-ipam",
            "assign_ipv4": "{{ "true" if cluster_network_ipv4 else "false" }}",
            "assign_ipv6": "{{ "true" if cluster_network_ipv6 else "false" }}" <-- Here
          "policy": {
              "type": "k8s"
          },

Should be
            "assign_ipv4": "{{ "true" if cluster_network_ipv4 else "false" }}",
            "assign_ipv6": "{{ "true" if cluster_network_ipv6 else "false" }}"
          },
          "policy": {
              "type": "k8s"
          },

Severity
--------
Major

Steps to Reproduce
------------------
Step1: Install STX2.0
Step2: Prepare localhost.yml
Step3: Run ansible-playbook
Step4: See /var/log/daemon.log <-- Show error

Expected Behavior
------------------
No error in kubelet.

Actual Behavior
----------------
Error from kublet

Reproducibility
---------------
Reproducible

System Configuration
---------------
One node system

Branch/Pull Time/Commit
-----------------------

Last Pass
---------

Timestamp/Logs
--------------
Attached localhost.yml

Test Activity
-------------
Evaluation

Revision history for this message
Brent Rowsell (brent-rowsell) wrote :

Please attach your localhost.yml

Revision history for this message
Takeo Komiyama (tkomiyam) wrote :
description: updated
Ghada Khalil (gkhalil)
tags: removed: stx.2.0
Revision history for this message
Ghada Khalil (gkhalil) wrote :

Can you confirm that you are using the build at: http://mirror.starlingx.cengn.ca/mirror/starlingx/release/2.0.0/centos/ ?

Otherwise, if you are building your own load, please provide the branch and date

Changed in starlingx:
status: New → Incomplete
Revision history for this message
Takeo Komiyama (tkomiyam) wrote :
Revision history for this message
Ghada Khalil (gkhalil) wrote :

Assigning to Tee to triage. I don't think anyone else is reporting this syntax issue. Will wait for her findings before deciding on importance/release gate.

Changed in starlingx:
assignee: nobody → Tee Ngo (teewrs)
Ghada Khalil (gkhalil)
tags: added: stx.config
Revision history for this message
Al Bailey (albailey1974) wrote :
Revision history for this message
Ghada Khalil (gkhalil) wrote :

Marking as stx.2.0 - It's unclear that there is any impact to this syntax error, but the change is very simple change and would remove the noise from the logs.

Plan to fix in master and cherrypick to r/stx.2.0

tags: added: stx.2.0
Changed in starlingx:
importance: Undecided → High
status: Incomplete → In Progress
assignee: Tee Ngo (teewrs) → Al Bailey (albailey1974)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ansible-playbooks (master)

Fix proposed to branch: master
Review: https://review.opendev.org/683979

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ansible-playbooks (master)

Reviewed: https://review.opendev.org/683979
Committed: https://git.openstack.org/cgit/starlingx/ansible-playbooks/commit/?id=c0e884264a2d7d33a4a3728d0eb71af4577680a7
Submitter: Zuul
Branch: master

commit c0e884264a2d7d33a4a3728d0eb71af4577680a7
Author: Al Bailey <email address hidden>
Date: Fri Sep 20 15:25:49 2019 -0500

    Fix a yaml syntax error in calico CNI configuration

    This correctly updates the yaml and eliminates the
    "error parsing configuration list" from the daemon.log

    Change-Id: Ic7dcbd022af5a57acb95cb098cd7003bc6c79753
    Closes-Bug: 1843453
    Signed-off-by: Al Bailey <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ansible-playbooks (r/stx.2.0)

Fix proposed to branch: r/stx.2.0
Review: https://review.opendev.org/684412

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ansible-playbooks (r/stx.2.0)

Reviewed: https://review.opendev.org/684412
Committed: https://git.openstack.org/cgit/starlingx/ansible-playbooks/commit/?id=fd66ac53b2521f96bbcb46e3214b344d9c3200e7
Submitter: Zuul
Branch: r/stx.2.0

commit fd66ac53b2521f96bbcb46e3214b344d9c3200e7
Author: Al Bailey <email address hidden>
Date: Fri Sep 20 15:25:49 2019 -0500

    Fix a yaml syntax error in calico CNI configuration

    This correctly updates the yaml and eliminates the
    "error parsing configuration list" from the daemon.log

    Change-Id: Ic7dcbd022af5a57acb95cb098cd7003bc6c79753
    Closes-Bug: 1843453
    Signed-off-by: Al Bailey <email address hidden>

Ghada Khalil (gkhalil)
tags: added: in-r-stx20
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.