Custom ASN for control-node is not being set

Bug #1391177 reported by Vedamurthy Joshi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Fix Committed
High
Ignatious Johnson Christopher

Bug Description

2.0 Build 2446 Ubuntu 12.04-3 Single node setup

nodec27 is configured to peer with 10.204.216.253 (MX) with ASN 64510 and RT 10003

But it is seen that in API Server, the ASN for nodec27 is set to value of 64512 and peering with MX is not happening.
global-system-config has ASN of 64512

Logs will be in http://10.204.216.50/Docs/bugs/#

The configuration was done with provisioning scripts :

2014-11-09 14:12:28:989867: [root@10.204.217.12] run: python provision_control.py --api_server_ip 10.204.217.12 --api_server_port 8082 --router_asn 64510 --host_name nodec27 --host_ip 10.204.217.12 --admin_user admin --admin_password contrail123 --admin_tenant_name admin --oper add
2014-11-09 14:12:28:990033: [root@10.204.217.12] Executing task 'prov_external_bgp'
2014-11-09 14:12:29:346652: [root@10.204.217.12] run: python provision_mx.py --api_server_ip 10.204.217.12 --api_server_port 8082 --router_name mx1 --router_ip 10.204.216.253 --router_asn 64510 --admin_user admin --admin_password contrail123 --admin_tenant_name admin

root@nodec27:/opt/contrail/utils# curl -u admin:contrail123 http://127.0.0.1:8095/global-system-config/93fd03f3-e878-4d73-a1dd-4eab14dbc09e | python -m json.tool
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
100 1351 100 1351 0 0 244k 0 --:--:-- --:--:-- --:--:-- 263k
{
    "global-system-config": {
        "autonomous_system": 64512,
        "config_version": "1.0",
        "fq_name": [
            "default-global-system-config"
        ],
        "global_vrouter_configs": [
            {
                "href": "http://127.0.0.1:8095/global-vrouter-config/42a361b2-7141-4dd7-a491-bc6a60c8f32b",
                "to": [
                    "default-global-system-config",
                    "default-global-vrouter-config"
                ],
                "uuid": "42a361b2-7141-4dd7-a491-bc6a60c8f32b"
            }
        ],
        "href": "http://127.0.0.1:8095/global-system-config/93fd03f3-e878-4d73-a1dd-4eab14dbc09e",
        "id_perms": {
            "created": "2014-11-09T08:41:20.046845",
            "description": null,
            "enable": true,
            "last_modified": "2014-11-09T08:41:20.046845",
            "permissions": {
                "group": "cloud-admin-group",
                "group_access": 7,
                "other_access": 7,
                "owner": "cloud-admin",
                "owner_access": 7
            },
            "user_visible": true,
            "uuid": {
                "uuid_lslong": 11663565106655772830,
                "uuid_mslong": 10663683838795337075
            }
        },
        "name": "default-global-system-config",
        "physical_routers": [
            {
                "href": "http://127.0.0.1:8095/physical-router/b4b3a6a1-e002-487a-88cf-31b899152788",
                "to": [
                    "default-global-system-config",
                    "default-physical-router"
                ],
                "uuid": "b4b3a6a1-e002-487a-88cf-31b899152788"
            }
        ],
        "uuid": "93fd03f3-e878-4d73-a1dd-4eab14dbc09e",
        "virtual_routers": [
            {
                "href": "http://127.0.0.1:8095/virtual-router/d5861225-0b5a-431c-94ed-2493c2f208f4",
                "to": [
                    "default-global-system-config",
                    "nodec27"
                ],
                "uuid": "d5861225-0b5a-431c-94ed-2493c2f208f4"
            }
        ]
    }
}
root@nodec27:/opt/contrail/utils#
root@nodec27:/opt/contrail/utils#
root@nodec27:/opt/contrail/utils# curl -u admin:contrail123 http://127.0.0.1:8095/bgp-routers
{"bgp-routers": [{"href": "http://127.0.0.1:8095/bgp-router/d8a462ff-f717-47da-92ac-a885d15ce478", "fq_name": ["default-domain", "default-project", "ip-fabric", "__default__", "mx1"], "uuid": "d8a462ff-f717-47da-92ac-a885d15ce478"}, {"href": "http://127.0.0.1:8095/bgp-router/c16849ce-afa7-46ec-838c-508f010cecae", "fq_name": ["default-domain", "default-project", "ip-fabric", "__default__", "nodec27"], "uuid": "c16849ce-afa7-46ec-838c-508f010cecae"}]}root@nodec27:/opt/contrail/utils#
root@nodec27:/opt/contrail/utils#
root@nodec27:/opt/contrail/utils#
root@nodec27:/opt/contrail/utils# curl -u admin:contrail123 http://127.0.0.1:8095/bgp-router/d8a462ff-f717-47da-92ac-a885d15ce478 | python -m json.tool
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
100 1479 100 1479 0 0 541k 0 --:--:-- --:--:-- --:--:-- 722k
{
    "bgp-router": {
        "bgp_router_parameters": {
            "address": "10.204.216.253",
            "address_families": {
                "family": [
                    "route-target",
                    "inet-vpn",
                    "e-vpn",
                    "inet6-vpn"
                ]
            },
            "autonomous_system": 64510,
            "hold_time": 90,
            "identifier": "10.204.216.253",
            "port": 179,
            "vendor": "mx",
            "vnc_managed": null
        },
        "bgp_router_refs": [
            {
                "attr": {
                    "session": [
                        {
                            "attributes": [
                                {
                                    "address_families": {
                                        "family": [
                                            "route-target",
                                            "inet-vpn",
                                            "e-vpn",
                                            "inet6-vpn"
                                        ]
                                    },
                                    "bgp_router": null
                                }
                            ],
                            "uuid": null
                        }
                    ]
                },
                "href": "http://127.0.0.1:8095/bgp-router/c16849ce-afa7-46ec-838c-508f010cecae",
                "to": [
                    "default-domain",
                    "default-project",
                    "ip-fabric",
                    "__default__",
                    "nodec27"
                ],
                "uuid": "c16849ce-afa7-46ec-838c-508f010cecae"
            }
        ],
        "display_name": "mx1",
        "fq_name": [
            "default-domain",
            "default-project",
            "ip-fabric",
            "__default__",
            "mx1"
        ],
        "href": "http://127.0.0.1:8095/bgp-router/d8a462ff-f717-47da-92ac-a885d15ce478",
        "id_perms": {
            "created": "2014-11-10T14:08:59.463430",
            "description": null,
            "enable": true,
            "last_modified": "2014-11-10T14:08:59.697076",
            "permissions": {
                "group": "KeystoneAdmin",
                "group_access": 7,
                "other_access": 7,
                "owner": "admin",
                "owner_access": 7
            },
            "user_visible": true,
            "uuid": {
                "uuid_lslong": 10569007718228354168,
                "uuid_mslong": 15610711059874662362
            }
        },
        "name": "mx1",
        "parent_href": "http://127.0.0.1:8095/routing-instance/5a0727ee-20cd-498c-8ae7-6312f89d22fb",
        "parent_type": "routing-instance",
        "parent_uuid": "5a0727ee-20cd-498c-8ae7-6312f89d22fb",
        "uuid": "d8a462ff-f717-47da-92ac-a885d15ce478"
    }
}
root@nodec27:/opt/contrail/utils# curl -u admin:contrail123 http://127.0.0.1:8095/bgp-router/c16849ce-afa7-46ec-838c-508f010cecae | python -m json.tool
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
100 1501 100 1501 0 0 531k 0 --:--:-- --:--:-- --:--:-- 732k
{
    "bgp-router": {
        "bgp_router_parameters": {
            "address": "10.204.217.12",
            "address_families": {
                "family": [
                    "route-target",
                    "inet-vpn",
                    "e-vpn",
                    "erm-vpn",
                    "inet6-vpn"
                ]
            },
            "autonomous_system": 64512,
            "hold_time": 90,
            "identifier": "10.204.217.12",
            "port": 179,
            "vendor": "contrail",
            "vnc_managed": null
        },
        "bgp_router_refs": [
            {
                "attr": {
                    "session": [
                        {
                            "attributes": [
                                {
                                    "address_families": {
                                        "family": [
                                            "route-target",
                                            "inet-vpn",
                                            "e-vpn",
                                            "inet6-vpn"
                                        ]
                                    },
                                    "bgp_router": null
                                }
                            ],
                            "uuid": null
                        }
                    ]
                },
                "href": "http://127.0.0.1:8095/bgp-router/d8a462ff-f717-47da-92ac-a885d15ce478",
                "to": [
                    "default-domain",
                    "default-project",
                    "ip-fabric",
                    "__default__",
                    "mx1"
                ],
                "uuid": "d8a462ff-f717-47da-92ac-a885d15ce478"
            }
        ],
        "display_name": "nodec27",
        "fq_name": [
            "default-domain",
            "default-project",
            "ip-fabric",
            "__default__",
            "nodec27"
        ],
        "href": "http://127.0.0.1:8095/bgp-router/c16849ce-afa7-46ec-838c-508f010cecae",
        "id_perms": {
            "created": "2014-11-10T14:08:08.514481",
            "description": null,
            "enable": true,
            "last_modified": "2014-11-10T14:08:08.835697",
            "permissions": {
                "group": "KeystoneAdmin",
                "group_access": 7,
                "other_access": 7,
                "owner": "admin",
                "owner_access": 7
            },
            "user_visible": true,
            "uuid": {
                "uuid_lslong": 9479039890836221102,
                "uuid_mslong": 13936470198957065964
            }
        },
        "name": "nodec27",
        "parent_href": "http://127.0.0.1:8095/routing-instance/5a0727ee-20cd-498c-8ae7-6312f89d22fb",
        "parent_type": "routing-instance",
        "parent_uuid": "5a0727ee-20cd-498c-8ae7-6312f89d22fb",
        "uuid": "c16849ce-afa7-46ec-838c-508f010cecae"
    }
}
root@nodec27:/opt/contrail/utils#

Tags: blocker config
Revision history for this message
Sachin Bansal (sbansal) wrote :

I think it broke because of the following commit. Ignatious, could you please take care of it?

commit 07fd9a0d5acb6b789dc0c24e850168795beeb409
Author: Ignatious Johnson <email address hidden>
Date: Sun Nov 2 20:34:42 2014 -0800:

In particular, the diff below will cause the global ASN to be not set, which will make schema transformer overwrite the router ASN with the global ASN for control node.

- run("python provision_control.py --api_server_ip %s --api_server_port 8082 --router_asn %s %s" \
- %(cfgm_ip, testbed.router_asn, get_mt_opts()))
- run("python provision_control.py --api_server_ip %s --api_server_port 8082 --host_name %s --host_ip %s --router_asn %s --oper add %s" \
- %(cfgm_ip, tgt_hostname, tgt_ip, testbed.router_asn, get_mt_opts()))
+ cmd = "python provision_control.py"
+ cmd += " --api_server_ip %s" % cfgm_ip
+ cmd += " --api_server_port 8082"
+ cmd += " --router_asn %s" % testbed.router_asn
+ cmd += " --host_name %s" % tgt_hostname
+ cmd += " --host_ip %s" % tgt_ip
+ cmd += " %s" % get_mt_opts()
+ cmd += " --oper add"
+ run(cmd)

Changed in juniperopenstack:
assignee: Sachin Bansal (sbansal) → Ignatious Johnson Christopher (ijohnson-x)
Revision history for this message
Vedamurthy Joshi (vedujoshi) wrote : Re: [Bug 1391177] Re: Custom ASN for control-node is not being set
Download full text (13.6 KiB)

Ignatious,
 Can you please take care ?
MX tests on sanity testbeds would fail due to this..

On 11/11/14, 12:13 AM, "Sachin Bansal" <email address hidden> wrote:

>I think it broke because of the following commit. Ignatious, could you
>please take care of it?
>
>commit 07fd9a0d5acb6b789dc0c24e850168795beeb409
>Author: Ignatious Johnson <email address hidden>
>Date: Sun Nov 2 20:34:42 2014 -0800:
>
>
>In particular, the diff below will cause the global ASN to be not set,
>which will make schema transformer overwrite the router ASN with the
>global ASN for control node.
>
>- run("python provision_control.py --api_server_ip %s
>--api_server_port 8082 --router_asn %s %s" \
>- %(cfgm_ip, testbed.router_asn, get_mt_opts()))
>- run("python provision_control.py --api_server_ip %s
>--api_server_port 8082 --host_name %s --host_ip %s --router_asn %s --oper
>add %s" \
>- %(cfgm_ip, tgt_hostname, tgt_ip,
>testbed.router_asn, get_mt_opts()))
>+ cmd = "python provision_control.py"
>+ cmd += " --api_server_ip %s" % cfgm_ip
>+ cmd += " --api_server_port 8082"
>+ cmd += " --router_asn %s" % testbed.router_asn
>+ cmd += " --host_name %s" % tgt_hostname
>+ cmd += " --host_ip %s" % tgt_ip
>+ cmd += " %s" % get_mt_opts()
>+ cmd += " --oper add"
>+ run(cmd)
>
>
>** Changed in: juniperopenstack
> Assignee: Sachin Bansal (sbansal) => Ignatious Johnson Christopher
>(ijohnson-x)
>
>--
>You received this bug notification because you are a member of Contrail
>Systems engineering, which is subscribed to Juniper Openstack.
>https://bugs.launchpad.net/bugs/1391177
>
>Title:
> Custom ASN for control-node is not being set
>
>Status in Juniper Openstack distribution:
> New
>
>Bug description:
> 2.0 Build 2446 Ubuntu 12.04-3 Single node setup
>
>
> nodec27 is configured to peer with 10.204.216.253 (MX) with ASN 64510
>and RT 10003
>
> But it is seen that in API Server, the ASN for nodec27 is set to value
>of 64512 and peering with MX is not happening.
> global-system-config has ASN of 64512
>
> Logs will be in http://10.204.216.50/Docs/bugs/#
>
> The configuration was done with provisioning scripts :
>
> 2014-11-09 14:12:28:989867: [root@10.204.217.12] run: python
>provision_control.py --api_server_ip 10.204.217.12 --api_server_port 8082
>--router_asn 64510 --host_name nodec27 --host_ip 10.204.217.12
>--admin_user admin --admin_password contrail123 --admin_tenant_name admin
>--oper add
> 2014-11-09 14:12:28:990033: [root@10.204.217.12] Executing task
>'prov_external_bgp'
> 2014-11-09 14:12:29:346652: [root@10.204.217.12] run: python
>provision_mx.py --api_server_ip 10.204.217.12 --api_server_port 8082
>--router_name mx1 --router_ip 10.204.216.253 --router_asn 64510
>--admin_user admin --admin_password contrail123 --admin_tenant_name admin
>
>
> root@nodec27:/opt/contrail/utils# curl -u admin:contrail123
>http://127.0.0.1:8095/global-system-config/93fd03f3-e878-4d73-a1dd-4eab14d
>bc09e | python -m json.tool
> % Total % Received % Xferd Average Speed Time Time Time
>Curre...

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

Reviewed: https://review.opencontrail.org/4513
Committed: http://github.org/Juniper/contrail-fabric-utils/commit/cce43b197229fd175da8a3003e7ce867a679360a
Submitter: Zuul
Branch: master

commit cce43b197229fd175da8a3003e7ce867a679360a
Author: Ignatious Johnson <email address hidden>
Date: Tue Nov 11 12:38:42 2014 -0800

Updating ASN in the Global system config

provison_control does two jobs,
1. Updates the ASN in the clobal sustem config
2. adds the control node as bgp router
So need to execute provision_control.py with required argument twice in
prov_control_bgp task.

Change-Id: Icfb0aec958015a72baf423c54fa337121ac336ba
Closes-Bug: 1391177

Changed in juniperopenstack:
status: New → Incomplete
status: Incomplete → Fix Committed
milestone: none → r2.0-fcs
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.