-
Notifications
You must be signed in to change notification settings - Fork 1.8k
sonic-buildimage: hostcfgd service enhancements to support Management interface config handling in SONiC #4240
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
Closed
Closed
Changes from 2 commits
Commits
Show all changes
72 commits
Select commit
Hold shift + click to select a range
423177e
hostcfgd service enhancements: 1.Added support for Dynamic handling o…
eacfbf6
Fixed issue in adding and deleting ipv6 config.
f6fd9fb
Addressed review comments, Added support for handling forced_mgmt_rou…
02d9006
Merge branch 'master' into master
rvasanthm 3a82ade
[docker]: Enabled ipv6 in dockers when using docker bridge network (#…
arlakshm 4cd7540
Removed unused imports.
49fd662
Merge branch 'master' of https://github.com/rvasanthm/sonic-buildimage
43e80f7
[doc]: ask the motivation of the PR (#4462)
lguohan 45c88d1
[kvm]: disable pmon daemons on kvm vs platform (#4461)
lguohan c5e9844
[device/acction] Support AS9716-32D(R0BA) (#4449)
chihhan123 c52b8c4
[platform-modules]: set debian control depends on unsigned kernel pac…
lguohan 9129378
[accton/as9716-32d] add support get_transceiver_change_event (#4105)
jostar-yang 057ced0
[bgpcfgd]: Split one bgp mega-template to chunks. (#4143)
pavel-shirshov 4adf243
Fix docker restapi start issue, undefined error (#4475)
prsunny c56752a
[build]: add sonic-slave-run target to run any cmds inside sonic-slav…
lguohan e75da77
[device/celestica]: Fix sfp index on dx010 platform api (#4346)
ac6cfb1
[Mellanox] Add a new Mellanox platform x86_64-mlnx_msn3420 and new SK…
shlomibitton e363293
[Mellanox]Mellanox-SN3800-D112C8 support warm-reboot (#4482)
stephenxs b26814f
[Mellanox] Adjust dynamic minimum fan speed algorithm (#4476)
Junchao-Mellanox 72af555
Parse Device region field in Minigraph (#4486)
sumukhatv a60a203
[dhcpmon] Filter DHCP O/A Messages of Neighboring Vlans (#4469)
tahmed-dev 0409a32
[mellanox]: Align CPLD component with latest hw-mgmt. (#4485)
nazariig a40fe3b
[DellEMC] S6100-Fix i2C ISMT issue (#4330)
aravindmani-1 fc55329
[mgmt-framework]: convert mgmt-framework to use buster docker (#4480)
joyas-joseph 93ade1d
[Multi-ASIC] To pass the asic instance ID to orchagent, Advance the s…
judyjoseph 0895033
[sonic-utilities] Update submodule (#4492)
jleveque 087e5fb
[build]: build missing stretch dockers when debug build is enabled (#…
lguohan 4c55adf
[iccpd]: ICCPD support IPv6 ND (#4422)
jianjundong 0038305
[docker-iccpd]: disable iccpd build by default (#4502)
lguohan a539cf2
[build]: remove -t for non-tty terminal
lguohan e1ba5b0
[docker-restapi]: add restapi config to config Db (#4495)
sumukhatv b629137
[Mellanox] Add a new Mellanox platform x86_64-mlnx_msn4600c and new S…
shlomibitton 799f22d
[baseimage]: Run fsck filesystem check support prior mounting filesys…
olivier-singla 6850644
[vs]: add missing dvslib link for the vs test
lguohan a87bf4d
[Mellanox] Fix error in sensors.conf for 3700/3700c/3800 (#4506)
stephenxs 80a025a
[arista] update platform driver submodules (#4512)
Staphylo 4c210f0
[Mellanox] Enhancement for support PSU LED management (#4467)
Junchao-Mellanox 2153cae
[submodule]: Advance sonic-platform-common. (#4513)
nazariig 86bc8ae
[vs]: dynamically create front panel ports in vs docker (#4499)
lguohan aca5bec
[sonic-py-swsssdk/snmpagent] update submodule for sonic-py-swsssdk / …
dzhangalibaba 352a397
[mellanox]: MSN4700 support 8 lanes 400G with new SAI/SDK/FW (#4509)
keboliu 81f4c81
[build]: changing debian names based on Architecture (#4508)
Sabareesh-Kumar-Anandan 46161ca
[sonic-utilities][sonic-ztp] Update submodules (#4501)
jleveque cbc75fe
[pmon]: Fix the continous syseepromd autorestart issue on 201911 (#4478)
sujinmkang 4511216
Ssd mitigation changes (#4214)
rkdevi27 506e954
[device] Upgrade as4630_54pe for new platform (#4268)
dereksun01 3f1c3dd
[device/accton] Modify as8000 configuration (#4446)
dereksun01 34cad97
[device] Modify configuration and add led_proc_init.soc (#4418)
dereksun01 aafe825
Addressed review comments.
c55603f
[build]: add docker-ptf-* as stretch docker targets (#4516)
lguohan 30bbbbf
hw-mgmt_V.7.0000.3034 integration (#4519)
shlomibitton 49df4b7
Addressed review comments and fixed build issue
e8748eb
[submodule]: advance sonic-utilities submodule (#4523)
judyjoseph 86e1390
Update golang version for 1.11.5 to 1.14.2 (#4520)
pavel-shirshov 8ac1c60
[config engine] Parser changes to support parsing of multi-asic devic…
SuvarnaMeenakshi 35998ba
Added default mgmt routes and rules
d238662
Addressed issuses reported LGTM analysis
8671fd1
Addressed issuses reported LGTM analysis
6c9dd76
[device] DellEMC s5232f 50G hwsku support (#4525)
srideepDell 5307f94
[devices] skip_fancontrol for wedge 100 barefoot platforms (#4528)
msosyak f0c13d3
Fixed issue in handling net.ipv6.conf.eth0.accept_ra sysctl
53c00ba
hostcfgd service enhancements: 1.Added support for Dynamic handling o…
a2d9722
Fixed issue in adding and deleting ipv6 config.
ffb660e
Addressed review comments, Added support for handling forced_mgmt_rou…
424ab53
Removed unused imports.
d3faf45
Addressed review comments.
55445c4
Addressed review comments and fixed build issue
7ca8e39
Added default mgmt routes and rules
903ad51
Addressed issuses reported LGTM analysis
07eb6ad
Addressed issuses reported LGTM analysis
6513b32
Fixed issue in handling net.ipv6.conf.eth0.accept_ra sysctl
50e5f0e
Merge branch 'master' of https://github.com/rvasanthm/sonic-buildimage
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| #!/usr/bin/python -u | ||
| # -*- coding: utf-8 -*- | ||
|
|
||
| import os | ||
| import re | ||
| import sys | ||
| import subprocess | ||
| import syslog | ||
| import ipaddress | ||
| import netaddr | ||
| from swsssdk import ConfigDBConnector | ||
|
|
||
| APP_MGMT_INTF_TABLE = "MGMT_INTF_TABLE" | ||
|
|
||
| def update_dhcp_mgmt_ip_info(): | ||
| app_db = ConfigDBConnector() | ||
| app_db.db_connect('APPL_DB', wait_for_init=False, retry_on=True) | ||
| appdb_entry = {} | ||
| appdb_entry["NULL"] = "NULL" | ||
|
|
||
| op = sys.argv[2] | ||
| plen = ipaddress.ip_network((0, sys.argv[4])).prefixlen | ||
| key = sys.argv[1] + ":" + sys.argv[3] + "/" + str(plen) | ||
| syslog.syslog(syslog.LOG_INFO, "update_dhcp_mgmt_ip_info : op - {}, key - {}".format(op, key)) | ||
| if op == "add": | ||
| app_db.set_entry(APP_MGMT_INTF_TABLE, key, appdb_entry) | ||
| elif op == "del": | ||
| app_db.delete_entry(APP_MGMT_INTF_TABLE, key) | ||
| return | ||
|
|
||
| if __name__ == "__main__": | ||
| if len(sys.argv) < 5: | ||
| syslog.syslog(syslog.LOG_INFO, "number of arguments not correct") | ||
| syslog.syslog(syslog.LOG_INFO, "usage:") | ||
| syslog.syslog(syslog.LOG_INFO, "dhcp_mgmt_conf.py <add/del> <interface name> <ip address> <subnet mask>") | ||
| else: | ||
| syslog.syslog(syslog.LOG_INFO, "Args : {}".format(sys.argv)) | ||
| update_dhcp_mgmt_ip_info() | ||
|
|
||
|
|
||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| #!/bin/sh | ||
| # | ||
| # DHCLIENT exit hook for ip address update in app db | ||
| # | ||
|
|
||
|
|
||
| set -x | ||
|
|
||
| PYTHON_PATH=/usr/bin/python | ||
| SCRIPT=/usr/bin/dhcp_mgmt_conf.py | ||
|
|
||
|
|
||
| dhcp_mgmt_conf_handle() { | ||
| IF_NAME=$interface | ||
| echo "dhcp_mgmt_conf_handle, interface : $IF_NAME" | ||
|
|
||
| if [ "$IF_NAME" = "eth0" ]; then | ||
| echo "DHCP exit hook is called for $IF_NAME, reason : $reason" | ||
|
|
||
| case $reason in | ||
| BOUND|REBOOT|BOUND6) | ||
| if [ -n "$new_ip_address" ] && [ -n "$new_subnet_mask" ]; then | ||
|
|
||
| $PYTHON_PATH $SCRIPT $IF_NAME add $new_ip_address $new_subnet_mask | ||
| fi | ||
| ;; | ||
| RENEW|REBIND|RENEW6|REBIND6) | ||
| if [ -n "$old_ip_address" ] && [ -n "$old_subnet_mask" ]; then | ||
| $PYTHON_PATH $SCRIPT $IF_NAME del $old_ip_address $old_subnet_mask | ||
| fi | ||
|
|
||
| if [ -n "$new_ip_address" ] && [ -n "$new_subnet_mask" ]; then | ||
| $PYTHON_PATH $SCRIPT $IF_NAME add $new_ip_address $new_subnet_mask | ||
| fi | ||
|
|
||
| ;; | ||
| EXPIRE|FAIL|RELEASE|STOP) | ||
| if [ -n "$new_ip_address" ] && [ -n "$new_subnet_mask" ]; then | ||
| $PYTHON_PATH $SCRIPT $IF_NAME del $new_ip_address $new_subnet_mask | ||
| fi | ||
|
|
||
| if [ -n "$old_ip_address" ] && [ -n "$old_subnet_mask" ]; then | ||
| $PYTHON_PATH $SCRIPT $IF_NAME del $old_ip_address $old_subnet_mask | ||
| fi | ||
| ;; | ||
| TIMEOUT) | ||
| ;; | ||
| esac | ||
| fi | ||
| } | ||
|
|
||
| echo "dhcp_mgmt_conf" | ||
| dhcp_mgmt_conf_handle |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Delete blank lines at EOF
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.
addressed