multicloud: deploy_and_run_all with insecure registry bails out

Bug #1785899 reported by Senthilnathan Murugappan
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R5.0
Fix Committed
High
Damian Rakowski
Trunk
Fix Committed
High
Damian Rakowski

Bug Description

deploy_and_run_all with insecure registry specified in ansible/gateway/common.yml bails out

In ./ansible/gateway/common.yml have set below
REGISTRY_PRIVATE_INSECURE: True

Ansible Error:

TASK [docker/install : convert entries to json] **********************************************************************************************************************************************************
fatal: [172.16.23.4]: FAILED! => {"failed": true, "msg": "the field 'args' has an invalid value ([]), and could not be converted to an dict.The error was: Extra data: line 6 column 1 - line 10 column 2 (char 76 - 151)\n\nThe error appears to have been in '/root/multicloud/ansible/gateway/playbooks/roles/docker/install/tasks/insecure_registry.yaml': line 21, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: convert entries to json\n ^ here\n\nexception type: <type 'exceptions.ValueError'>\nexception: Extra data: line 6 column 1 - line 10 column 2 (char 76 - 151)"}
fatal: [192.168.2.1]: FAILED! => {"failed": true, "msg": "the field 'args' has an invalid value ([]), and could not be converted to an dict.The error was: Extra data: line 6 column 1 - line 10 column 2 (char 76 - 151)\n\nThe error appears to have been in '/root/multicloud/ansible/gateway/playbooks/roles/docker/install/tasks/insecure_registry.yaml': line 21, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: convert entries to json\n ^ here\n\nexception type: <type 'exceptions.ValueError'>\nexception: Extra data: line 6 column 1 - line 10 column 2 (char 76 - 151)"}

tags: added: releaseblocker
tags: added: beta-blocker
Revision history for this message
Senthilnathan Murugappan (msenthil) wrote :

root@ms-gw-1:~# cat /etc/docker/daemon.json
{
    "insecure-registries": [
        "damianrakowski"
    ]
}
{
    "bip": "198.18.0.1/24",
    "ip-masq": true,
    "iptables": true
}

The json file that got generated is wrong

information type: Proprietary → Public
Revision history for this message
Sanju Abraham (asanju) wrote :

will fix this. Some merge code changes it. Also ansible state does not seem to work here. Will provide the fix soon. ETA - by Friday.

Revision history for this message
Damian Rakowski (attil) wrote :

The following PR should fix this issue: https://github.com/Juniper/contrail-multi-cloud/pull/190.

The issue was simple line-by-line generation of daemon.json instead of combining new properties with the old ones.

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.