Contrail :: R4.1 build 3 mitaka :: global ASN is setting to default value even when we set non-default in json file.

Bug #1733859 reported by Ritam Gangopadhyay
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R4.0
Fix Committed
High
kamlesh parmar
R4.1
Fix Committed
High
kamlesh parmar
Trunk
Fix Committed
High
kamlesh parmar

Bug Description

The global asn value is not getting set to any non-default value. When we set a non-default value in json it reverts to 64512, the default value while provisioning.

Moreover the MX object is not getting created on the control node.

Attached are screen shots and logs for the details on the issue.

****************************************************************************************

****************************************************************************************

Topology :
DISTRO : "Ubuntu 14.04.5 LTS"
SKU : mitaka
Config Nodes : [u'nodei21', u'nodei22', u'nodei23']
Control Nodes : [u'nodei21', u'nodei22', u'nodei23']
Compute Nodes : [u'nodei24', u'nodei25', u'nodei26']
Openstack Node : [u'nodea1']
WebUI Node : [u'nodei21', u'nodei22', u'nodei23']
Analytics Nodes : [u'nodei21', u'nodei22', u'nodei23']
Database Nodes : [u'nodei21', u'nodei22', u'nodei23']
Physical D! evices : [u'hooper', u"'hooper'"]
LB Nodes : [u'nodea1']

****************************************************************************************

****************************************************************************************

Json file:-
root@nodei21:~# cat combined_i21_i26.json | grep asn -a3
                    },
                    "contrail_4": {
                        "controller_config": {
                            "bgp_asn": "64515", <<<< Non-default value set.
                            "encap_priority": "VXLAN,MPLSoUDP,MPLSoGRE",
                            "external_routers_list": {
                                "hooper": "10.204.217.240"
root@nodei21:~#

Inventory file:-
root@nodei21:~# cat /opt/contrail/server_manager/ansible/playbooks/ubuntu14mitaka3/playbooks/inventory/i21_i26_cluster.inv | grep asn
controller_config={'external_routers_list': {'hooper': '10.204.217.240'}, 'encap_priority': 'VXLAN,MPLSoUDP,MPLSoGRE', 'bgp_asn': '64515'} <<<<< Non default value set
root@nodei21:~#

****************************************************************************************

****************************************************************************************

Mx side configuration and connection setup after provisioning completed:-
root@hooper# show protocols bgp group nodei21_26
type internal;
local-address 10.204.217.240;
keep all;
family inet-vpn {
    unicast;
}
family route-target;
peer-as 64515;
local-as 64515;
neighbor 10.204.217.134;
neighbor 10.204.217.135;
neighbor 10.204.217.133;

[edit]
root@hooper#
root@hooper# run show bgp summary | grep 64515
10.204.217.133 64515 0 1 0 1 4:06:53 Active
10.204.217.134 64515 0 1 0 1 4:02:43 Active
10.204.217.135 64515 0 1 0 1 4:06:20 Active

[edit]
root@hooper#

****************************************************************************************

****************************************************************************************

Contrail-control.log shows that the non-default value was reverted back to default value of 64512

2017-11-22 Wed 14:12:06:968.926 IST nodei21 [Thread 47843577825024, Pid 585]: BGP [SYS_NOTICE]: BgpPeerNotificationNoticeLog: Bgp Peer 10.204.217.133:179::10.204.217.240:58435 SEND Notification with Code 6 and SubCode 3 ( Cease:Administrator has unconfigured the peer ) controller/src/bgp/bgp_session.cc 106
2017-11-22 Wed 14:14:25:451.663 IST nodei21 [Thread 47843716949760, Pid 585]: BGP [SYS_NOTICE]: BgpConfigNoticeLog: Updated Autonomous System from 64515 to 64512 controller/src/bgp/bgp_server.cc 228
2017-11-22 Wed 14:14:25:451.749 IST nodei21 [Thread 47843716949760, Pid 585]: BGP [SYS_NOTICE]: BgpConfigNoticeLog: Updated Local Autonomous System from 64515 to 64512 controller/src/bgp/bgp_server.cc 243
2017-11-22 Wed 14:14:35:052.232 IST nodei21 [Thread 47843582023424, Pid 585]: BGP [SYS_NOTICE]: BgpPeerNotificationNoticeLog: Bgp Peer 10.204.217.133:179::10.204.217.240:62916 SEND Notification with Code 6 and SubCode 3 ( Cease:Administrator has unconfigured the peer ) controller/src/bgp/bgp_session.cc 106

****************************************************************************************

****************************************************************************************

This shows that global ASN is set to 64512 and the MX object is not created on the control node. Screenshots of the fllowing are attached to the bug:-

http://nodei21.englab.juniper.net:8080/#p=config_infra_gblconfig&q%5Btab%5D%5Bglobal-config-tab%5D=bgp_options_tab

http://nodei21.englab.juniper.net:8080/#p=config_infra_bgp

****************************************************************************************

****************************************************************************************

Whereas in contrailctl controller conf file it is set to non-default value of 64515:-

root@nodei21(controller):/# grep -rn 64515 /etc/contrailctl/controller.conf
31:bgp_asn = 64515
root@nodei21(controller):/#

Revision history for this message
Ritam Gangopadhyay (ritam) wrote :
Revision history for this message
Ritam Gangopadhyay (ritam) wrote :
tags: added: sanityblocker
Sachin Bansal (sbansal)
Changed in juniperopenstack:
assignee: Sachin Bansal (sbansal) → Ignatious Johnson Christopher (ijohnson-x)
Revision history for this message
Ignatious Johnson Christopher (ijohnson-x) wrote :

Looked at the docker logs, provision_control.py and provision_mx.py are not trrigered from internal ansible.

This is expected as we have moved it out of contrail-ansible-internal to resolve the bug https://bugs.launchpad.net/juniperopenstack/+bug/1729416

confirmed that the fix is present in build 4.1.0.0-3 (keystone.yml) is removed.
root@nodei21(controller):/# ls /contrail-ansible-internal/playbooks/roles/contrail/control/tasks/provision/
main.yml noauth.yml
root@nodei21(controller):/#

SM team should confirm that the SM/external ansible side fix for bug https://bugs.launchpad.net/juniperopenstack/+bug/1729416 is present and is working.

Revision history for this message
Ramprakash R (ramprakash) wrote :

Was able to confirm from ansible verbose logs that the external ansible side is calling the provision_control.py script with the right ASN number parameter:

changed: [192.168.1.21] => (item={'key': u'192.168.10.21', 'value': u'server-1'}) => {
    "changed": true,
    "cmd": "docker exec controller /usr/share/contrail-utils/provision_control.py --use_admin_api --host_name server-1 --host_ip 192.168.10.21 --router_asn 64513 --oper add --admin_user admin --admin_password c0
ntrail123 --admin_tenant_name admin",
    "delta": "0:00:01.257508",
    "end": "2017-11-22 20:13:50.305871",
    "invocation": {
        "module_args": {
            "_raw_params": "docker exec controller /usr/share/contrail-utils/provision_control.py --use_admin_api --host_name server-1 --host_ip 192.168.10.21 --router_asn 64515 --oper add --admin_user admin --a
dmin_password c0ntrail123 --admin_tenant_name admin",
            "_uses_shell": true,
            "chdir": null,
            "creates": null,
            "executable": null,
            "removes": null,
            "warn": true
        }
    },

Revision history for this message
Ignatious Johnson Christopher (ijohnson-x) wrote :
Download full text (3.3 KiB)

From the following contrail-logs,

Log #1 reports that useragent nodei22:/usr/share/contrail-utils/provision_control.py is creating the bgp_router object with asn 64515

Log #4 reports that useragent nodei23:/usr/bin/contrail-schema is updating the bgp_router object with asn 64512

Contrail logs:
==============
2017 Nov 23 06:34:36.572091 nodei22 [:contrail-api:] : VncApiConfigLog: [VncApiCommon: object_type = bgp_router, identifier_name = default-domain:default-project:ip-fabric:__default__:nodei21, url = http://127.0.0.1:8095/bgp-routers, operation = post, useragent = nodei22:/usr/share/contrail-utils/provision_control.py, remote_ip = 127.0.0.1:8095, body = {"bgp-router": {"fq_name": ["default-domain", "default-project", "ip-fabric", "__default__", "nodei21"], "uuid": null, "parent_type": "routing-instance", "bgp_router_parameters": {"vendor": "contrail", "ad
min_down": false, "ipv6_gateway_address": null, "local_autonomous_system": null, "auth_data": null, "autonomous_system": 64515, "address": "10.204.217.133", "source_port": null, "router_type": "control-node", "identifier": "10.204.217.133", "hold_time": 0, "port": 179, "address_families": {"family": ["route-target", "inet-vpn", "e-vpn", "erm-vpn", "inet6-vpn"]}, "gateway_address": null}, "perms2": {"owner": "cloud-admin", "owner_access": 7, "global_access": 0, "share": []}, "id_perms": {"enable": true, "uuid": null, "creator": null, "created": null, "user_visible": true, "last_modified": null, "permissions": {"owner": "cloud-admin", "owner_access": 7, "other_access": 7, "group": "cloud-admin-group", "group_access": 7}, "description": null}, "display_name": "nodei21"}}, domain = default-domain]

2017 Nov 23 06:34:36.595517 nodei22 [:contrail-api:] : VncApiStatsLog: [VncApiStats: operation_type = POST, user = , useragent = nodei22:/usr/share/contrail-utils/provision_control.py, remote_ip = 127.0.0.1, domain_name = default-domain, project_name = default-project, object_typ
e = bgp_router, response_time_in_usec = 1675215, response_size = 402, resp_code = 200]

2017 Nov 23 06:34:36.610871 nodei22 [:contrail-api:] : VncApiStatsLog: [VncApiStats: operation_type = GET, user = , useragent = nodei22:/usr/share/contrail-utils/provision_control.py, remote_ip = 127.0.0.1, domain_name = default-domain, project_name = default-project, object_type
 = bgp_router, response_time_in_usec = 11040, response_size = 1370, resp_code = 200]

2017 Nov 23 06:34:36.616714 nodei23 [:contrail-api:] : VncApiConfigLog: [VncApiCommon: identifier_uuid = 0555d1f9-e4f3-4124-88a3-8af51eddfd5a, object_type = bgp_router, identifier_name = default-domain:default-project:ip-fabric:__default__:nodei21, url = http://127.0.0.1:8082/bgp
-router/0555d1f9-e4f3-4124-88a3-8af51eddfd5a, operation = http_put, useragent = nodei23:/usr/bin/contrail-schema, remote_ip = 127.0.0.1:8082, body = {"bgp-router": {"uuid": "0555d1f9-e4f3-4124-88a3-8af51eddfd5a", "bgp_router_parameters": {"vendor": "contrail", "admin_down": false, "ipv6_gateway_address": null, "local_autonomous_system": null, "auth_data": null, "autonomous_system": 64512, "address": "10.204.217.133", "source_port": null, "router_type": "control-node", "identifier": "10.204.21...

Read more...

Revision history for this message
Ignatious Johnson Christopher (ijohnson-x) wrote :

comment#5 talks about contrail-schema updating the bgp_router asn with default value (64512).

which is due to the reason that contrail-schema updates the bgp_routers with the asn set in global_system_config(64512)

As mentioned in comment #3 Fix(https://github.com/Juniper/contrail-ansible-internal/commit/64151c12ac92224f5984ba1211242c0a83796982#diff-267a48e47963498416e962688d48b78eL14) for the bug https://bugs.launchpad.net/juniperopenstack/+bug/1729416 removes the following from the internal ansible,

1. three provision_control.py commands and
2. one provision_mx.py command

Which needs to be added in external ansible, however in the fix(https://github.com/Juniper/contrail-ansible/commit/9f00cddbff346f50d5feb298ccd48c8b77764cc7#diff-6f6c11d65271a934b3cac04180eacd81R9) I see that only no md5 and md5 is added.

provison_control.py with only --router_asn arg is missed and provison_mx.py is also missed.

NOTE: Calling provision_control.py with only --router_asn similar to https://github.com/Juniper/contrail-ansible-internal/commit/64151c12ac92224f5984ba1211242c0a83796982#diff-267a48e47963498416e962688d48b78eL15, modifies the asn in global_system_config, so when schema updates the asn of bgp_routers with asn of global_system_config it will update with custom asn.

Changed in juniperopenstack:
assignee: Ignatious Johnson Christopher (ijohnson-x) → nobody
assignee: nobody → Abhay Joshi (abhayj)
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.1

Review in progress for https://review.opencontrail.org/37835
Submitter: kamlesh parmar (<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/37836
Submitter: kamlesh parmar (<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/37837
Submitter: kamlesh parmar (<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/37835
Submitter: kamlesh parmar (<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/37836
Submitter: kamlesh parmar (<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/37837
Submitter: kamlesh parmar (<email address hidden>)

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

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

commit fc36535701578d61f08ef31135d6f70271b07fc8
Author: Kamlesh Parmar <email address hidden>
Date: Thu Nov 23 10:29:49 2017 -0800

Add non-default ASN to global_system_config.
add task for external router provision.

Closes-Bug: #1733859

Change-Id: Ib76fbc76adaebf25de1534af4513af303b6e5d41

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

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

commit 64f24c5e1842a14232d5c1b69194c5fff5f1f4a4
Author: Kamlesh Parmar <email address hidden>
Date: Thu Nov 23 10:29:49 2017 -0800

Add non-default ASN to global_system_config.
add task for external router provision.

Closes-Bug: #1733859

Change-Id: Ib76fbc76adaebf25de1534af4513af303b6e5d41

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

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

commit fbaec595b7ebf461906ef02a0774ef94d6042774
Author: Kamlesh Parmar <email address hidden>
Date: Thu Nov 23 10:29:49 2017 -0800

Add non-default ASN to global_system_config.
add task for external router provision.

Closes-Bug: #1733859

Change-Id: Ib76fbc76adaebf25de1534af4513af303b6e5d41

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.