Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GET_TOPOLOGY_INVALID : BGP-LS Topology - ODL Nitrogen #17

Open
durairajkumar opened this issue Jun 25, 2019 · 9 comments
Open

GET_TOPOLOGY_INVALID : BGP-LS Topology - ODL Nitrogen #17

durairajkumar opened this issue Jun 25, 2019 · 9 comments

Comments

@durairajkumar
Copy link

Hi

I am trying to build BGP-LS topology of a bunch of vMx's using ODL Nitrogen release as Controller

ODL and Pathman are in the same localhost

I am able to get the BGP-LS Raw topology with below URL

/restconf/operational/network-topology:network-topology/topology/bgp-example-linkstate-topology

Also, able to see the Link state routes with the below URL

192.168.1.16:8181/restconf/operational/bgp-rib:bgp-rib/rib/bgp-example/loc-rib/tables/bgp-linkstate:linkstate-address-family/bgp-linkstate:linkstate-subsequent-address-family/linkstate-routes

My RIB-ID is 'bgp-example' and Topology is 'bgp-example-linkstate-topology' . Changed this in
pathman_sr.py and pathman_ini.py file

Modified URL in pathman_ini.py
url = '{}://{}:{}/restconf/operational/bgp-rib:bgp-rib/rib/bgp-example/loc-rib/tables/bgp-linkstate:linkstate-address-family/bgp-linkstate:linkstate-subsequent-address-family/linkstate-routes'

Modified URL in pathman_sr.py and netconf.py
get_topo = 'http://%s:%s/restconf/operational/network-topology:network-topology/topology/bgp-example-linkstate-topology' %(odl_ip, odl_port)

When Pathman is launched, it shows
GET_TOPOLOGY_INVALID - Couldn't read the topology

Attaching BGP-LS Routes and BGP-LS Raw topology for your information

Pathman Error Log Messages

durai@ODL:~$ vi /tmp/pathman.log
26539 2019-06-25 03:41:51.366 UTC root:add_node INFO: New node: Node(name=u'0192.0168.0002', id=u'0192.0168.0002', loopback='', portlist=[], pcc='', pcep_type='', prefix=[u'192.168.0.2/32'], sid='')
26539 2019-06-25 03:41:51.366 UTC root:add_node INFO: New node: Node(name=u'0192.0168.0003', id=u'0192.0168.0003', loopback='', portlist=[], pcc='', pcep_type='', prefix=[u'192.168.0.3/32'], sid='')
26539 2019-06-25 03:41:51.366 UTC root:add_node INFO: New node: Node(name=u'0192.0168.0007.02', id=u'0192.0168.0007.02', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid='')
26539 2019-06-25 03:41:51.366 UTC root:add_node INFO: New node: Node(name=u'0192.0168.0005.02', id=u'0192.0168.0005.02', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid='')
26539 2019-06-25 03:41:51.366 UTC root:add_node INFO: New node: Node(name=u'0192.0168.0006.02', id=u'0192.0168.0006.02', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid='')
26539 2019-06-25 03:41:51.366 UTC root:add_node INFO: New node: Node(name=u'0192.0168.0007.03', id=u'0192.0168.0007.03', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid='')
26539 2019-06-25 03:41:51.367 UTC root:add_node INFO: New node: Node(name=u'0192.0168.0007.04', id=u'0192.0168.0007.04', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid='')
26539 2019-06-25 03:41:51.367 UTC root:add_node INFO: New node: Node(name=u'0192.0168.0005.03', id=u'0192.0168.0005.03', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid='')
26539 2019-06-25 03:41:51.367 UTC root:add_node INFO: New node: Node(name=u'0192.0168.0003.02', id=u'0192.0168.0003.02', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid='')
26539 2019-06-25 03:41:51.367 UTC root:node_structure INFO: [Node(name=u'0192.0168.0006', id=u'0192.0168.0006', loopback='', portlist=[], pcc='', pcep_type='', prefix=[u'192.168.0.6/32'], sid=''), Node(name=u'0192.0168.0007', id=u'0192.0168.0007', loopback='', portlist=[], pcc='', pcep_type='', prefix=[u'192.168.0.7/32'], sid=''), Node(name=u'0192.0168.0004', id=u'0192.0168.0004', loopback='', portlist=[], pcc='', pcep_type='', prefix=[u'192.168.0.4/32'], sid=''), Node(name=u'0192.0168.0005', id=u'0192.0168.0005', loopback='', portlist=[], pcc='', pcep_type='', prefix=[u'192.168.0.5/32'], sid=''), Node(name=u'0192.0168.0002', id=u'0192.0168.0002', loopback='', portlist=[], pcc='', pcep_type='', prefix=[u'192.168.0.2/32'], sid=''), Node(name=u'0192.0168.0003', id=u'0192.0168.0003', loopback='', portlist=[], pcc='', pcep_type='', prefix=[u'192.168.0.3/32'], sid=''), Node(name=u'0192.0168.0007.02', id=u'0192.0168.0007.02', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid=''), Node(name=u'0192.0168.0005.02', id=u'0192.0168.0005.02', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid=''), Node(name=u'0192.0168.0006.02', id=u'0192.0168.0006.02', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid=''), Node(name=u'0192.0168.0007.03', id=u'0192.0168.0007.03', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid=''), Node(name=u'0192.0168.0007.04', id=u'0192.0168.0007.04', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid=''), Node(name=u'0192.0168.0005.03', id=u'0192.0168.0005.03', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid=''), Node(name=u'0192.0168.0003.02', id=u'0192.0168.0003.02', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid='')]
26539 2019-06-25 03:41:51.367 UTC root:pseudo_net_build INFO: Owner of Pseduo: 0192.0168.0007.02 is: 0192.0168.0007
26539 2019-06-25 03:41:51.367 UTC root:pseudo_net_build INFO: Owner of Pseduo: 0192.0168.0005.02 is: 0192.0168.0005
26539 2019-06-25 03:41:51.367 UTC root:pseudo_net_build INFO: Owner of Pseduo: 0192.0168.0006.02 is: 0192.0168.0006
26539 2019-06-25 03:41:51.367 UTC root:pseudo_net_build INFO: Owner of Pseduo: 0192.0168.0007.03 is: 0192.0168.0007
26539 2019-06-25 03:41:51.367 UTC root:pseudo_net_build INFO: Owner of Pseduo: 0192.0168.0007.04 is: 0192.0168.0007
26539 2019-06-25 03:41:51.367 UTC root:pseudo_net_build INFO: Owner of Pseduo: 0192.0168.0005.03 is: 0192.0168.0005
26539 2019-06-25 03:41:51.367 UTC root:pseudo_net_build INFO: Owner of Pseduo: 0192.0168.0003.02 is: 0192.0168.0003
26539 2019-06-25 03:41:51.368 UTC root:pseudo_net_build INFO: []
26539 2019-06-25 03:41:51.390 UTC root:_get_url INFO: status code: 200
26539 2019-06-25 03:41:51.390 UTC root:build_odl_topology ERROR: <type 'exceptions.KeyError'>
26539 2019-06-25 03:41:51.390 UTC root:getTopo INFO: Failed to get topo: could not reach odl-server?
26539 2019-06-25 03:41:51.390 UTC root:post INFO: {"response": [{"cause": "could not reach odl-server?", "option": "topo", "success": false}]}
26539 2019-06-25 03:41:51.391 UTC root:initialize INFO: Init 2 done - debug saved
26539 2019-06-25 03:41:51.392 UTC root:rest_interface_parser INFO: Commands Relieved: {u'option': u'list_all'}
26539 2019-06-25 03:41:51.399 UTC root:get_url INFO: Url get Status: 200
26539 2019-06-25 03:41:51.399 UTC root:list_pcep_lsp INFO: We have no nodes in our PCEP Topology
26539 2019-06-25 03:41:51.399 UTC root:listAllLsp INFO: list: [], formatted: []
26539 2019-06-25 03:41:51.400 UTC root:post INFO: {"response": [{"list": [], "option": "list_all", "success": true}]}
~

BGP-LS-Routes.txt
BGP-LS-Topology.txt
Invalid-Topology

Thank you in advance

Regards
Durai

@durairajkumar
Copy link
Author

Just want to check if I miss something! I see the Link-state routes and the raw topology but pathman-sr shows below error.

Both ODL and PATHMAN are in the same host and not sure why the Error says "couldn't reach odl-server"

But on the Pathman URL, it says the Topology is invalid!

26539 2019-06-25 03:41:51.390 UTC root:build_odl_topology ERROR: <type 'exceptions.KeyError'>
26539 2019-06-25 03:41:51.390 UTC root:getTopo INFO: Failed to get topo: could not reach odl-server?
26539 2019-06-25 03:41:51.390 UTC root:post INFO: {"response": [{"cause": "could not reach odl-server?", "option": "topo", "success": false}]}

Regards
Durai

@durairajkumar
Copy link
Author

@nikmon2 Can you please take a look here

Thank you

@avisnevschi
Copy link

@durairajkumar I've spent about 2-3 months working with Juniper MX and ODL + Pathman/Pathman-SR but still didn't manage them to work properly... I've stuck on provisioning LSP's from Pathman. @nikmon2 tried to help me, but probably he is also busy with other things and we still didn't resolve the problems with provisioning LSP's. Still, let's try to help you.

Can you please show the configuration for the ODL you have in pathman_ini.py ? Did you change the ODL_IP to 127.0.0.1 ? Because by default it tries to connect to the ODL controller which is hosted in Cisco Cloud LAB 198.18.1.80.

@durairajkumar
Copy link
Author

Thank you for your reply

My ODL and Pathman-SR are in the same host and I have changed the IP to 192.168.1.16 which is my host IP
I tried with 127.0.0.1 but no luck
++++++
odl_ip = '192.168.1.16'
odl_port = '8181'
log_file = '/tmp/pathman.log'
+++++++++
The log shows as if it is building the nodes/links but eventually, I get "build_odl_topology ERROR: <type 'exceptions.KeyError'> error

26539 2019-06-25 03:41:51.366 UTC root:add_node INFO: New node: Node(name=u'0192.0168.0002', id=u'0192.0168.0002', loopback='', portlist=[], pcc='', pcep_type='', prefix=[u'192.168.0.2/32'], sid='')
26539 2019-06-25 03:41:51.366 UTC root:add_node INFO: New node: Node(name=u'0192.0168.0003', id=u'0192.0168.0003', loopback='', portlist=[], pcc='', pcep_type='', prefix=[u'192.168.0.3/32'], sid='')
26539 2019-06-25 03:41:51.366 UTC root:add_node INFO: New node: Node(name=u'0192.0168.0007.02', id=u'0192.0168.0007.02', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid='')
26539 2019-06-25 03:41:51.366 UTC root:add_node INFO: New node: Node(name=u'0192.0168.0005.02',

Thank you again !
pathman_ini.txt

@avisnevschi
Copy link

avisnevschi commented Jun 27, 2019 via email

@durairajkumar
Copy link
Author

After modifying the Log_level to DEBUG, Please find the below logs

odl_ip = '127.0.0.1'
odl_port = '8181'
log_file = '/tmp/pathman.log'
log_size = 2000000
log_count = 3
log_level = 'DEBUG'

6922 2019-06-27 13:44:04.653 UTC root: INFO: This is initializing the log
6922 2019-06-27 13:44:04.663 UTC root:get_url INFO: Url get Status: 200
6922 2019-06-27 13:44:04.678 UTC root:get_url INFO: Url get Status: 200
6922 2019-06-27 13:44:04.678 UTC root:get_pcep_type INFO: We have no nodes in our PCEP Topology
6922 2019-06-27 13:44:04.678 UTC root:node_structure DEBUG: pcc_list: []
6922 2019-06-27 13:44:04.678 UTC root:node_structure DEBUG: Loopbacks of nodes: []
6922 2019-06-27 13:44:04.678 UTC root:add_node INFO: New node: Node(name=u'0192.0168.0006', id=u'0192.0168.0006', loopback='', portlist=[], pcc='', pcep_type='', prefix=[u'192.168.0.6/32'], sid='')
6922 2019-06-27 13:44:04.678 UTC root:add_node INFO: New node: Node(name=u'0192.0168.0003.03', id=u'0192.0168.0003.03', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid='')
6922 2019-06-27 13:44:04.679 UTC root:add_node INFO: New node: Node(name=u'0192.0168.0007', id=u'0192.0168.0007', loopback='', portlist=[], pcc='', pcep_type='', prefix=[u'192.168.0.7/32'], sid='')
6922 2019-06-27 13:44:04.679 UTC root:add_node INFO: New node: Node(name=u'0192.0168.0004', id=u'0192.0168.0004', loopback='', portlist=[], pcc='', pcep_type='', prefix=[u'192.168.0.4/32'], sid='')
6922 2019-06-27 13:44:04.679 UTC root:add_node INFO: New node: Node(name=u'0192.0168.0005', id=u'0192.0168.0005', loopback='', portlist=[], pcc='', pcep_type='', prefix=[u'192.168.0.5/32'], sid='')
6922 2019-06-27 13:44:04.679 UTC root:add_node INFO: New node: Node(name=u'0192.0168.0002', id=u'0192.0168.0002', loopback='', portlist=[], pcc='', pcep_type='', prefix=[u'192.168.0.2/32'], sid='')
6922 2019-06-27 13:44:04.679 UTC root:add_node INFO: New node: Node(name=u'0192.0168.0003', id=u'0192.0168.0003', loopback='', portlist=[], pcc='', pcep_type='', prefix=[u'192.168.0.3/32'], sid='')
6922 2019-06-27 13:44:04.679 UTC root:add_node INFO: New node: Node(name=u'0192.0168.0001', id=u'0192.0168.0001', loopback='', portlist=[], pcc='', pcep_type='', prefix=[u'192.168.0.1/32'], sid='')
6922 2019-06-27 13:44:04.679 UTC root:add_node INFO: New node: Node(name=u'0192.0168.0007.02', id=u'0192.0168.0007.02', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid='')
6922 2019-06-27 13:44:04.680 UTC root:add_node INFO: New node: Node(name=u'0192.0168.0005.02', id=u'0192.0168.0005.02', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid='')
6922 2019-06-27 13:44:04.680 UTC root:add_node INFO: New node: Node(name=u'0192.0168.0006.03', id=u'0192.0168.0006.03', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid='')
6922 2019-06-27 13:44:04.680 UTC root:add_node INFO: New node: Node(name=u'0192.0168.0006.02', id=u'0192.0168.0006.02', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid='')
6922 2019-06-27 13:44:04.680 UTC root:add_node INFO: New node: Node(name=u'0192.0168.0004.02', id=u'0192.0168.0004.02', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid='')
6922 2019-06-27 13:44:04.680 UTC root:add_node INFO: New node: Node(name=u'0192.0168.0007.03', id=u'0192.0168.0007.03', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid='')
6922 2019-06-27 13:44:04.680 UTC root:add_node INFO: New node: Node(name=u'0192.0168.0007.04', id=u'0192.0168.0007.04', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid='')
6922 2019-06-27 13:44:04.681 UTC root:node_structure INFO: [Node(name=u'0192.0168.0006', id=u'0192.0168.0006', loopback='', portlist=[], pcc='', pcep_type='', prefix=[u'192.168.0.6/32'], sid=''), Node(name=u'0192.0168.0003.03', id=u'0192.0168.0003.03', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid=''), Node(name=u'0192.0168.0007', id=u'0192.0168.0007', loopback='', portlist=[], pcc='', pcep_type='', prefix=[u'192.168.0.7/32'], sid=''), Node(name=u'0192.0168.0004', id=u'0192.0168.0004', loopback='', portlist=[], pcc='', pcep_type='', prefix=[u'192.168.0.4/32'], sid=''), Node(name=u'0192.0168.0005', id=u'0192.0168.0005', loopback='', portlist=[], pcc='', pcep_type='', prefix=[u'192.168.0.5/32'], sid=''), Node(name=u'0192.0168.0002', id=u'0192.0168.0002', loopback='', portlist=[], pcc='', pcep_type='', prefix=[u'192.168.0.2/32'], sid=''), Node(name=u'0192.0168.0003', id=u'0192.0168.0003', loopback='', portlist=[], pcc='', pcep_type='', prefix=[u'192.168.0.3/32'], sid=''), Node(name=u'0192.0168.0001', id=u'0192.0168.0001', loopback='', portlist=[], pcc='', pcep_type='', prefix=[u'192.168.0.1/32'], sid=''), Node(name=u'0192.0168.0007.02', id=u'0192.0168.0007.02', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid=''), Node(name=u'0192.0168.0005.02', id=u'0192.0168.0005.02', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid=''), Node(name=u'0192.0168.0006.03', id=u'0192.0168.0006.03', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid=''), Node(name=u'0192.0168.0006.02', id=u'0192.0168.0006.02', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid=''), Node(name=u'0192.0168.0004.02', id=u'0192.0168.0004.02', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid=''), Node(name=u'0192.0168.0007.03', id=u'0192.0168.0007.03', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid=''), Node(name=u'0192.0168.0003.02', id=u'0192.0168.0003.02', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid=''), Node(name=u'0192.0168.0002.02', id=u'0192.0168.0002.02', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid=''), Node(name=u'0192.0168.0005.03', id=u'0192.0168.0005.03', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid=''), Node(name=u'0192.0168.0007.04', id=u'0192.0168.0007.04', loopback='', portlist=[], pcc='', pcep_type='', prefix=[], sid='')]
6922 2019-06-27 13:44:04.681 UTC root:pseudo_net_build INFO: Owner of Pseduo: 0192.0168.0003.03 is: 0192.0168.0003
6922 2019-06-27 13:44:04.681 UTC root:pseudo_net_build INFO: Owner of Pseduo: 0192.0168.0007.02 is: 0192.0168.0007
6922 2019-06-27 13:44:04.681 UTC root:pseudo_net_build INFO: Owner of Pseduo: 0192.0168.0005.02 is: 0192.0168.0005
6922 2019-06-27 13:44:04.681 UTC root:pseudo_net_build INFO: Owner of Pseduo: 0192.0168.0006.03 is: 0192.0168.0006
6922 2019-06-27 13:44:04.681 UTC root:pseudo_net_build INFO: Owner of Pseduo: 0192.0168.0006.02 is: 0192.0168.0006
6922 2019-06-27 13:44:04.686 UTC root:pseudo_net_build INFO: Owner of Pseduo: 0192.0168.0004.02 is: 0192.0168.0004
6922 2019-06-27 13:44:04.686 UTC root:pseudo_net_build INFO: Owner of Pseduo: 0192.0168.0007.03 is: 0192.0168.0007
6922 2019-06-27 13:44:04.686 UTC root:pseudo_net_build INFO: Owner of Pseduo: 0192.0168.0003.02 is: 0192.0168.0003
6922 2019-06-27 13:44:04.686 UTC root:pseudo_net_build INFO: Owner of Pseduo: 0192.0168.0002.02 is: 0192.0168.0002
6922 2019-06-27 13:44:04.686 UTC root:pseudo_net_build INFO: Owner of Pseduo: 0192.0168.0005.03 is: 0192.0168.0005
6922 2019-06-27 13:44:04.686 UTC root:pseudo_net_build INFO: Owner of Pseduo: 0192.0168.0007.04 is: 0192.0168.0007
6922 2019-06-27 13:44:04.686 UTC root:pseudo_net_build INFO: []
6922 2019-06-27 13:44:04.698 UTC root:_get_url INFO: status code: 200
6922 2019-06-27 13:44:04.699 UTC root:build_odl_topology ERROR: <type 'exceptions.KeyError'>
6922 2019-06-27 13:44:04.699 UTC root:init INFO: patterned to '/pathman'
6922 2019-06-27 13:44:04.700 UTC root:init INFO: Pathman REST API Launched on port 8020

@avisnevschi
Copy link

avisnevschi commented Jun 27, 2019 via email

@htainhtain
Copy link

@durairajkumar Hi Sir, did you manage to solve it? Could you help me if you have solved it? Because I also have the same problem. I already run PCEP between XRv and ODL. I also tried changing the IP address of the ODL IP in the python file but I still can't manage to run. The first picture is the log file and the second picture is the error that I got when I launched the app.
@avisnevschi @nikmon2

Thank you.

Capture

capture2

@htainhtain
Copy link

Now I would like to update that Pathman-SR can get the topology by following
#18 (comment).

The issue is solved by changing the URL of pathman_ini.py which is example-bgp-rib to bgp-example.

url = '{}://{}:{}/restconf/operational/bgp-rib:bgp-rib/rib/bgp-example/loc-rib/tables/bgp-linkstate:linkstate-address-family/bgp-linkstate:linkstate-subsequent-address-family/linkstate-routes'

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants