Duplicate declaration: Keepalived::Instance[55]

Bug #1754679 reported by Juan Badia Payno
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
waleed mousa

Bug Description

Deploying TripleO with tripleo-quickstart, the following error showed up on the overcloud-deployment step.

The following error was on the failed_deployment_list.log file:

"Error: Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: Keepalived::Instance[55] is already declared in file /etc/puppet/modules/tripleo/manifests/keepalived.pp:186; cannot redeclare at /etc/puppet/modules/tripleo/manifests/keepalived.pp:186 at /etc/puppet/modules/tripleo/manifests/keepalived.pp:186:7 on node overcloud-controller-0.localdomain"

To reproduce the error:
=======================
1.- clone tripleo-quickstart
2.- exucute:
/quickstart.sh -X -T all --retain-inventory -t untagged,provision,environment,libvirt,undercloud-scripts,undercloud-inventory,overcloud-scripts,undercloud-setup,undercloud-install,undercloud-post-install,tripleoui-validate,overcloud-prep-config --requirements quickstart-extras-requirements.txt -N config/nodes/1ctlr_1comp_64gb.yml -c /home/installer/.quickstart/config/general_config/containers_minimal.yml -R master 192.168.1.45
3.-On the undercloud execute
3.1.- ./overcloud-prep-containers.sh
3.2.- ./overcloud-deploy.sh

A little exploration on the error:
==================================
On the overcloud-controller-0, the file /etc/puppet/hieradata/vip_data.json had
...
"network_virtual_ips": {
        "internal_api": {
            "index": 1,
            "ip_address": "172.16.2.11"
        },
        "storage": {
            "index": 1,
            "ip_address": "172.16.1.12"
        },
        "storage_mgmt": {
            "index": 1,
            "ip_address": "172.16.3.5"
        }
    }
...

The error is generated here https://github.com/openstack/puppet-tripleo/blob/master/manifests/keepalived.pp#L189 due to the same index on the virtual networks, (my thoughts)

I think the virtual_networks are created https://github.com/openstack/tripleo-heat-templates/blob/3004c31d72e2f5963bda6821f7bc3da47940ea75/puppet/all-nodes-config.j2.yaml#L182
 but I could not understand why the count variable is always set to 1.

Revision history for this message
Noam Angel (noama) wrote :

I have the same issue on queens branch

Changed in tripleo:
milestone: none → rocky-1
status: New → Triaged
importance: Undecided → High
Revision history for this message
Alex Schultz (alex-schultz) wrote :

Likely due to the code here:

http://git.openstack.org/cgit/openstack/tripleo-heat-templates/tree/puppet/all-nodes-config.j2.yaml#n181

The indexes need to be different but they are all being set to 1.

Revision history for this message
Noam Angel (noama) wrote :

I have tried to disable all networks vifs but deployment still fail

"Error: Evaluation Error: Error while evaluating a Function Call, invalid address: at /etc/puppet/modules/tripleo/manifests/profile/base/keepalived.pp:66:38 on node overcloud-controller-0.localdomain

Revision history for this message
Alex Schultz (alex-schultz) wrote :

btw it might be related to jinja 2.10. I think that just came out recently

Revision history for this message
Moshe Levi (moshele) wrote :

seem that using loop.index will solve the problem. Waleed will post a patch for this.

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

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

Changed in tripleo:
assignee: nobody → waleed mousa (waleedm)
status: Triaged → In Progress
tags: added: pike-backport-potential queens-backport-potential
Revision history for this message
Ben Nemec (bnemec) wrote :

According to https://pypi.python.org/pypi/Jinja2 it was released in November, but it looks like it just got packaged in RDO recently. Or at least was update recently.

python2-jinja2-2.10-2.el7.noarch.rpm 2018-03-07 23:58 526K

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (master)

Reviewed: https://review.openstack.org/551776
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=77ae5a61a0adc2b59be55b87970a68fe203d1794
Submitter: Zuul
Branch: master

commit 77ae5a61a0adc2b59be55b87970a68fe203d1794
Author: waleed mousa <email address hidden>
Date: Sun Mar 11 09:40:10 2018 -0400

    Replacing the count with loop.index for indexing

    Replacing the count with loop.index in all-nodes-config.j2.yaml
    after the Jinja changes

    Change-Id: Id703f6c85f27cdde0b2d48b18e938e55d31a491a
    Closes-Bug: #1754679

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/552421

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (stable/queens)

Reviewed: https://review.openstack.org/552421
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=eb34fa2994d010ac708417eef4fd731fcaf9a281
Submitter: Zuul
Branch: stable/queens

commit eb34fa2994d010ac708417eef4fd731fcaf9a281
Author: waleed mousa <email address hidden>
Date: Sun Mar 11 09:40:10 2018 -0400

    Replacing the count with loop.index for indexing

    Replacing the count with loop.index in all-nodes-config.j2.yaml
    after the Jinja changes

    Change-Id: Id703f6c85f27cdde0b2d48b18e938e55d31a491a
    Closes-Bug: #1754679
    (cherry picked from commit 77ae5a61a0adc2b59be55b87970a68fe203d1794)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 9.0.0.0b1

This issue was fixed in the openstack/tripleo-heat-templates 9.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 9.0.0.0b2

This issue was fixed in the openstack/tripleo-heat-templates 9.0.0.0b2 development milestone.

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.