-
Notifications
You must be signed in to change notification settings - Fork 344
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
Cluster ID of 16 fails to properly identify as node0 or node1 in current_re #1135
Comments
Verified the above fix ,with cluster_id 2 and cluster_id 16 ,for both the cluster ids , the above fix works fine and current_re vlaues are populated according to cluster node details . I will continue the testing for few more cluster id values and update the results . from jnpr.junos import Device device = Device(host='xx.xx.xx.xx', user='xyz', password='zyx') pprint(device.facts["srx_cluster_id"]) cluster_id_octet = str( ~/junos-pyez# python get-facts.py ~/junos-pyez# python get-facts.py with cluster id 2: ~/junos-pyez# python get-facts.py /junos-pyez# python get-facts.py |
Verified the fix for cluster id values 16, 2, 17, 15, 32, 255 and it works fine and returns the current_re values for node0 and node1 . from jnpr.junos import Device device = Device(host='xx.xx.xx.xx', user='xyz', password='xyz') print("srx cluster id value {}".format(device.facts["srx_cluster_id"])) pprint(device.facts["current_re"])
With fix and cluster_id 16 ~/junos-pyez# python get-facts.py ~/junos-pyez# python get-facts.py with cluster id 2: ~/junos-pyez# python get-facts.py /junos-pyez# python get-facts.py cluster id : 17 (venv) root@nms5-salt-master-b:~/junos-pyez# python get-facts.py (venv) root@nms5-salt-master-b:~/junos-pyez# python get-facts.py cluster id : 15 (venv) root@nms5-salt-master-b:~/junos-pyez# python get-facts.py (venv) root@nms5-salt-master-b:~/junos-pyez# python get-facts.py cluster id :32 (venv) root@nms5-salt-master-b:~/junos-pyez# python get-facts.py (venv) root@nms5-salt-master-b:~/junos-pyez# python get-facts.py with cluster id : 255 (venv) root@nms5-salt-master-b:~/junos-pyez# python get-facts.py (venv) root@nms5-salt-master-b:~/junos-pyez# python get-facts.py |
fix is under review - #1137 |
@chidanandpujar - do you know when this will be merged and available? |
#1178 provided the fix |
py-junos-eznc/lib/jnpr/junos/facts/current_re.py
Line 69 in 9b6a706
When we have a cluster ID of "16", the new code returns cluster_id_octet as "0"... but the ip of node1 is 130.16.0.1. Did something change in junos that breaks this new code? From what I see, this new code will always return cluster_id_octet as '0' when the id is 16 (or any multiple of 16)
By changing line 66 to:
This allows my cluster with id "16" to function. I am not sure if this will work for all cases where the cluster ID binary ends in 0000.
The text was updated successfully, but these errors were encountered: