-
Notifications
You must be signed in to change notification settings - Fork 667
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
Add support to reload mgmt conf file and minigraph #93
Conversation
@taoyl-ms, |
config/main.py
Outdated
mgmt_conf = parse_device_desc_xml(filename)['minigraph_mgmt_interface'] | ||
command = "ifconfig eth0 {} netmask {}".format(str(mgmt_conf['addr']), str(mgmt_conf['mask'])) | ||
run_command(command, display_cmd=True) | ||
command = "[ -f /var/run/dhclient.eth0.pid ] && kill `cat /var/run/dhclient.eth0.pid` && rm -f /var/run/dhclient.eth0.pid" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we do interfaces-config restart here like below? #WontFix
config/main.py
Outdated
command = "ifconfig eth0 {} netmask {}".format(str(mgmt_conf['addr']), str(mgmt_conf['mask'])) | ||
run_command(command, display_cmd=True) | ||
command = "[ -f /var/run/dhclient.eth0.pid ] && kill `cat /var/run/dhclient.eth0.pid` && rm -f /var/run/dhclient.eth0.pid" | ||
run_command(command, display_cmd=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we do interfaces-config restart here? #WontFix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. Because interfaces-config service will read data from minigraph but not device description file. #Closed
* msft_github/master: Remove pager from 'show,' 'config' and 'sonic_installer' commands (sonic-net#97) Make FR working again for 0.9.4 (sonic-net#94) [sfputil]: Refactor and add support for presence, low-power mode and reset (sonic-net#90) Add support to reload mgmt conf file and minigraph (sonic-net#93)
…-net#93) Signed-off-by: Petro Bratash <petrox.bratash@intel.com>
a1830c1761087bdc1f7433ebbb8d0bdc419da0d3 (HEAD -> 201911, origin/master, origin/HEAD, origin/201911) Fix OpenAPI spec to be readable by autorest (sonic-net#101) 94805a39ac0712219f7dc08faa2cfdbf371dd177 Identify and report Vnet GUID for conflicting VNI (sonic-net#99) 4832dfd677de72edc44d4eb8c1b60cfad79a3355 Static route expiry if not specified as persistent (sonic-net#98) 5cc4358fb67b9e2a0da9a6691064e41f97ebebc2 (master) Add support for overlay ECMP (sonic-net#96) 6822a46197daef060b4d00dba5153b04b163c43f [CI] Set diff cover threshold to 50% (sonic-net#97) dcc826a1503060b9a07e4510b4f48331c49e87dd Add PR diff coverage (sonic-net#95) e842c5ff317c67919dcbcab3358143cb9a16c9dd Generate code coverage for Unit Tests (sonic-net#94) f9bbed3cb86a3bab9a07745096835dbdbe5a4db6 Convert Unit Tests from unittest framework to pytest framework (sonic-net#93) Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
Fix the error, "UnboundLocalError: local variable 'F' referenced before assignment"
config load_mgmt_config [FILENAME]
to reconfigure mgmt interface based on device description file.config load_minigraph
to reload config from/etc/sonic/minigraph.xml