[ 4.0.3.0-113] Provisioning fails on re triggering provision_containers.sh without making any change in the json file

Bug #1730566 reported by Ankit Jain
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R4.0
Fix Committed
Undecided
Abhay Joshi
R4.1
Fix Committed
Undecided
Abhay Joshi
Trunk
Fix Committed
Undecided
Abhay Joshi

Bug Description

Steps:
1) Bring up the setup using the json file. Server manager is on nodei5
/opt/contrail/contrail_server_manager/provision_containers.sh -ni -j /root/regress_provision.json
2) Trigger /opt/contrail/contrail_server_manager/provision_containers.sh -ni -j /root/regress_provision.json again..

outcome: CN becomes unreachable

Reason seems to be the following:

preconfig tried to configure eth0 with the management IP using script interface_setup which failed because vhost0 was already up and configured with the IP which was a conflict and the VM became unreachable

json file:

{
    "cluster" : [
        {
            "id" : "nodel11_cluster",
            "parameters" : {
                "provision": {
                    "contrail_4": {
                        "enable_lbaas": true,
                        "global_config": {
                            "xmpp_auth_enable": true,
                            "xmpp_dns_auth_enable": true
                        },
                        "kernel_upgrade": false,
                        "ha": {
                            "contrail_external_vip": "10.204.217.34"
                        }
                    },
                    "openstack":{
                        "ha": {
                            "external_vip": "10.204.217.89",
                            "internal_vip": "10.204.217.89",
                            "external_virtual_router_id": "201"
                        },
                        "multi_tenancy": true,
                        "openstack_manage_amqp": true,
                        "keystone": {
                            "admin_password": "contrail123",
                            "admin_token": "admin"
                        }
                    }
                }
            }
        }
    ],
    "server": [
        {
              "cluster_id": "nodel11_cluster",
              "domain": "englab.juniper.net",
              "id": "nodel11-vm1",
              "password": "c0ntrail123",
              "network": {
                  "management_interface": "eth0",
                  "interfaces": [
                      {
                          "default_gateway": "10.204.217.254",
                          "dhcp": true,
                          "ip_address": "10.204.217.31/24",
                          "mac_address": "52:53:58:01:00:01",
                          "name": "eth0"
                      }
                  ]
              },
              "roles": ["openstack", "contrail-controller", "contrail-analytics", "contrail-analyticsdb"]
        },
        {
              "cluster_id": "nodel11_cluster",
              "domain": "englab.juniper.net",
              "id": "nodel11-vm2",
              "password": "c0ntrail123",
              "network": {
                  "management_interface": "eth0",
                  "interfaces": [
                      {
                          "default_gateway": "10.204.217.254",
                          "dhcp": true,
                          "ip_address": "10.204.217.32/24",
                          "mac_address": "52:53:58:01:00:02",
                          "name": "eth0"
                      }
                  ]
              },
              "roles": ["openstack", "contrail-controller", "contrail-analytics", "contrail-analyticsdb"]
        },
        {
              "cluster_id": "nodel11_cluster",
              "domain": "englab.juniper.net",
              "id": "nodel11-vm3",
              "password": "c0ntrail123",
              "network": {
                  "management_interface": "eth0",
                  "interfaces": [
                      {
                          "default_gateway": "10.204.217.254",
                          "dhcp": true,
                          "ip_address": "10.204.217.33/24",
                          "mac_address": "52:53:58:01:00:03",
                          "name": "eth0"
                      }
                  ]
              },
              "roles": ["openstack", "contrail-controller", "contrail-analytics", "contrail-analyticsdb"]
        },
        {
              "cluster_id": "nodel11_cluster",
              "domain": "englab.juniper.net",
              "id": "nodel11-vm4",
              "password": "c0ntrail123",
              "network": {
                  "management_interface": "eth0",
                  "interfaces": [
                      {
                          "default_gateway": "10.204.217.254",
                          "dhcp": true,
                          "ip_address": "10.204.217.34/24",
                          "mac_address": "52:53:58:01:00:04",
                          "name": "eth0"
                      }
                  ]
              },
              "roles": ["contrail-lb"]
        },
        {
              "cluster_id": "nodel11_cluster",
              "domain": "englab.juniper.net",
              "id": "nodel11-vm5",
              "password": "c0ntrail123",
              "network": {

                  "management_interface": "eth0",
                  "interfaces": [
                      {
                          "default_gateway": "10.204.217.254",
                          "dhcp": true,
                          "ip_address": "10.204.217.36/24",
                          "mac_address": "52:53:58:01:00:05",
                          "name": "eth0"
                      }
                  ]
              },
              "roles": ["contrail-compute"]
        }
    ],

    "image": [
        {
            "category": "package",
            "id": "regress_image",
            "type": "contrail-ubuntu-package",
            "path": "/root/contrail-cloud-docker_4.0.3.0-113-mitaka_trusty.tgz",
            "version": "R4.1"
        }
    ]
}

Logs and Json file copied at :

/cs-shared/bugs/<bug-id>/

Revision history for this message
Ritam Gangopadhyay (ritam) wrote :

Fix:-

root@nodei5:/opt/contrail/server_manager/client# diff preconfig.py preconfig_old.py
301c301
< cmd = 'grep -rn "set vhost0 address" /etc/network/'
---
> cmd = 'grep "set vhost0 address" /etc/network/interfaces'
root@nodei5:/opt/contrail/server_manager/client#

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

Review in progress for https://review.opencontrail.org/37302
Submitter: Ritam Gangopadhyay (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/37303
Submitter: Ritam Gangopadhyay (<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/37304
Submitter: Ritam Gangopadhyay (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/37303
Committed: http://github.com/Juniper/contrail-server-manager/commit/7097eb768caa97e3f051da1a03a47f020b467155
Submitter: Zuul (<email address hidden>)
Branch: R4.1

commit 7097eb768caa97e3f051da1a03a47f020b467155
Author: Ritam Gangopadhyay <email address hidden>
Date: Wed Nov 8 16:28:34 2017 +0530

In ubuntu-14.04 the interface configuration file is under
/etc/network/interfaces.d/<interface name>.cfg which is inherited
in /etc/network/interfaces.
So changing the code to skip re-configuring interfaces on
compute nodes.

Change-Id: Iedc5f0e70678b211040ed58be14966048b98cec9
Closes-Bug: #1730566

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

Reviewed: https://review.opencontrail.org/37302
Committed: http://github.com/Juniper/contrail-server-manager/commit/39fac76387dffeb8300b720d9c4f14ceda920b5c
Submitter: Zuul (<email address hidden>)
Branch: R4.0

commit 39fac76387dffeb8300b720d9c4f14ceda920b5c
Author: Ritam Gangopadhyay <email address hidden>
Date: Wed Nov 8 16:28:34 2017 +0530

In ubuntu-14.04 the interface configuration file is under
/etc/network/interfaces.d/<interface name>.cfg which is inherited
in /etc/network/interfaces.
So changing the code to skip re-configuring interfaces on
compute nodes.

Change-Id: Iedc5f0e70678b211040ed58be14966048b98cec9
Closes-Bug: #1730566

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

Reviewed: https://review.opencontrail.org/37304
Committed: http://github.com/Juniper/contrail-server-manager/commit/bf4e152672392ccbdef5873bf624f2e0b12d5fe2
Submitter: Zuul (<email address hidden>)
Branch: master

commit bf4e152672392ccbdef5873bf624f2e0b12d5fe2
Author: Ritam Gangopadhyay <email address hidden>
Date: Wed Nov 8 16:28:34 2017 +0530

In ubuntu-14.04 the interface configuration file is under
/etc/network/interfaces.d/<interface name>.cfg which is inherited
in /etc/network/interfaces.
So changing the code to skip re-configuring interfaces on
compute nodes.

Change-Id: Iedc5f0e70678b211040ed58be14966048b98cec9
Closes-Bug: #1730566

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.