[CB 4.0.1.0-29] Contrail-ansible: Task "Add contrail yum repo" failing on Redhat

Bug #1712227 reported by chhandak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R4.0
Fix Committed
Critical
Dheeraj Gautam
Trunk
Fix Committed
Critical
Dheeraj Gautam

Bug Description

While trying to bring up contrail cluster using contrail-ansible directly on RedHat cluster, hitting below provisioning error. This is part of bringing up open shift cluster.

Error
-------
TASK [docker : Add contrail yum repo {{contrail_image_id}}] ********************
fatal: [10.87.121.34]: FAILED! => {"failed": true, "msg": "the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'contrail_image_id' is undefined\n\nThe error appears to have been in '/root/Openshift/contrail-ansible/playbooks/roles/docker/tasks/host/RedHat.yml': line 2, 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: \"Add contrail yum repo {{contrail_image_id}}\"\n ^ here\nWe could be wrong, but this one looks like it might be an issue with\nmissing quotes. Always quote template expression brackets when they\nstart a value. For instance:\n\n with_items:\n - {{ foo }}\n\nShould be written as:\n\n with_items:\n - \"{{ foo }}\"\n"}
fatal: [10.87.121.35]: FAILED! => {"failed": true, "msg": "the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'contrail_image_id' is undefined\n\nThe error appears to have been in '/root/Openshift/contrail-ansible/playbooks/roles/docker/tasks/host/RedHat.yml': line 2, 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: \"Add contrail yum repo {{contrail_image_id}}\"\n ^ here\nWe could be wrong, but this one looks like it might be an issue with\nmissing quotes. Always quote template expression brackets when they\nstart a value. For instance:\n\n with_items:\n - {{ foo }}\n\nShould be written as:\n\n with_items:\n - \"{{ foo }}\"\n"}
fatal: [10.87.121.36]: FAILED! => {"failed": true, "msg": "the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'contrail_image_id' is undefined\n\nThe error appears to have been in '/root/Openshift/contrail-ansible/playbooks/roles/docker/tasks/host/RedHat.yml': line 2, 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: \"Add contrail yum repo {{contrail_image_id}}\"\n ^ here\nWe could be wrong, but this one looks like it might be an issue with\nmissing quotes. Always quote template expression brackets when they\nstart a value. For instance:\n\n with_items:\n - {{ foo }}\n\nShould be written as:\n\n with_items:\n - \"{{ foo }}\"\n"}
        to retry, use: --limit @/root/Openshift/contrail-ansible/playbooks/site.retry

PLAY RECAP *********************************************************************
10.87.121.34 : ok=14 changed=2 unreachable=0 failed=1
10.87.121.35 : ok=14 changed=2 unreachable=0 failed=1
10.87.121.36 : ok=14 changed=2 unreachable=0 failed=1
localhost : ok=1 changed=0 unreachable=0 failed=0

root@5b6s33:~/Openshift/contrail-ansible/playbooks# cat /root/Openshift/contrail-ansible/playbooks/roles/docker/tasks/host/RedHat.yml
---
- name: "Add contrail yum repo {{contrail_image_id}}"
  yum_repository:
    name: "{{contrail_image_id}}" ------> Undefined varible
    file: cobbler-config
    description: "Contrail Package Repo"
    baseurl: "{{contrail_yum_repo}}"
    priority: 1
    gpgcheck: no

- name: install docker using package
  yum:
     name: "{{ docker_package_name }}"
     state: latest
root@5b6s33:~/Openshift/contrail-ansible/playbooks#

chhandak (chhandak)
Changed in juniperopenstack:
importance: Undecided → Critical
milestone: none → r4.0.1.0
information type: Proprietary → Public
Rudra Rugge (rrugge)
Changed in juniperopenstack:
assignee: nobody → Nagendra Prasath (npchandran)
Revision history for this message
Nagendra Prasath (npchandran) wrote :
Changed in juniperopenstack:
assignee: Nagendra Prasath (npchandran) → nobody
assignee: nobody → Dheeraj Gautam (dgautam)
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.0

Review in progress for https://review.opencontrail.org/34927
Submitter: Dheeraj Gautam (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/34928
Submitter: Dheeraj Gautam (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.0

Review in progress for https://review.opencontrail.org/34927
Submitter: Dheeraj Gautam (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/34927
Committed: http://github.com/Juniper/contrail-ansible/commit/57e12cfa5f80dc124cb53fc7f726e29d97874806
Submitter: Zuul (<email address hidden>)
Branch: R4.0

commit 57e12cfa5f80dc124cb53fc7f726e29d97874806
Author: Dheeraj Gautam <email address hidden>
Date: Fri Aug 25 12:50:43 2017 -0700

add repo only if contrail_image_id is defined and not empty

Closes-Bug: #1712227

PATCH-2:
remove condition for installing docker

Change-Id: Icf377e9d828d12de754e1689dea0968e621c7e7b

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/34928
Committed: http://github.com/Juniper/contrail-ansible/commit/3e2ef79b833b084afbfb00681f3c3c7ef6049ec5
Submitter: Zuul (<email address hidden>)
Branch: master

commit 3e2ef79b833b084afbfb00681f3c3c7ef6049ec5
Author: Dheeraj Gautam <email address hidden>
Date: Fri Aug 25 12:50:43 2017 -0700

add repo only if contrail_image_id is defined and not empty

Closes-Bug: #1712227

PATCH-2:
remove condition for installing docker

Change-Id: Icf377e9d828d12de754e1689dea0968e621c7e7b

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.