ansible deploy yielding undefined variable

Bug #1482406 reported by Jeff Peeler
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
kolla
Fix Released
Critical
Sam Yaple

Bug Description

[vagrant@operator ansible]$ ansible-playbook -i inventory/multinode -e @/etc/kolla/defaults.yml -e @/etc/kolla/globals.yml -e @/etc/kolla/passwords.yml site.yml

PLAY [haproxy] ****************************************************************

GATHERING FACTS ***************************************************************
ok: [network01]

TASK: [haproxy | Ensuring config directory exists] ****************************
ok: [network01]

TASK: [haproxy | Copying over config(s)] **************************************
fatal: [network01] => {'msg': "AnsibleUndefinedVariable: One or more undefined variables: 'dict object' has no attribute u'ansible_eth0'", 'failed': True}
fatal: [network01] => {'msg': "AnsibleUndefinedVariable: One or more undefined variables: 'dict object' has no attribute u'ansible_eth0'", 'failed': True}

FATAL: all hosts have already failed -- aborting

PLAY RECAP ********************************************************************
           to retry, use: --limit @/home/vagrant/site.retry

network01 : ok=2 changed=0 unreachable=1 failed=0

----

Another run on a different setup (harm's):

fatal: [support01] => {'msg': "AnsibleUndefinedVariable: One or more undefined variables: 'dict object' has no attribute u'ansible_enp0s8'", 'failed': True}

Revision history for this message
Jeff Peeler (jpeeler-z) wrote :

haproxy related

Revision history for this message
Jeff Peeler (jpeeler-z) wrote :

I'm closing this based on the fact that I was able to get past this upon changing my network configuration.

Changed in kolla:
status: New → Invalid
Revision history for this message
weiyu (weiyu) wrote :

I met the same problem

Changed in kolla:
status: Invalid → New
Revision history for this message
weiyu (weiyu) wrote :

        },
        "ansible_eth0": {
            "active": true,
            "device": "eth0",
            "ipv4": {
                "address": "192.168.20.20",
                "netmask": "255.255.255.0",
                "network": "192.168.20.0"
            },
            "ipv6": [
                {
                    "address": "fe80::f816:3eff:fe16:5b17",
                    "prefix": "64",
                    "scope": "link"
                }
            ],
            "macaddress": "fa:16:3e:16:5b:17",
            "module": "virtio_net",
            "mtu": 1500,
            "promisc": false,
            "type": "ether"
        },
        "ansible_eth1": {
            "active": true,
            "device": "eth1",
            "ipv4": {
                "address": "192.168.30.9",
                "netmask": "255.255.255.0",
                "network": "192.168.30.0"
            },
            "ipv6": [
                {
                    "address": "fe80::f816:3eff:fed0:4e8a",
                    "prefix": "64",
                    "scope": "link"

Revision history for this message
Jeff Peeler (jpeeler-z) wrote :

So I closed this bug prematurely and also am still seeing this. The network reconfiguration did not stop ansible's complaint.

Revision history for this message
Steven Dake (sdake) wrote :

did you set the network interface to a non-eth0 in /etc/kolla/globals.yml as stated in the documentation?

Changed in kolla:
milestone: none → liberty-3
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Steven Dake (sdake) wrote :

This is a confirmed bug that Sam understands how to fix.

For a quick workaround when doing multinode deployment, every node that is in control or compute should also be in the [network] block in the multinode inventory file.

Changed in kolla:
assignee: nobody → Sam Yaple (s8m)
importance: Low → Critical
milestone: liberty-3 → liberty-rc1
status: Triaged → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on kolla (master)

Change abandoned by Vladislav Belogrudov (<email address hidden>) on branch: master
Review: https://review.openstack.org/220923
Reason: we need different solution that includes either caching or fixing haproxy role

Revision history for this message
Paul Bourke (pauldbourke) wrote :

sdake's workaround did not work for me, Vlad's does https://review.openstack.org/#/c/220923/2 until permanent fix is made.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla (master)

Fix proposed to branch: master
Review: https://review.openstack.org/220970

Changed in kolla:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla (master)

Reviewed: https://review.openstack.org/220970
Committed: https://git.openstack.org/cgit/stackforge/kolla/commit/?id=c68c9d95fca6485c79a607b3716a88e284c7a64e
Submitter: Jenkins
Branch: master

commit c68c9d95fca6485c79a607b3716a88e284c7a64e
Author: Sam Yaple <email address hidden>
Date: Mon Sep 7 12:04:28 2015 +0000

    Gather facts from the hosts before using them

    Haproxy needs to have gathered facts from all hosts that it will use
    information about. In this case it must talk to all of the api hosts
    as well as the database and rabbitmq hosts before generating the
    configuration file.

    Change-Id: I99b7dbebd5a6193e192ee258ddf576d18db90ed7
    Closes-Bug: #1482406

Changed in kolla:
status: In Progress → Fix Committed
Sam Yaple (s8m)
Changed in kolla:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.