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

[Fanout] Gateway information for Fanout switches generated from is not correct. #573

Open
lvphuc133 opened this issue Apr 12, 2018 · 1 comment
Labels

Comments

@lvphuc133
Copy link

Description
Gateway information for Fanout switches generated from ansible/library/conn_graph_facts.py is not correct.

Steps to reproduce the issue:

  1. Source file ansible/library/conn_graph_facts.py
  2. In function parse_graph()
    ...
    management_ip = l3info.find('ManagementIPInterface').attrib['Prefix']
    deviceinfo[hostname]['ManagementIp'] = management_ip
    mgmtip = ipaddress.IPNetwork(management_ip)
    deviceinfo[hostname]['mgmtip'] = str(mgmtip.ip)
    management_gw = str(mgmtip.network+1)
    deviceinfo[hostname]['ManagementGw'] = management_gw

Describe the results you received:
The management_gw shoud is calculated as network + 1 which is not correct for all Lab. environment. In my case the gateway IP is network + 254.

Describe the results you expected:
The management_gw shoud be retrieved from the XML file rather than network + 1.

@okanchou9
Copy link
Contributor

@lvphuc133

I have the same issue as yours.
And you will notice that the gateway of management interface of DUT is hard coding to "+1" also.
See the following link that I open in sonic-buildimage if need:
sonic-net/sonic-buildimage#857

For now I'm using self-modified script to create a tag called "mgmt_gw" and assign its value to management_gw to workaround this issue.

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

No branches or pull requests

3 participants