diff --git a/.azure-pipelines/azure-pipelines-UpgrateVersion.yml b/.azure-pipelines/azure-pipelines-UpgrateVersion.yml index b36cc3513aa6..70afd6d4c04c 100644 --- a/.azure-pipelines/azure-pipelines-UpgrateVersion.yml +++ b/.azure-pipelines/azure-pipelines-UpgrateVersion.yml @@ -18,9 +18,9 @@ resources: repositories: - repository: buildimage type: github - name: Azure/sonic-buildimage + name: sonic-net/sonic-buildimage ref: master - endpoint: build + endpoint: sonic-net pool: sonicbld diff --git a/.azure-pipelines/build-commonlib.yml b/.azure-pipelines/build-commonlib.yml index df9bcb25ae70..a36adc625d71 100644 --- a/.azure-pipelines/build-commonlib.yml +++ b/.azure-pipelines/build-commonlib.yml @@ -11,9 +11,9 @@ resources: repositories: - repository: buildimage type: github - name: Azure/sonic-buildimage + name: sonic-net/sonic-buildimage ref: master - endpoint: build + endpoint: sonic-net jobs: - template: .azure-pipelines/template-commonlib.yml@buildimage diff --git a/.azure-pipelines/docker-sonic-slave-template.yml b/.azure-pipelines/docker-sonic-slave-template.yml index a3d2d17dd00a..4481818c37d4 100644 --- a/.azure-pipelines/docker-sonic-slave-template.yml +++ b/.azure-pipelines/docker-sonic-slave-template.yml @@ -7,9 +7,9 @@ resources: repositories: - repository: buildimage type: github - name: Azure/sonic-buildimage + name: sonic-net/sonic-buildimage ref: master - endpoint: build + endpoint: sonic-net parameters: - name: arch diff --git a/.azure-pipelines/official-build-cisco-8000.yml b/.azure-pipelines/official-build-cisco-8000.yml index 474d3e743ff7..7ec7430fc3ad 100644 --- a/.azure-pipelines/official-build-cisco-8000.yml +++ b/.azure-pipelines/official-build-cisco-8000.yml @@ -83,7 +83,7 @@ stages: fi cd $(dirname $filename) echo "PWD=$(pwd)" - ls -l *.deb + ls -l cisco-*.deb while read -r package; do # Cisco version format: -sai--- # The may contain several values in one build, the part is skipped when publishing to storage @@ -93,7 +93,7 @@ stages: package_url="$PACKAGE_URL/sai/ciscosai/master/$version/$package" echo "Override package $package from $package_url" wget "$package_url$StorageSASKey" -O "$package" - done < <(ls *.deb) + done < <(ls cisco-*.deb) env: StorageSASKey: $(StorageSASKey) condition: ne(variables['Build.Reason'], 'PullRequest') diff --git a/.azure-pipelines/official-build.yml b/.azure-pipelines/official-build.yml index 6282a463ea6e..2e96d2899e71 100644 --- a/.azure-pipelines/official-build.yml +++ b/.azure-pipelines/official-build.yml @@ -16,9 +16,9 @@ resources: repositories: - repository: buildimage type: github - name: Azure/sonic-buildimage + name: sonic-net/sonic-buildimage ref: master - endpoint: build + endpoint: sonic-net trigger: none pr: none diff --git a/.azure-pipelines/run-test-template.yml b/.azure-pipelines/run-test-template.yml index 8b41023824ed..3e6d975594b1 100644 --- a/.azure-pipelines/run-test-template.yml +++ b/.azure-pipelines/run-test-template.yml @@ -14,7 +14,7 @@ parameters: steps: - checkout: self clean: true - displayName: 'checkout sonic-mgmt repo' + displayName: 'checkout sonic-buildimage repo' - task: DownloadPipelineArtifact@2 inputs: @@ -31,7 +31,7 @@ steps: pushd /data/sonic-mgmt git remote update - git reset --hard origin/master + git reset --hard origin/202012 sed -i s/use_own_value/${username}/ ansible/veos_vtb echo aaa > ansible/password.txt docker exec sonic-mgmt bash -c "pushd /data/sonic-mgmt/ansible;./testbed-cli.sh -d /data/sonic-vm -m $(inventory) -t $(testbed_file) -k ceos refresh-dut ${{ parameters.tbname }} password.txt" && sleep 180 diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index 502f5d8987d9..ee27244bfb1f 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -15,7 +15,7 @@ jobs: - name: automerge uses: 'pascalgn/automerge-action@v0.13.1' env: - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' + GITHUB_TOKEN: '${{ secrets.TOKEN }}' MERGE_LABELS: 'automerge' MERGE_METHOD: 'squash' MERGE_FILTER_AUTHOR: 'mssonicbld' diff --git a/.gitmodules b/.gitmodules index dd4d89d90b19..65ecc37dd7b8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -72,7 +72,7 @@ url = https://github.com/Azure/sonic-mgmt-framework [submodule "src/sonic-telemetry"] path = src/sonic-telemetry - url = https://github.com/Azure/sonic-telemetry + url = https://github.com/sonic-net/sonic-gnmi [submodule "Switch-SDK-drivers"] path = platform/mellanox/sdk-src/sx-kernel/Switch-SDK-drivers url = https://github.com/Mellanox/Switch-SDK-drivers @@ -90,3 +90,7 @@ path = src/linkmgrd url = https://github.com/Azure/sonic-linkmgrd.git branch = 202012 +[submodule "src/dhcprelay"] + path = src/dhcprelay + url = https://github.com/sonic-net/sonic-dhcp-relay.git + branch = 202012 diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a7971f148d49..eef7f93a3db1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -27,13 +27,13 @@ resources: repositories: - repository: sonic-mgmt type: github - name: Azure/sonic-mgmt - endpoint: build + name: sonic-net/sonic-mgmt + endpoint: sonic-net ref: refs/heads/202012 - repository: buildimage type: github - name: Azure/sonic-buildimage - endpoint: build + name: sonic-net/sonic-buildimage + endpoint: sonic-net ref: master variables: diff --git a/check_install.py b/check_install.py index 08759db127f9..6ed5683a2a4e 100755 --- a/check_install.py +++ b/check_install.py @@ -24,6 +24,7 @@ def main(): passwd_prompt = 'Password:' cmd_prompt = "{}@sonic:~\$ $".format(args.u) grub_selection = "The highlighted entry will be executed" + firsttime_prompt = 'firsttime_exit' i = 0 while True: @@ -43,7 +44,7 @@ def main(): # install sonic image while True: - i = p.expect([login_prompt, passwd_prompt, grub_selection, cmd_prompt]) + i = p.expect([login_prompt, passwd_prompt, firsttime_prompt, grub_selection, cmd_prompt]) if i == 0: # send user name p.sendline(args.u) @@ -51,6 +52,10 @@ def main(): # send password p.sendline(args.P) elif i == 2: + # fix a login timeout issue, caused by the login_prompt message mixed with the output message of the rc.local + time.sleep(1) + p.sendline() + elif i == 3: # select onie install p.sendline() else: diff --git a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/pg_profile_lookup.ini b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/pg_profile_lookup.ini index dd405301f720..5b4482bc74c7 100644 --- a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/pg_profile_lookup.ini +++ b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/pg_profile_lookup.ini @@ -1,8 +1,8 @@ # PG lossless profiles. # speed cable size xon xoff threshold xon_offset - 50000 5m 4608 4608 33792 0 4608 - 100000 5m 4608 4608 49408 0 4608 - 50000 40m 4608 4608 36352 0 4608 - 100000 40m 4608 4608 54528 0 4608 - 50000 300m 4608 4608 55296 0 4608 - 100000 300m 4608 4608 92672 0 4608 + 50000 5m 4608 4608 160000 0 4608 + 100000 5m 4608 4608 160000 0 4608 + 50000 40m 4608 4608 160000 0 4608 + 100000 40m 4608 4608 160000 0 4608 + 50000 300m 4608 4608 160000 0 4608 + 100000 300m 4608 4608 160000 0 4608 diff --git a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/pg_profile_lookup.ini b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/pg_profile_lookup.ini index 8ee7a6714b1e..5b4482bc74c7 100644 --- a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/pg_profile_lookup.ini +++ b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/pg_profile_lookup.ini @@ -1,8 +1,8 @@ # PG lossless profiles. # speed cable size xon xoff threshold xon_offset - 50000 5m 4608 4608 79872 0 4608 - 100000 5m 4608 4608 54528 0 4608 - 50000 40m 4608 4608 39936 0 4608 - 100000 40m 4608 4608 60416 0 4608 - 50000 300m 4608 4608 61440 0 4608 - 100000 300m 4608 4608 103680 0 4608 + 50000 5m 4608 4608 160000 0 4608 + 100000 5m 4608 4608 160000 0 4608 + 50000 40m 4608 4608 160000 0 4608 + 100000 40m 4608 4608 160000 0 4608 + 50000 300m 4608 4608 160000 0 4608 + 100000 300m 4608 4608 160000 0 4608 diff --git a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/qos.json.j2 b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/qos.json.j2 index 6719911b29e5..040da33dd79f 100644 --- a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/qos.json.j2 +++ b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/qos.json.j2 @@ -170,7 +170,7 @@ "3": "3", "4": "4", "5": "5", - "6": "6", + "6": "1", "7": "7", "8": "1" }, diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/buffers_extra_pgs.j2 b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/buffers_extra_pgs.j2 deleted file mode 100644 index f827095cd954..000000000000 --- a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/buffers_extra_pgs.j2 +++ /dev/null @@ -1,20 +0,0 @@ -{% if DEVICE_METADATA is defined and 'type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] == 'LeafRouter' %} -{%- macro generate_pg_buffers_with_extra_lossy_pgs(port_names, port_names_require_no_extra_pg) %} - "BUFFER_PG": { -{% for port in port_names.split(',') %} -{% if port not in port_names_require_no_extra_pg.split(',') %} - "{{ port }}|2": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, - "{{ port }}|6": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, -{% endif %} - "{{ port }}|0": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }{% if not loop.last %},{% endif %} - -{% endfor %} - }, -{% endmacro %} -{% endif %} diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/buffers_extra_pgs.j2 b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/buffers_extra_pgs.j2 deleted file mode 120000 index 7dfb03cbc9d0..000000000000 --- a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/buffers_extra_pgs.j2 +++ /dev/null @@ -1 +0,0 @@ -../Arista-7260CX3-C64/buffers_extra_pgs.j2 \ No newline at end of file diff --git a/device/celestica/x86_64-cel_e1031-r0/sonic_platform/sfp.py b/device/celestica/x86_64-cel_e1031-r0/sonic_platform/sfp.py index c0187819ec2c..0d1d02bf0159 100644 --- a/device/celestica/x86_64-cel_e1031-r0/sonic_platform/sfp.py +++ b/device/celestica/x86_64-cel_e1031-r0/sonic_platform/sfp.py @@ -8,7 +8,7 @@ try: import time - from ctypes import create_string_buffer + from ctypes import c_char from sonic_platform_base.sfp_base import SfpBase from sonic_platform_base.sonic_sfp.sff8472 import sff8472InterfaceId from sonic_platform_base.sonic_sfp.sff8472 import sff8472Dom @@ -121,8 +121,8 @@ SFP_VOLT_WIDTH = 2 SFP_CHANNL_MON_OFFSET = 100 SFP_CHANNL_MON_WIDTH = 6 -SFP_CHANNL_STATUS_OFFSET = 110 -SFP_CHANNL_STATUS_WIDTH = 1 +SFP_STATUS_CONTROL_OFFSET = 110 +SFP_STATUS_CONTROL_WIDTH = 1 SFP_TX_DISABLE_HARD_BIT = 7 SFP_TX_DISABLE_SOFT_BIT = 6 @@ -869,7 +869,7 @@ def get_rx_los(self): elif self.sfp_type == SFP_TYPE: offset = 256 dom_channel_monitor_raw = self._read_eeprom_specific_bytes( - (offset + SFP_CHANNL_STATUS_OFFSET), SFP_CHANNL_STATUS_WIDTH) + (offset + SFP_STATUS_CONTROL_OFFSET), SFP_STATUS_CONTROL_WIDTH) if dom_channel_monitor_raw is not None: rx_los_data = int(dom_channel_monitor_raw[0], 16) rx_los_list.append(rx_los_data & 0x02 != 0) @@ -901,7 +901,7 @@ def get_tx_fault(self): elif self.sfp_type == SFP_TYPE: offset = 256 dom_channel_monitor_raw = self._read_eeprom_specific_bytes( - (offset + SFP_CHANNL_STATUS_OFFSET), SFP_CHANNL_STATUS_WIDTH) + (offset + SFP_STATUS_CONTROL_OFFSET), SFP_STATUS_CONTROL_WIDTH) if dom_channel_monitor_raw is not None: tx_fault_data = int(dom_channel_monitor_raw[0], 16) tx_fault_list.append(tx_fault_data & 0x04 != 0) @@ -936,7 +936,7 @@ def get_tx_disable(self): elif self.sfp_type == SFP_TYPE: offset = 256 dom_channel_monitor_raw = self._read_eeprom_specific_bytes( - (offset + SFP_CHANNL_STATUS_OFFSET), SFP_CHANNL_STATUS_WIDTH) + (offset + SFP_STATUS_CONTROL_OFFSET), SFP_STATUS_CONTROL_WIDTH) if dom_channel_monitor_raw is not None: tx_disable_data = int(dom_channel_monitor_raw[0], 16) tx_disable_list.append(tx_disable_data & 0xC0 != 0) @@ -1170,31 +1170,36 @@ def tx_disable(self, tx_disable): Returns: A boolean, True if tx_disable is set successfully, False if not """ - sysfs_sfp_i2c_client_eeprom_path = self.port_to_eeprom_mapping[self.port_num] - status_control_raw = self._read_eeprom_specific_bytes( - SFP_CHANNL_STATUS_OFFSET, SFP_CHANNL_STATUS_WIDTH) - if status_control_raw is not None: - # Set bit 6 for Soft TX Disable Select - # 01000000 = 64 and 10111111 = 191 - tx_disable_bit = 64 if tx_disable else 191 - status_control = int(status_control_raw[0], 16) - tx_disable_ctl = (status_control | tx_disable_bit) if tx_disable else ( - status_control & tx_disable_bit) - try: - sysfsfile_eeprom = open( - sysfs_sfp_i2c_client_eeprom_path, mode="r+b", buffering=0) - buffer = create_string_buffer(1) - buffer[0] = chr(tx_disable_ctl) - # Write to eeprom - sysfsfile_eeprom.seek(SFP_CHANNL_STATUS_OFFSET) - sysfsfile_eeprom.write(buffer[0]) - except Exception: - return False - finally: - if sysfsfile_eeprom: - sysfsfile_eeprom.close() - time.sleep(0.01) - return True + if not self.get_presence(): + return False + + if self.dom_tx_disable_supported: + # SFP status/control register at address A2h, byte 110 + offset = 256 + sysfs_sfp_i2c_client_eeprom_path = self.port_to_eeprom_mapping[self.port_num] + status_control_raw = self._read_eeprom_specific_bytes( + (offset + SFP_STATUS_CONTROL_OFFSET), SFP_STATUS_CONTROL_WIDTH) + if status_control_raw is not None: + # Set bit 6 for Soft TX Disable Select + # 01000000 = 64 and 10111111 = 191 + tx_disable_bit = 64 if tx_disable else 191 + status_control = int(status_control_raw[0], 16) + tx_disable_ctl = (status_control | tx_disable_bit) if tx_disable else ( + status_control & tx_disable_bit) + try: + sysfsfile_eeprom = open( + sysfs_sfp_i2c_client_eeprom_path, mode="r+b", buffering=0) + tx_disable_data = c_char(tx_disable_ctl) + # Write to eeprom + sysfsfile_eeprom.seek(offset + SFP_STATUS_CONTROL_OFFSET) + sysfsfile_eeprom.write(tx_disable_data) + except Exception: + return False + finally: + if sysfsfile_eeprom: + sysfsfile_eeprom.close() + time.sleep(0.01) + return True return False def tx_disable_channel(self, channel, disable): diff --git a/device/celestica/x86_64-cel_seastone-r0/sonic_platform/psu.py b/device/celestica/x86_64-cel_seastone-r0/sonic_platform/psu.py index da365dff59ab..7dd647be4e2c 100644 --- a/device/celestica/x86_64-cel_seastone-r0/sonic_platform/psu.py +++ b/device/celestica/x86_64-cel_seastone-r0/sonic_platform/psu.py @@ -408,7 +408,7 @@ def get_position_in_parent(self): Returns: integer: The 1-based relative physical position in parent device or -1 if cannot determine the position """ - return -1 + return self.index + 1 def is_replaceable(self): """ diff --git a/device/celestica/x86_64-cel_seastone-r0/sonic_platform/thermal.py b/device/celestica/x86_64-cel_seastone-r0/sonic_platform/thermal.py index c605a28d220c..4b584a6db97f 100644 --- a/device/celestica/x86_64-cel_seastone-r0/sonic_platform/thermal.py +++ b/device/celestica/x86_64-cel_seastone-r0/sonic_platform/thermal.py @@ -307,8 +307,6 @@ def get_position_in_parent(self): """ Retrieves the thermal position information Returns: - A int value, 0 represent ASIC thermal, 1 represent CPU thermal info + A int value, index of thermal """ - if self.postion == "cpu": - return 1 - return 0 + return self.index + 1 diff --git a/device/common/profiles/th2/7260/BALANCED/buffers_defaults_t1.j2 b/device/common/profiles/th2/7260/BALANCED/buffers_defaults_t1.j2 index bc1ca774a98e..c2e4292dbd8a 100644 --- a/device/common/profiles/th2/7260/BALANCED/buffers_defaults_t1.j2 +++ b/device/common/profiles/th2/7260/BALANCED/buffers_defaults_t1.j2 @@ -51,11 +51,7 @@ {%- endmacro %} {% import 'buffers_extra_queues.j2' as defs1 with context %} -{% import 'buffers_extra_pgs.j2' as defs2 with context %} {%- macro generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) %} {{ defs1.generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) }} {%- endmacro %} -{%- macro generate_pg_buffers_with_extra_lossy_pgs(port_names, port_names_require_no_extra_pgs) %} -{{ defs2.generate_pg_buffers_with_extra_lossy_pgs(port_names, port_names_require_no_extra_pgs) }} -{%- endmacro %} diff --git a/device/common/profiles/th2/7260/BALANCED/qos.json.j2 b/device/common/profiles/th2/7260/BALANCED/qos.json.j2 index d760038736a6..750d0fb0ea77 100644 --- a/device/common/profiles/th2/7260/BALANCED/qos.json.j2 +++ b/device/common/profiles/th2/7260/BALANCED/qos.json.j2 @@ -1,4 +1,5 @@ {% if ('type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] == 'LeafRouter') %} +{% set different_dscp_to_tc_map = true %} {%- macro generate_dscp_to_tc_map() %} "DSCP_TO_TC_MAP": { "AZURE": { @@ -66,6 +67,72 @@ "61": "1", "62": "1", "63": "1" + }, + "AZURE_UPLINK": { + "0" : "1", + "1" : "1", + "2" : "1", + "3" : "3", + "4" : "4", + "5" : "1", + "6" : "1", + "7" : "1", + "8" : "0", + "9" : "1", + "10": "1", + "11": "1", + "12": "1", + "13": "1", + "14": "1", + "15": "1", + "16": "1", + "17": "1", + "18": "1", + "19": "1", + "20": "1", + "21": "1", + "22": "1", + "23": "1", + "24": "1", + "25": "1", + "26": "1", + "27": "1", + "28": "1", + "29": "1", + "30": "1", + "31": "1", + "32": "1", + "33": "1", + "34": "1", + "35": "1", + "36": "1", + "37": "1", + "38": "1", + "39": "1", + "40": "1", + "41": "1", + "42": "1", + "43": "1", + "44": "1", + "45": "1", + "46": "5", + "47": "1", + "48": "7", + "49": "1", + "50": "1", + "51": "1", + "52": "1", + "53": "1", + "54": "1", + "55": "1", + "56": "1", + "57": "1", + "58": "1", + "59": "1", + "60": "1", + "61": "1", + "62": "1", + "63": "1" } }, {%- endmacro %} @@ -255,7 +322,7 @@ "3": "3", "4": "4", "5": "5", - "6": "6", + "6": "1", "7": "7", "8": "1" }, diff --git a/device/common/profiles/th2/7260/RDMA-CENTRIC/buffers_defaults_t1.j2 b/device/common/profiles/th2/7260/RDMA-CENTRIC/buffers_defaults_t1.j2 index bc1ca774a98e..0867c03b2497 100644 --- a/device/common/profiles/th2/7260/RDMA-CENTRIC/buffers_defaults_t1.j2 +++ b/device/common/profiles/th2/7260/RDMA-CENTRIC/buffers_defaults_t1.j2 @@ -51,11 +51,8 @@ {%- endmacro %} {% import 'buffers_extra_queues.j2' as defs1 with context %} -{% import 'buffers_extra_pgs.j2' as defs2 with context %} {%- macro generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) %} {{ defs1.generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) }} {%- endmacro %} -{%- macro generate_pg_buffers_with_extra_lossy_pgs(port_names, port_names_require_no_extra_pgs) %} -{{ defs2.generate_pg_buffers_with_extra_lossy_pgs(port_names, port_names_require_no_extra_pgs) }} -{%- endmacro %} + diff --git a/device/common/profiles/th2/7260/RDMA-CENTRIC/qos.json.j2 b/device/common/profiles/th2/7260/RDMA-CENTRIC/qos.json.j2 index d760038736a6..771b8305f8f0 100644 --- a/device/common/profiles/th2/7260/RDMA-CENTRIC/qos.json.j2 +++ b/device/common/profiles/th2/7260/RDMA-CENTRIC/qos.json.j2 @@ -66,6 +66,72 @@ "61": "1", "62": "1", "63": "1" + }, + "AZURE_UPLINK": { + "0" : "1", + "1" : "1", + "2" : "1", + "3" : "3", + "4" : "4", + "5" : "1", + "6" : "1", + "7" : "1", + "8" : "0", + "9" : "1", + "10": "1", + "11": "1", + "12": "1", + "13": "1", + "14": "1", + "15": "1", + "16": "1", + "17": "1", + "18": "1", + "19": "1", + "20": "1", + "21": "1", + "22": "1", + "23": "1", + "24": "1", + "25": "1", + "26": "1", + "27": "1", + "28": "1", + "29": "1", + "30": "1", + "31": "1", + "32": "1", + "33": "1", + "34": "1", + "35": "1", + "36": "1", + "37": "1", + "38": "1", + "39": "1", + "40": "1", + "41": "1", + "42": "1", + "43": "1", + "44": "1", + "45": "1", + "46": "5", + "47": "1", + "48": "7", + "49": "1", + "50": "1", + "51": "1", + "52": "1", + "53": "1", + "54": "1", + "55": "1", + "56": "1", + "57": "1", + "58": "1", + "59": "1", + "60": "1", + "61": "1", + "62": "1", + "63": "1" } }, {%- endmacro %} @@ -255,7 +321,7 @@ "3": "3", "4": "4", "5": "5", - "6": "6", + "6": "1", "7": "7", "8": "1" }, diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/platform.json b/device/dell/x86_64-dell_s6000_s1220-r0/platform.json index 62a53fe328fc..283906c407e0 100644 --- a/device/dell/x86_64-dell_s6000_s1220-r0/platform.json +++ b/device/dell/x86_64-dell_s6000_s1220-r0/platform.json @@ -1,6 +1,10 @@ { "chassis": { "name": "S6000", + "status_led": { + "controllable": true, + "colors": ["amber", "blinking amber", "green", "blinking green"] + }, "components": [ { "name": "BIOS" @@ -17,55 +21,151 @@ ], "fans": [ { - "name": "FanTray1-Fan1" - }, - { - "name": "FanTray1-Fan2" - }, - { - "name": "FanTray2-Fan1" - }, - { - "name": "FanTray2-Fan2" - }, - { - "name": "FanTray3-Fan1" - }, - { - "name": "FanTray3-Fan2" + "name": "FanTray1-Fan1", + "speed": { + "controllable": true, + "minimum": 40 + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray1-Fan2", + "speed": { + "controllable": true, + "minimum": 40 + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray2-Fan1", + "speed": { + "controllable": true, + "minimum": 40 + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray2-Fan2", + "speed": { + "controllable": true, + "minimum": 40 + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray3-Fan1", + "speed": { + "controllable": true, + "minimum": 40 + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray3-Fan2", + "speed": { + "controllable": true, + "minimum": 40 + }, + "status_led": { + "available": false + } } ], "fan_drawers":[ { "name": "FanTray1", + "status_led": { + "controllable": true, + "colors": ["amber", "green", "off"] + }, "fans": [ { - "name": "FanTray1-Fan1" + "name": "FanTray1-Fan1", + "speed": { + "controllable": true, + "minimum": 40 + }, + "status_led": { + "available": false + } }, { - "name": "FanTray1-Fan2" + "name": "FanTray1-Fan2", + "speed": { + "controllable": true, + "minimum": 40 + }, + "status_led": { + "available": false + } } ] }, { "name": "FanTray2", + "status_led": { + "controllable": true, + "colors": ["amber", "green", "off"] + }, "fans": [ { - "name": "FanTray2-Fan1" + "name": "FanTray2-Fan1", + "speed": { + "controllable": true, + "minimum": 40 + }, + "status_led": { + "available": false + } }, { - "name": "FanTray2-Fan2" + "name": "FanTray2-Fan2", + "speed": { + "controllable": true, + "minimum": 40 + }, + "status_led": { + "available": false + } } ] }, { "name": "FanTray3", + "status_led": { + "controllable": true, + "colors": ["amber", "green", "off"] + }, "fans": [ { - "name": "FanTray3-Fan1" + "name": "FanTray3-Fan1", + "speed": { + "controllable": true, + "minimum": 40 + }, + "status_led": { + "available": false + } }, { - "name": "FanTray3-Fan2" + "name": "FanTray3-Fan2", + "speed": { + "controllable": true, + "minimum": 40 + }, + "status_led": { + "available": false + } } ] } @@ -73,55 +173,125 @@ "psus": [ { "name": "PSU1", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "PSU1 Fan" + "name": "PSU1 Fan", + "speed": { + "controllable": true, + "minimum": 40 + }, + "status_led": { + "available": false + } } ], "thermals": [ { - "name": "PSU1-Sensor 1" + "name": "PSU1-Sensor 1", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false }, { - "name": "PSU1-Sensor 2" + "name": "PSU1-Sensor 2", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false } ] }, { "name": "PSU2", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "PSU2 Fan" + "name": "PSU2 Fan", + "speed": { + "controllable": true, + "minimum": 40 + }, + "status_led": { + "available": false + } } ], "thermals": [ { - "name": "PSU2-Sensor 1" + "name": "PSU2-Sensor 1", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false }, { - "name": "PSU2-Sensor 2" + "name": "PSU2-Sensor 2", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false } ] } ], "thermals": [ { - "name": "ASIC On-board" + "name": "ASIC On-board", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false }, { - "name": "NIC" + "name": "NIC", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false }, { - "name": "System Front" + "name": "System Front", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false }, { - "name": "DIMM" + "name": "DIMM", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false }, { - "name": "CPU Core 0" + "name": "CPU Core 0", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false }, { - "name": "CPU Core 1" + "name": "CPU Core 1", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false } ], "modules": [], diff --git a/device/dell/x86_64-dell_s6100_c2538-r0/platform.json b/device/dell/x86_64-dell_s6100_c2538-r0/platform.json index 24e32b16bb15..8e9a0f17db16 100644 --- a/device/dell/x86_64-dell_s6100_c2538-r0/platform.json +++ b/device/dell/x86_64-dell_s6100_c2538-r0/platform.json @@ -1,6 +1,11 @@ { "chassis": { "name": "S6100-ON", + "status_led": { + "controllable": true, + "colors": ["amber", "blinking amber", "green", "blinking green"] + }, + "thermal_manager" : false, "components": [ { "name": "BIOS" @@ -14,48 +19,108 @@ ], "fans": [ { - "name": "FanTray1-Fan1" - }, - { - "name": "FanTray2-Fan1" - }, - { - "name": "FanTray3-Fan1" - }, - { - "name": "FanTray4-Fan1" + "name": "FanTray1-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray2-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray3-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray4-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ], "fan_drawers":[ { "name": "FanTray1", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "FanTray1-Fan1" + "name": "FanTray1-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ] }, { "name": "FanTray2", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "FanTray2-Fan1" + "name": "FanTray2-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ] }, { "name": "FanTray3", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "FanTray3-Fan1" + "name": "FanTray3-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ] }, { "name": "FanTray4", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "FanTray4-Fan1" + "name": "FanTray4-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ] } @@ -63,51 +128,113 @@ "psus": [ { "name": "PSU1", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "PSU1 Fan" + "name": "PSU1 Fan", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ] }, { "name": "PSU2", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "PSU2 Fan" + "name": "PSU2 Fan", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ] } ], "thermals": [ { - "name": "CPU On-board" + "name": "CPU On-board", + "controllable": false, + "low-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false }, { - "name": "ASIC On-board Front" + "name": "ASIC On-board Front", + "controllable": false, + "low-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false }, { - "name": "System Front" + "name": "System Front", + "controllable": false, + "low-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false }, { - "name": "ASIC On-board Rear" + "name": "ASIC On-board Rear", + "controllable": false, + "low-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false }, { - "name": "Front GE board" + "name": "Front GE board", + "controllable": false, + "low-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false }, { - "name": "Front SFP+ board" + "name": "Front SFP+ board", + "controllable": false, + "low-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false }, { - "name": "CPU Core 0" + "name": "CPU Core 0", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false }, { - "name": "CPU Core 1" + "name": "CPU Core 1", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false }, { - "name": "CPU Core 2" + "name": "CPU Core 2", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false }, { - "name": "CPU Core 3" + "name": "CPU Core 3", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false } ], "modules": [ diff --git a/device/dell/x86_64-dellemc_z9332f_d1508-r0/platform.json b/device/dell/x86_64-dellemc_z9332f_d1508-r0/platform.json index 2c603dd722fa..98a3322bf334 100644 --- a/device/dell/x86_64-dellemc_z9332f_d1508-r0/platform.json +++ b/device/dell/x86_64-dellemc_z9332f_d1508-r0/platform.json @@ -1,6 +1,11 @@ { "chassis": { "name": "Z9332F-ON", + "status_led": { + "controllable": true, + "colors": ["green", "flashing green", "yellow", "flashing yellow"] + }, + "thermal_manager" : false, "components": [ { "name": "BIOS" @@ -29,123 +34,312 @@ ], "fans": [ { - "name": "FanTray1-Fan1" - }, - { - "name": "FanTray1-Fan2" - }, - { - "name": "FanTray2-Fan1" - }, - { - "name": "FanTray2-Fan2" - }, - { - "name": "FanTray3-Fan1" - }, - { - "name": "FanTray3-Fan2" - }, - { - "name": "FanTray4-Fan1" - }, - { - "name": "FanTray4-Fan2" - }, - { - "name": "FanTray5-Fan1" - }, - { - "name": "FanTray5-Fan2" - }, - { - "name": "FanTray6-Fan1" - }, - { - "name": "FanTray6-Fan2" - }, - { - "name": "FanTray7-Fan1" - }, - { - "name": "FanTray7-Fan2" + "name": "FanTray1-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray1-Fan2", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray2-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray2-Fan2", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray3-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray3-Fan2", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray4-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray4-Fan2", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray5-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray5-Fan2", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray6-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray6-Fan2", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray7-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray7-Fan2", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ], "fan_drawers":[ { "name": "FanTray1", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "FanTray1-Fan1" + "name": "FanTray1-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } }, { - "name": "FanTray1-Fan2" + "name": "FanTray1-Fan2", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ] }, { "name": "FanTray2", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "FanTray2-Fan1" + "name": "FanTray2-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } }, { - "name": "FanTray2-Fan2" + "name": "FanTray2-Fan2", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ] }, { "name": "FanTray3", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "FanTray3-Fan1" + "name": "FanTray3-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } }, { - "name": "FanTray3-Fan2" + "name": "FanTray3-Fan2", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ] }, { "name": "FanTray4", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "FanTray4-Fan1" + "name": "FanTray4-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } }, { - "name": "FanTray4-Fan2" + "name": "FanTray4-Fan2", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ] }, - { + { "name": "FanTray5", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "FanTray5-Fan1" + "name": "FanTray5-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } }, { - "name": "FanTray5-Fan2" + "name": "FanTray5-Fan2", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ] }, { "name": "FanTray6", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "FanTray6-Fan1" + "name": "FanTray6-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } }, { - "name": "FanTray6-Fan2" + "name": "FanTray6-Fan2", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ] }, { "name": "FanTray7", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "FanTray7-Fan1" + "name": "FanTray7-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } }, { - "name": "FanTray7-Fan2" + "name": "FanTray7-Fan2", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ] } @@ -153,63 +347,158 @@ "psus": [ { "name": "PSU1", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "PSU1 Fan" + "name": "PSU1 Fan", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ] }, { "name": "PSU2", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "PSU2 Fan" + "name": "PSU2 Fan", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ] } ], "thermals": [ { - "name": "CPU On-board" - }, - { - "name": "Baseboard U3" - }, - { - "name": "SW Internal" - }, - { - "name": "Fan U52" - }, - { - "name": "Fan U17" - }, - { - "name": "SW U52" - }, - { - "name": "SW U16" - }, - { - "name": "PSU1 Inlet" - }, - { - "name": "PSU1 Hotspot" - }, - { - "name": "PSU2 Inlet" - }, - { - "name": "PSU2 Hotspot" - }, - { - "name": "SW U04" - }, - { - "name": "SW U14" - }, - { - "name": "SW U4403" + "name": "CPU On-board", + "controllable": false, + "low-crit-threshold": false, + "high-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false + }, + { + "name": "Baseboard U3", + "controllable": false, + "low-crit-threshold": false, + "high-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false + }, + { + "name": "SW Internal", + "controllable": false, + "low-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false + }, + { + "name": "Fan U52", + "controllable": false, + "low-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false + }, + { + "name": "Fan U17", + "controllable": false, + "low-crit-threshold": false, + "high-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false + }, + { + "name": "SW U52", + "controllable": false, + "low-crit-threshold": false, + "high-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false + }, + { + "name": "SW U16", + "controllable": false, + "low-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false + }, + { + "name": "PSU1 Inlet", + "controllable": false, + "low-crit-threshold": false, + "high-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false + }, + { + "name": "PSU1 Hotspot", + "controllable": false, + "low-crit-threshold": false, + "high-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false + }, + { + "name": "PSU2 Inlet", + "controllable": false, + "low-crit-threshold": false, + "high-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false + }, + { + "name": "PSU2 Hotspot", + "controllable": false, + "low-crit-threshold": false, + "high-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false + }, + { + "name": "SW U04", + "controllable": false, + "low-crit-threshold": false, + "high-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false + }, + { + "name": "SW U14", + "controllable": false, + "low-crit-threshold": false, + "high-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false + }, + { + "name": "SW U4403", + "controllable": false, + "low-crit-threshold": false, + "high-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false } ], "modules": [], diff --git a/device/dell/x86_64-dellemc_z9332f_d1508-r0/system_health_monitoring_config.json b/device/dell/x86_64-dellemc_z9332f_d1508-r0/system_health_monitoring_config.json index d52b24cf905d..4f82136007a3 100644 --- a/device/dell/x86_64-dellemc_z9332f_d1508-r0/system_health_monitoring_config.json +++ b/device/dell/x86_64-dellemc_z9332f_d1508-r0/system_health_monitoring_config.json @@ -6,6 +6,6 @@ "led_color": { "fault": "yellow", "normal": "green", - "booting": "flash_green" + "booting": "flashing green" } } diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_objects.j2 b/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_objects.j2 index e8d4133ee669..7760bfc6189a 100644 --- a/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_objects.j2 +++ b/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_objects.j2 @@ -143,7 +143,11 @@ {% endfor %} {% for port in port_names_active.split(',') %} {% if port not in port_names_extra_queues.split(',') %} +{% if port_names_extra_queues|length > 0 %} + "{{ port }}|5-7": { +{% else %} "{{ port }}|5-6": { +{% endif %} "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }{% if not loop.last %},{% endif %} @@ -187,7 +191,11 @@ }, {% endfor %} {% for port in port_names_inactive.split(',') %} +{% if port_names_extra_queues|length > 0 %} + "{{ port }}|5-7": { +{% else %} "{{ port }}|5-6": { +{% endif %} "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }{% if not loop.last %},{% endif %} @@ -204,7 +212,11 @@ }, {% endfor %} {% for port in port_names_inactive.split(',') %} +{% if port_names_extra_queues|length > 0 %} + "{{ port }}|5-7": { +{% else %} "{{ port }}|5-6": { +{% endif %} "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }{% if not loop.last %},{% endif %} diff --git a/device/mellanox/x86_64-mlnx_msn4410-r0/get_sensors_conf_path b/device/mellanox/x86_64-mlnx_msn4410-r0/get_sensors_conf_path new file mode 120000 index 000000000000..f1509a1e1d3d --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4410-r0/get_sensors_conf_path @@ -0,0 +1 @@ +../x86_64-mlnx_msn4700-r0/get_sensors_conf_path \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn4410-r0/sensors.conf.a1 b/device/mellanox/x86_64-mlnx_msn4410-r0/sensors.conf.a1 new file mode 120000 index 000000000000..4605d556f315 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4410-r0/sensors.conf.a1 @@ -0,0 +1 @@ +../x86_64-mlnx_msn4700-r0/sensors.conf.a1 \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers.json.j2 b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers.json.j2 new file mode 100644 index 000000000000..2905747f5b04 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers.json.j2 @@ -0,0 +1,15 @@ +{# + Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. + Apache-2.0 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +#} +{%- set default_topo = 't2' %} +{%- include 'buffers_config.j2' %} diff --git a/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_defaults_objects.j2 b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_defaults_objects.j2 new file mode 120000 index 000000000000..c01aebb7ae12 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_defaults_objects.j2 @@ -0,0 +1 @@ +../../x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_objects.j2 \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_defaults_t0.j2 b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_defaults_t0.j2 new file mode 100644 index 000000000000..f22c56702af5 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_defaults_t0.j2 @@ -0,0 +1,39 @@ +{# + Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. + Apache-2.0 + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +#} +{% set default_cable = '5m' %} +{% set ingress_lossless_pool_size = '44910592' %} +{% set ingress_lossless_pool_xoff = '1751040' %} +{% set egress_lossless_pool_size = '60817392' %} +{% set egress_lossy_pool_size = '44910592' %} + +{% import 'buffers_defaults_objects.j2' as defs with context %} + +{%- macro generate_buffer_pool_and_profiles_with_inactive_ports(port_names_inactive) %} +{{ defs.generate_buffer_pool_and_profiles_with_inactive_ports(port_names_inactive) }} +{%- endmacro %} + +{%- macro generate_profile_lists_with_inactive_ports(port_names_active, port_names_inactive) %} +{{ defs.generate_profile_lists(port_names_active, port_names_inactive) }} +{%- endmacro %} + +{%- macro generate_queue_buffers_with_inactive_ports(port_names_active, port_names_inactive) %} +{{ defs.generate_queue_buffers(port_names_active, port_names_inactive) }} +{%- endmacro %} + +{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %} +{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }} +{%- endmacro %} diff --git a/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_defaults_t1.j2 b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_defaults_t1.j2 new file mode 100644 index 000000000000..b87050280529 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_defaults_t1.j2 @@ -0,0 +1,39 @@ +{# + Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. + Apache-2.0 + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +#} +{% set default_cable = '5m' %} +{% set ingress_lossless_pool_size = '44587008' %} +{% set ingress_lossless_pool_xoff = '2074624' %} +{% set egress_lossless_pool_size = '60817392' %} +{% set egress_lossy_pool_size = '44587008' %} + +{% import 'buffers_defaults_objects.j2' as defs with context %} + +{%- macro generate_buffer_pool_and_profiles_with_inactive_ports(port_names_inactive) %} +{{ defs.generate_buffer_pool_and_profiles_with_inactive_ports(port_names_inactive) }} +{%- endmacro %} + +{%- macro generate_profile_lists_with_inactive_ports(port_names_active, port_names_inactive) %} +{{ defs.generate_profile_lists(port_names_active, port_names_inactive) }} +{%- endmacro %} + +{%- macro generate_queue_buffers_with_inactive_ports(port_names_active, port_names_inactive) %} +{{ defs.generate_queue_buffers(port_names_active, port_names_inactive) }} +{%- endmacro %} + +{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %} +{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }} +{%- endmacro %} diff --git a/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_defaults_t2.j2 b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_defaults_t2.j2 new file mode 100644 index 000000000000..b0df4defd449 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_defaults_t2.j2 @@ -0,0 +1,44 @@ +{# + Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. + Apache-2.0 + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +#} +{% set default_cable = '1500m' %} +{%-set ports2cable = { + 'spinerouter_leafrouter' : '1500m', + 'spinerouter_spinerouter' : '1500m' + } +-%} +{% set ingress_lossless_pool_size = '35094528' %} +{% set ingress_lossless_pool_xoff = '11567104' %} +{% set egress_lossless_pool_size = '60817392' %} +{% set egress_lossy_pool_size = '35094528' %} + +{% import 'buffers_defaults_objects.j2' as defs with context %} + +{%- macro generate_buffer_pool_and_profiles_with_inactive_ports(port_names_inactive) %} +{{ defs.generate_buffer_pool_and_profiles_with_inactive_ports(port_names_inactive) }} +{%- endmacro %} + +{%- macro generate_profile_lists_with_inactive_ports(port_names_active, port_names_inactive) %} +{{ defs.generate_profile_lists(port_names_active, port_names_inactive) }} +{%- endmacro %} + +{%- macro generate_queue_buffers_with_inactive_ports(port_names_active, port_names_inactive) %} +{{ defs.generate_queue_buffers(port_names_active, port_names_inactive) }} +{%- endmacro %} + +{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %} +{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }} +{%- endmacro %} diff --git a/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_dynamic.json.j2 b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_dynamic.json.j2 new file mode 100644 index 000000000000..4ec20f1d9e84 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_dynamic.json.j2 @@ -0,0 +1,16 @@ +{# + Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. + Apache-2.0 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +#} +{%- set default_topo = 't2' %} +{%- set dynamic_mode = 'true' %} +{%- include 'buffers_config.j2' %} diff --git a/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/pg_profile_lookup.ini b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/pg_profile_lookup.ini new file mode 100644 index 000000000000..7b78fb98ae37 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/pg_profile_lookup.ini @@ -0,0 +1,41 @@ +## +## Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. +## Apache-2.0 +## +## Licensed under the Apache License, Version 2.0 (the "License"); +## you may not use this file except in compliance with the License. +## You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. +## +# PG lossless profiles. +# speed cable size xon xoff threshold + 10000 5m 19456 19456 24576 0 + 25000 5m 19456 19456 26624 0 + 40000 5m 19456 19456 30720 0 + 50000 5m 19456 19456 33792 0 + 100000 5m 19456 19456 59392 0 + 200000 5m 19456 19456 66560 0 + 10000 40m 19456 19456 25600 0 + 25000 40m 19456 19456 28672 0 + 40000 40m 19456 19456 33792 0 + 50000 40m 19456 19456 36864 0 + 100000 40m 19456 19456 66560 0 + 200000 40m 19456 19456 80896 0 + 10000 300m 19456 19456 30720 0 + 25000 300m 19456 19456 41984 0 + 40000 300m 19456 19456 54272 0 + 50000 300m 19456 19456 63488 0 + 100000 300m 19456 19456 120832 0 + 200000 300m 19456 19456 188416 0 + 10000 1500m 19456 19456 55296 0 + 25000 1500m 19456 19456 103424 0 + 40000 1500m 19456 19456 153600 0 + 50000 1500m 19456 19456 187392 0 + 100000 1500m 19456 19456 366592 0 diff --git a/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/port_config.ini b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/port_config.ini new file mode 100644 index 000000000000..d64b66b0b691 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/port_config.ini @@ -0,0 +1,129 @@ +# name lanes alias index speed +Ethernet0 0,1 etp1a 1 100000 +Ethernet2 2,3 etp1b 1 100000 +Ethernet4 4,5 etp1c 1 100000 +Ethernet6 6,7 etp1d 1 100000 +Ethernet8 8,9 etp2a 2 100000 +Ethernet10 10,11 etp2b 2 100000 +Ethernet12 12,13 etp2c 2 100000 +Ethernet14 14,15 etp2d 2 100000 +Ethernet16 16,17 etp3a 3 100000 +Ethernet18 18,19 etp3b 3 100000 +Ethernet20 20,21 etp3c 3 100000 +Ethernet22 22,23 etp3d 3 100000 +Ethernet24 24,25 etp4a 4 100000 +Ethernet26 26,27 etp4b 4 100000 +Ethernet28 28,29 etp4c 4 100000 +Ethernet30 30,31 etp4d 4 100000 +Ethernet32 32,33 etp5a 5 100000 +Ethernet34 34,35 etp5b 5 100000 +Ethernet36 36,37 etp5c 5 100000 +Ethernet38 38,39 etp5d 5 100000 +Ethernet40 40,41 etp6a 6 100000 +Ethernet42 42,43 etp6b 6 100000 +Ethernet44 44,45 etp6c 6 100000 +Ethernet46 46,47 etp6d 6 100000 +Ethernet48 48,49 etp7a 7 100000 +Ethernet50 50,51 etp7b 7 100000 +Ethernet52 52,53 etp7c 7 100000 +Ethernet54 54,55 etp7d 7 100000 +Ethernet56 56,57 etp8a 8 100000 +Ethernet58 58,59 etp8b 8 100000 +Ethernet60 60,61 etp8c 8 100000 +Ethernet62 62,63 etp8d 8 100000 +Ethernet64 64,65 etp9a 9 100000 +Ethernet66 66,67 etp9b 9 100000 +Ethernet68 68,69 etp9c 9 100000 +Ethernet70 70,71 etp9d 9 100000 +Ethernet72 72,73 etp10a 10 100000 +Ethernet74 74,75 etp10b 10 100000 +Ethernet76 76,77 etp10c 10 100000 +Ethernet78 78,79 etp10d 10 100000 +Ethernet80 80,81 etp11a 11 100000 +Ethernet82 82,83 etp11b 11 100000 +Ethernet84 84,85 etp11c 11 100000 +Ethernet86 86,87 etp11d 11 100000 +Ethernet88 88,89 etp12a 12 100000 +Ethernet90 90,91 etp12b 12 100000 +Ethernet92 92,93 etp12c 12 100000 +Ethernet94 94,95 etp12d 12 100000 +Ethernet96 96,97 etp13a 13 100000 +Ethernet98 98,99 etp13b 13 100000 +Ethernet100 100,101 etp13c 13 100000 +Ethernet102 102,103 etp13d 13 100000 +Ethernet104 104,105 etp14a 14 100000 +Ethernet106 106,107 etp14b 14 100000 +Ethernet108 108,109 etp14c 14 100000 +Ethernet110 110,111 etp14d 14 100000 +Ethernet112 112,113 etp15a 15 100000 +Ethernet114 114,115 etp15b 15 100000 +Ethernet116 116,117 etp15c 15 100000 +Ethernet118 118,119 etp15d 15 100000 +Ethernet120 120,121 etp16a 16 100000 +Ethernet122 122,123 etp16b 16 100000 +Ethernet124 124,125 etp16c 16 100000 +Ethernet126 126,127 etp16d 16 100000 +Ethernet128 128,129 etp17a 17 100000 +Ethernet130 130,131 etp17b 17 100000 +Ethernet132 132,133 etp17c 17 100000 +Ethernet134 134,135 etp17d 17 100000 +Ethernet136 136,137 etp18a 18 100000 +Ethernet138 138,139 etp18b 18 100000 +Ethernet140 140,141 etp18c 18 100000 +Ethernet142 142,143 etp18d 18 100000 +Ethernet144 144,145 etp19a 19 100000 +Ethernet146 146,147 etp19b 19 100000 +Ethernet148 148,149 etp19c 19 100000 +Ethernet150 150,151 etp19d 19 100000 +Ethernet152 152,153 etp20a 20 100000 +Ethernet154 154,155 etp20b 20 100000 +Ethernet156 156,157 etp20c 20 100000 +Ethernet158 158,159 etp20d 20 100000 +Ethernet160 160,161 etp21a 21 100000 +Ethernet162 162,163 etp21b 21 100000 +Ethernet164 164,165 etp21c 21 100000 +Ethernet166 166,167 etp21d 21 100000 +Ethernet168 168,169 etp22a 22 100000 +Ethernet170 170,171 etp22b 22 100000 +Ethernet172 172,173 etp22c 22 100000 +Ethernet174 174,175 etp22d 22 100000 +Ethernet176 176,177 etp23a 23 100000 +Ethernet178 178,179 etp23b 23 100000 +Ethernet180 180,181 etp23c 23 100000 +Ethernet182 182,183 etp23d 23 100000 +Ethernet184 184,185 etp24a 24 100000 +Ethernet186 186,187 etp24b 24 100000 +Ethernet188 188,189 etp24c 24 100000 +Ethernet190 190,191 etp24d 24 100000 +Ethernet192 192,193 etp25a 25 100000 +Ethernet194 194,195 etp25b 25 100000 +Ethernet196 196,197 etp25c 25 100000 +Ethernet198 198,199 etp25d 25 100000 +Ethernet200 200,201 etp26a 26 100000 +Ethernet202 202,203 etp26b 26 100000 +Ethernet204 204,205 etp26c 26 100000 +Ethernet206 206,207 etp26d 26 100000 +Ethernet208 208,209 etp27a 27 100000 +Ethernet210 210,211 etp27b 27 100000 +Ethernet212 212,213 etp27c 27 100000 +Ethernet214 214,215 etp27d 27 100000 +Ethernet216 216,217 etp28a 28 100000 +Ethernet218 218,219 etp28b 28 100000 +Ethernet220 220,221 etp28c 28 100000 +Ethernet222 222,223 etp28d 28 100000 +Ethernet224 224,225 etp29a 29 100000 +Ethernet226 226,227 etp29b 29 100000 +Ethernet228 228,229 etp29c 29 100000 +Ethernet230 230,231 etp29d 29 100000 +Ethernet232 232,233 etp30a 30 100000 +Ethernet234 234,235 etp30b 30 100000 +Ethernet236 236,237 etp30c 30 100000 +Ethernet238 238,239 etp30d 30 100000 +Ethernet240 240,241 etp31a 31 100000 +Ethernet242 242,243 etp31b 31 100000 +Ethernet244 244,245 etp31c 31 100000 +Ethernet246 246,247 etp31d 31 100000 +Ethernet248 248,249 etp32a 32 100000 +Ethernet250 250,251 etp32b 32 100000 +Ethernet252 252,253 etp32c 32 100000 +Ethernet254 254,255 etp32d 32 100000 diff --git a/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/qos.json.j2 b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/qos.json.j2 new file mode 120000 index 000000000000..eccf286dc879 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/qos.json.j2 @@ -0,0 +1 @@ +../../x86_64-mlnx_msn2700-r0/ACS-MSN2700/qos.json.j2 \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/sai.profile b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/sai.profile new file mode 100644 index 000000000000..d20b5e46b843 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/sai.profile @@ -0,0 +1,3 @@ +SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_4700_128x100g.xml +SAI_DUMP_STORE_PATH=/var/log/mellanox/sdk-dumps +SAI_DUMP_STORE_AMOUNT=10 diff --git a/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/sai_4700_128x100g.xml b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/sai_4700_128x100g.xml new file mode 100644 index 000000000000..f5d49f8b86ab --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/sai_4700_128x100g.xml @@ -0,0 +1,277 @@ + + + + + 00:02:03:04:05:00 + + + 1 + + + 32 + + + + + 1 + 8 + 17 + 3 + 1536 + 4 + + + 5 + 8 + 16 + 3 + 1536 + 4 + + + 9 + 8 + 19 + 3 + 1536 + 4 + + + 13 + 8 + 18 + 3 + 1536 + 4 + + + 17 + 8 + 21 + 3 + 1536 + 4 + + + 21 + 8 + 20 + 3 + 1536 + 4 + + + 25 + 8 + 23 + 3 + 1536 + 4 + + + 29 + 8 + 22 + 3 + 1536 + 4 + + + 33 + 8 + 29 + 3 + 1536 + 4 + + + 37 + 8 + 28 + 3 + 1536 + 4 + + + 41 + 8 + 31 + 3 + 1536 + 4 + + + 45 + 8 + 30 + 3 + 1536 + 4 + + + 49 + 8 + 25 + 3 + 1536 + 4 + + + 53 + 8 + 24 + 3 + 1536 + 4 + + + 57 + 8 + 27 + 3 + 1536 + 4 + + + 61 + 8 + 26 + 3 + 1536 + 4 + + + 65 + 8 + 14 + 3 + 1536 + 4 + + + 69 + 8 + 15 + 3 + 1536 + 4 + + + 73 + 8 + 12 + 3 + 1536 + 4 + + + 77 + 8 + 13 + 3 + 1536 + 4 + + + 81 + 8 + 10 + 3 + 1536 + 4 + + + 85 + 8 + 11 + 3 + 1536 + 4 + + + 89 + 8 + 8 + 3 + 1536 + 4 + + + 93 + 8 + 9 + 3 + 1536 + 4 + + + 97 + 8 + 2 + 3 + 1536 + 4 + + + 101 + 8 + 3 + 3 + 1536 + 4 + + + 105 + 8 + 0 + + + 3 + + + 1536 + 4 + + + 109 + 8 + 1 + 3 + 1536 + 4 + + + 113 + 8 + 6 + 3 + 1536 + 4 + + + 117 + 8 + 7 + 3 + 1536 + 4 + + + 121 + 8 + 4 + 3 + 1536 + 4 + + + 125 + 8 + 5 + 3 + 1536 + 4 + + + + diff --git a/dockers/docker-dhcp-relay/dhcp-relay.monitors.j2 b/dockers/docker-dhcp-relay/dhcp-relay.monitors.j2 index ae11105ae3ba..0928bac22d4d 100644 --- a/dockers/docker-dhcp-relay/dhcp-relay.monitors.j2 +++ b/dockers/docker-dhcp-relay/dhcp-relay.monitors.j2 @@ -6,7 +6,7 @@ programs= {% if VLAN and vlan_name in VLAN and 'dhcp_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcp_servers']|length > 0 %} {% set _dummy = monitor_instance.update({'flag': True}) %} {%- endif %} -{% if VLAN and vlan_name in VLAN and 'dhcpv6_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcpv6_servers']|length > 0 %} +{% if DHCP_RELAY and vlan_name in DHCP_RELAY and DHCP_RELAY[vlan_name]['dhcpv6_servers']|length > 0 %} {% set _dummy = monitor_instance.update({'flag': True}) %} {%- endif %} {% if monitor_instance.flag %} @@ -31,7 +31,7 @@ dhcpmon-{{ vlan_name }} {% endfor %} {% endif %} {# Check DHCPv6 agents #} -{% if VLAN and vlan_name in VLAN and 'dhcpv6_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcpv6_servers']|length > 0 %} +{% if DHCP_RELAY and vlan_name in DHCP_RELAY and DHCP_RELAY[vlan_name]['dhcpv6_servers']|length > 0 %} {% for dhcpv6_server in VLAN[vlan_name]['dhcpv6_servers'] %} {% if dhcpv6_server | ipv6 %} {% set _dummy = relay_for_ipv6.update({'flag': True}) %} @@ -68,7 +68,6 @@ stderr_logfile=syslog dependent_startup=true dependent_startup_wait_for= {%- if relay_for_ipv4.flag %}isc-dhcpv4-relay-{{ vlan_name }}:running {% endif %} -{% if relay_for_ipv6.flag %}dhcp6relay:running{% endif %} {% set _dummy = relay_for_ipv4.update({'flag': False}) %} diff --git a/dockers/docker-dhcp-relay/dhcp-relay.programs.j2 b/dockers/docker-dhcp-relay/dhcp-relay.programs.j2 index 9cb0c03876d6..d539d895a5bb 100644 --- a/dockers/docker-dhcp-relay/dhcp-relay.programs.j2 +++ b/dockers/docker-dhcp-relay/dhcp-relay.programs.j2 @@ -1,5 +1,6 @@ [group:dhcp-relay] programs= +{%- set relay_for_ipv6 = { 'flag': False } %} {%- set add_preceding_comma = { 'flag': False } %} {% for vlan_name in VLAN_INTERFACE %} {# Append DHCPv4 agents #} @@ -8,10 +9,13 @@ programs= {% set _dummy = add_preceding_comma.update({'flag': True}) %} isc-dhcpv4-relay-{{ vlan_name }} {%- endif %} +{% if DHCP_RELAY and vlan_name in DHCP_RELAY and DHCP_RELAY[vlan_name]['dhcpv6_servers']|length > 0 %} +{% set _dummy = relay_for_ipv6.update({'flag': True}) %} +{%- endif %} +{% endfor %} {# Append DHCPv6 agents #} -{% if VLAN and vlan_name in VLAN and 'dhcpv6_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcpv6_servers']|length > 0 %} +{% if relay_for_ipv6.flag %} {% if add_preceding_comma.flag %},{% endif %} {% set _dummy = add_preceding_comma.update({'flag': True}) %} dhcp6relay -{%- endif %} -{% endfor %} +{% endif %} diff --git a/dockers/docker-dhcp-relay/dhcpv6-relay.agents.j2 b/dockers/docker-dhcp-relay/dhcpv6-relay.agents.j2 index 218c95320edc..cca0b1c4b21a 100644 --- a/dockers/docker-dhcp-relay/dhcpv6-relay.agents.j2 +++ b/dockers/docker-dhcp-relay/dhcpv6-relay.agents.j2 @@ -1,15 +1,17 @@ {# Append DHCPv6 agents #} -{% if VLAN and vlan_name in VLAN and 'dhcpv6_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcpv6_servers']|length > 0 %} -{% for dhcpv6_server in VLAN[vlan_name]['dhcpv6_servers'] %} +{% for vlan_name in VLAN_INTERFACE %} +{% if DHCP_RELAY and vlan_name in DHCP_RELAY and DHCP_RELAY[vlan_name]['dhcpv6_servers']|length > 0 %} +{% for dhcpv6_server in DHCP_RELAY[vlan_name]['dhcpv6_servers'] %} {% if dhcpv6_server | ipv6 %} {% set _dummy = relay_for_ipv6.update({'flag': True}) %} {% endif %} {% endfor %} +{% endif %} +{% endfor %} {% if relay_for_ipv6.flag %} {% set _dummy = relay_for_ipv6.update({'flag': False}) %} [program:dhcp6relay] command=/usr/sbin/dhcp6relay - priority=3 autostart=false autorestart=false @@ -19,4 +21,3 @@ dependent_startup=true dependent_startup_wait_for=start:exited {% endif %} -{% endif %} diff --git a/dockers/docker-dhcp-relay/docker-dhcp-relay.supervisord.conf.j2 b/dockers/docker-dhcp-relay/docker-dhcp-relay.supervisord.conf.j2 index 41a13dd496ad..ddd93bb28644 100644 --- a/dockers/docker-dhcp-relay/docker-dhcp-relay.supervisord.conf.j2 +++ b/dockers/docker-dhcp-relay/docker-dhcp-relay.supervisord.conf.j2 @@ -48,7 +48,7 @@ dependent_startup_wait_for=rsyslogd:running {% if VLAN and vlan_name in VLAN and 'dhcp_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcp_servers']|length > 0 %} {% set _dummy = ipv4_num_relays.update({'count': ipv4_num_relays.count + 1}) %} {% endif %} -{% if VLAN and vlan_name in VLAN and 'dhcpv6_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcpv6_servers']|length > 0 %} +{% if DHCP_RELAY and vlan_name in DHCP_RELAY and DHCP_RELAY[vlan_name]['dhcpv6_servers']|length > 0 %} {% set _dummy = ipv6_num_relays.update({'count': ipv6_num_relays.count + 1}) %} {% endif %} {% endfor %} @@ -62,9 +62,9 @@ dependent_startup_wait_for=rsyslogd:running {% set relay_for_ipv6 = { 'flag': False } %} {% for vlan_name in VLAN_INTERFACE %} {% include 'dhcpv4-relay.agents.j2' %} -{% include 'dhcpv6-relay.agents.j2' %} {% endfor %} +{% include 'dhcpv6-relay.agents.j2' %} {% include 'dhcp-relay.monitors.j2' %} {% endif %} {% endif %} diff --git a/dockers/docker-orchagent/Dockerfile.j2 b/dockers/docker-orchagent/Dockerfile.j2 index 5734d3fd18fb..88041718ea70 100755 --- a/dockers/docker-orchagent/Dockerfile.j2 +++ b/dockers/docker-orchagent/Dockerfile.j2 @@ -74,7 +74,7 @@ RUN apt-get purge -y \ COPY ["files/arp_update", "/usr/bin"] COPY ["arp_update.conf", "files/arp_update_vars.j2", "/usr/share/sonic/templates/"] -COPY ["ndppd.conf", "/usr/share/sonic/templates/"] +COPY ["ndppd.conf", "tunnel_packet_handler.conf", "/usr/share/sonic/templates/"] COPY ["enable_counters.py", "tunnel_packet_handler.py", "/usr/bin/"] COPY ["docker-init.sh", "orchagent.sh", "swssconfig.sh", "buffermgrd.sh", "/usr/bin/"] COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] diff --git a/dockers/docker-orchagent/docker-init.sh b/dockers/docker-orchagent/docker-init.sh index 5dc5f2df25c2..fb042e21cf1c 100755 --- a/dockers/docker-orchagent/docker-init.sh +++ b/dockers/docker-orchagent/docker-init.sh @@ -13,6 +13,7 @@ CFGGEN_PARAMS=" \ -t /usr/share/sonic/templates/wait_for_link.sh.j2,/usr/bin/wait_for_link.sh \ " VLAN=$(sonic-cfggen $CFGGEN_PARAMS) +SUBTYPE=$(sonic-cfggen -d -v "DEVICE_METADATA['localhost']['subtype']") chmod +x /usr/bin/wait_for_link.sh @@ -27,4 +28,8 @@ if [ "$VLAN" != "" ]; then cp /usr/share/sonic/templates/ndppd.conf /etc/supervisor/conf.d/ fi +if [ "$SUBTYPE" == "DualToR" ]; then + cp /usr/share/sonic/templates/tunnel_packet_handler.conf /etc/supervisor/conf.d/ +fi + exec /usr/local/bin/supervisord diff --git a/dockers/docker-orchagent/enable_counters.py b/dockers/docker-orchagent/enable_counters.py index a00bd3facce7..0c966593f5b2 100755 --- a/dockers/docker-orchagent/enable_counters.py +++ b/dockers/docker-orchagent/enable_counters.py @@ -26,6 +26,8 @@ def enable_rates(): counters_db.set('COUNTERS_DB', 'RATES:PORT', 'PORT_ALPHA', DEFAULT_ALPHA) counters_db.set('COUNTERS_DB', 'RATES:RIF', 'RIF_SMOOTH_INTERVAL', DEFAULT_SMOOTH_INTERVAL) counters_db.set('COUNTERS_DB', 'RATES:RIF', 'RIF_ALPHA', DEFAULT_ALPHA) + counters_db.set('COUNTERS_DB', 'RATES:TUNNEL', 'TUNNEL_SMOOTH_INTERVAL', DEFAULT_SMOOTH_INTERVAL) + counters_db.set('COUNTERS_DB', 'RATES:TUNNEL', 'TUNNEL_ALPHA', DEFAULT_ALPHA) def enable_counters(): diff --git a/dockers/docker-orchagent/supervisord.conf b/dockers/docker-orchagent/supervisord.conf index d0264e7c5d5a..2c3d05999a9c 100644 --- a/dockers/docker-orchagent/supervisord.conf +++ b/dockers/docker-orchagent/supervisord.conf @@ -205,13 +205,3 @@ stdout_logfile=syslog stderr_logfile=syslog dependent_startup=true dependent_startup_wait_for=swssconfig:exited - -[program:tunnel_packet_handler] -command=/usr/bin/tunnel_packet_handler.py -priority=12 -autostart=false -autorestart=unexpected -stdout_logfile=syslog -stderr_logfile=syslog -dependent_startup=true -dependent_startup_wait_for=swssconfig:exited diff --git a/dockers/docker-orchagent/tunnel_packet_handler.conf b/dockers/docker-orchagent/tunnel_packet_handler.conf new file mode 100644 index 000000000000..aa6f3d2f3380 --- /dev/null +++ b/dockers/docker-orchagent/tunnel_packet_handler.conf @@ -0,0 +1,9 @@ +[program:tunnel_packet_handler] +command=/usr/bin/tunnel_packet_handler.py +priority=12 +autostart=false +autorestart=unexpected +stdout_logfile=syslog +stderr_logfile=syslog +dependent_startup=true +dependent_startup_wait_for=swssconfig:exited diff --git a/files/build/versions/build/build-sonic-slave-buster/versions-deb-buster b/files/build/versions/build/build-sonic-slave-buster/versions-deb-buster index d1ed4d09403a..11723f435d7f 100644 --- a/files/build/versions/build/build-sonic-slave-buster/versions-deb-buster +++ b/files/build/versions/build/build-sonic-slave-buster/versions-deb-buster @@ -1,9 +1,9 @@ -applibs==1.mlnx.4.5.2262 -applibs-dev==1.mlnx.4.5.2262 +applibs==1.mlnx.4.5.2320 +applibs-dev==1.mlnx.4.5.2320 bfnplatform==1.0.0 -innovium-sai==0.107.5 -innovium-sai-headers==0.107.5 -iproute2-dev==1.mlnx.4.5.2262 +innovium-sai==0.107.6 +innovium-sai-headers==0.107.6 +iproute2-dev==1.mlnx.4.5.2320 isc-dhcp-relay==4.4.1-2 kernel-mft-dkms==4.18.0-106 libhiredis-dev==0.14.0-3~bpo9+1 @@ -18,7 +18,7 @@ libnl-nf-3-200==3.5.0-1 libnl-nf-3-dev==3.5.0-1 libnl-route-3-200==3.5.0-1 libnl-route-3-dev==3.5.0-1 -libsaibcm==4.3.5.3-5 +libsaibcm==4.3.7.1 libsaimetadata==1.0.0 libsaimetadata-dev==1.0.0 libsairedis==1.0.0 @@ -55,20 +55,20 @@ sonic-mgmt-common==1.0.0 sonic-mgmt-common-codegen==1.0.0 sonic-mgmt-framework==1.0-01 swss==1.0.0 -sx-acl-helper==1.mlnx.4.5.2262 -sx-acl-helper-dev==1.mlnx.4.5.2262 -sx-complib==1.mlnx.4.5.2262 -sx-complib-dev==1.mlnx.4.5.2262 -sx-examples==1.mlnx.4.5.2262 -sx-examples-dev==1.mlnx.4.5.2262 -sx-gen-utils==1.mlnx.4.5.2262 -sx-gen-utils-dev==1.mlnx.4.5.2262 -sx-scew==1.mlnx.4.5.2262 -sx-scew-dev==1.mlnx.4.5.2262 -sxd-libs==1.mlnx.4.5.2262 -sxd-libs-dev==1.mlnx.4.5.2262 +sx-acl-helper==1.mlnx.4.5.2320 +sx-acl-helper-dev==1.mlnx.4.5.2320 +sx-complib==1.mlnx.4.5.2320 +sx-complib-dev==1.mlnx.4.5.2320 +sx-examples==1.mlnx.4.5.2320 +sx-examples-dev==1.mlnx.4.5.2320 +sx-gen-utils==1.mlnx.4.5.2320 +sx-gen-utils-dev==1.mlnx.4.5.2320 +sx-scew==1.mlnx.4.5.2320 +sx-scew-dev==1.mlnx.4.5.2320 +sxd-libs==1.mlnx.4.5.2320 +sxd-libs-dev==1.mlnx.4.5.2320 syncd==1.0.0 syncd-vs==1.0.0 thrift-compiler==0.11.0-4 -wjh-libs==1.mlnx.4.5.2262 -wjh-libs-dev==1.mlnx.4.5.2262 \ No newline at end of file +wjh-libs==1.mlnx.4.5.2320 +wjh-libs-dev==1.mlnx.4.5.2320 \ No newline at end of file diff --git a/files/build/versions/build/build-sonic-slave-buster/versions-git b/files/build/versions/build/build-sonic-slave-buster/versions-git index 67d6f424e2b2..46cf33203b54 100644 --- a/files/build/versions/build/build-sonic-slave-buster/versions-git +++ b/files/build/versions/build/build-sonic-slave-buster/versions-git @@ -1,14 +1,14 @@ -https://github.com/CESNET/libyang.git==87375f15159545a87a1e0de200f5d9d67e9091d7 +https://github.com/CESNET/libyang.git==0c609c35080f523c9696db48976de8257d174102 https://github.com/daveolson53/libnss-tacplus.git==19008ab68d9d504aa58eb34d5f564755a1613b8b https://github.com/jeroennijhof/pam_tacplus.git==453c7b6fc78eceeaaf39a59b6b87c124628f2fe8 -https://github.com/jpirko/libteam.git==69a7494bb77dc10bb27076add07b380dbd778592 +https://github.com/jpirko/libteam.git==c32369829b2b1881e25fab85d74aa0b3ad017dcb https://github.com/Mellanox/libpsample.git==62bb27d9a49424e45191eee81df7ce0d8c74e774 -https://github.com/sflow/host-sflow==4ff2a940848fa9244a289f9c96fd9681d31a0264 +https://github.com/sflow/host-sflow==f1ddde6580ae049e53cb9e25822d4c7d98a672cf https://github.com/sflow/sflowtool==5307b19399ffb0a1a873c9d09e78cb5011deaf6f -https://github.com/thom311/libnl==3399f520bae2231c5b6a6c2adce52b383292c520 +https://github.com/thom311/libnl==cbafad9ddf24caef5230fef715d34f0539603be0 https://salsa.debian.org/debian/libteam.git==f8808df228b00873926b5e7b998ad8b61368d4c5 https://salsa.debian.org/dhcp-team/isc-dhcp.git==18ecb042065e51e088b7470566526cd00e297c14 -https://salsa.debian.org/kernel-team/ethtool/==5ead2b58847600ea0ccd0aa76b5bedce678f17ee +https://salsa.debian.org/kernel-team/ethtool/==fb77fb17864600d7deb46729c28c677c7da367d5 https://salsa.debian.org/kernel-team/initramfs-tools.git==40e544e13611c1b2690eb99a8096fc16c1b9c74e https://salsa.debian.org/sk-guest/monit.git==c9da7ebb1f35dfba17b50b5969a6e75e29cbec0d -https://salsa.debian.org/ssh-team/openssh.git==de790f931452a2dcb4490d074d5a16ab8456a523 \ No newline at end of file +https://salsa.debian.org/ssh-team/openssh.git==cac473afc339d472f01bd50674ddcf3adb5fc82e \ No newline at end of file diff --git a/files/build/versions/build/build-sonic-slave-buster/versions-py3 b/files/build/versions/build/build-sonic-slave-buster/versions-py3 index a8d7da245960..7e5141986cc8 100644 --- a/files/build/versions/build/build-sonic-slave-buster/versions-py3 +++ b/files/build/versions/build/build-sonic-slave-buster/versions-py3 @@ -1,6 +1,6 @@ -charset-normalizer==2.1.0 +charset-normalizer==2.1.1 click==7.0 -docker==5.0.3 +docker==6.0.0 ijson==2.6.1 ipaddress==1.0.23 jsondiff==2.0.0 @@ -8,10 +8,10 @@ jsonschema==2.6.0 natsort==6.2.1 netaddr==0.8.0 netifaces==0.11.0 -psutil==5.9.1 +psutil==5.9.2 pyroute2==0.5.14 python-arptable==0.0.2 tabulate==0.8.10 -websocket-client==1.3.3 +websocket-client==1.4.1 xmltodict==0.12.0 zipp==1.2.0 \ No newline at end of file diff --git a/files/build/versions/build/build-sonic-slave-buster/versions-py3-all-arm64 b/files/build/versions/build/build-sonic-slave-buster/versions-py3-all-arm64 index 1b5ad59ac9df..ab8db0a0df70 100644 --- a/files/build/versions/build/build-sonic-slave-buster/versions-py3-all-arm64 +++ b/files/build/versions/build/build-sonic-slave-buster/versions-py3-all-arm64 @@ -1,3 +1,4 @@ bitarray==1.5.3 lxml==4.6.3 -requests==2.28.1 \ No newline at end of file +requests==2.28.1 +urllib3==1.26.12 \ No newline at end of file diff --git a/files/build/versions/build/build-sonic-slave-buster/versions-py3-all-armhf b/files/build/versions/build/build-sonic-slave-buster/versions-py3-all-armhf index 1b5ad59ac9df..ab8db0a0df70 100644 --- a/files/build/versions/build/build-sonic-slave-buster/versions-py3-all-armhf +++ b/files/build/versions/build/build-sonic-slave-buster/versions-py3-all-armhf @@ -1,3 +1,4 @@ bitarray==1.5.3 lxml==4.6.3 -requests==2.28.1 \ No newline at end of file +requests==2.28.1 +urllib3==1.26.12 \ No newline at end of file diff --git a/files/build/versions/build/build-sonic-slave-buster/versions-web b/files/build/versions/build/build-sonic-slave-buster/versions-web index 3d6d31fad210..58cf7826ddb6 100644 --- a/files/build/versions/build/build-sonic-slave-buster/versions-web +++ b/files/build/versions/build/build-sonic-slave-buster/versions-web @@ -11,7 +11,6 @@ http://deb.debian.org/debian/pool/main/n/ntp/ntp_4.2.8p12+dfsg.orig.tar.xz==7104 http://http.debian.net/debian/pool/main/h/hiredis/hiredis_0.14.0-3~bpo9+1.debian.tar.xz==ef340aedc6fd42c549cd503bffb498b2 http://http.debian.net/debian/pool/main/h/hiredis/hiredis_0.14.0-3~bpo9+1.dsc==be4ce11ef67268e59e4b6be587327c40 http://http.debian.net/debian/pool/main/h/hiredis/hiredis_0.14.0.orig.tar.gz==6d565680a4af0d2e261abbc3e3431b2b -https://chrome-infra-packages.appspot.com/client?platform=linux-amd64&version=git_revision:2fe24264d5b4585ecd16ba8e9bb582d8f4b20875==e1557fb4a093dec95a2251d01f0d4cd3 https://github.com/aristanetworks/sonic-firmware/raw/6d0d1661d92a342acedb6839dba970ae5778b478/phy/phy-credo_1.0_amd64.deb==dd74acbb7bf979b01c1a89e2a628aaf3 https://github.com/CumulusNetworks/ifupdown2/archive/1.2.8-1.tar.gz==12f45e90d23178e96cf70f68dc9455e6 https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.5/swagger-codegen-cli-2.4.5.jar==219f1453ff22482d9e080effbfa7fa81 @@ -29,8 +28,8 @@ https://sonicstorage.blob.core.windows.net/debian/pool/main/n/net-snmp/net-snmp_ https://sonicstorage.blob.core.windows.net/debian/pool/main/n/net-snmp/net-snmp_5.7.3+dfsg.orig.tar.xz==6391ae27eb1ae34ff5530712bb1c4209 https://sonicstorage.blob.core.windows.net/packages/20190307/bcmcmd?sv=2015-04-05&sr=b&sig=sUdbU7oVbh5exbXXHVL5TDFBTWDDBASHeJ8Cp0B0TIc%3D&se=2038-05-06T22%3A34%3A19Z&sp=r==b8aefc751bdf93218716bca6797460ff https://sonicstorage.blob.core.windows.net/packages/20190307/dsserve?sv=2015-04-05&sr=b&sig=lk7BH3DtW%2F5ehc0Rkqfga%2BUCABI0UzQmDamBsZH9K6w%3D&se=2038-05-06T22%3A34%3A45Z&sp=r==f9d4b815ebb9be9f755dedca8a51170d -https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm-dev_4.3.5.3-5_amd64.deb?sv=2020-08-04&st=2022-06-06T04%3A45%3A06Z&se=2037-06-07T04%3A45%3A00Z&sr=b&sp=r&sig=SF6YOtYzSIcwSR4BRInnimUjbusNp4mPHFunFjm%2Fors%3D==e9861d9d73d17207e120b2c089ae590a -https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm_4.3.5.3-5_amd64.deb?sv=2020-08-04&st=2022-06-06T04%3A44%3A45Z&se=2037-06-07T04%3A44%3A00Z&sr=b&sp=r&sig=uG51Q6rJrZYNVVuoShw8F4zas1n6zi%2FJ7udpTSZ87M8%3D==1594e9cfb991e0ed2d610d84a141a731 +https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm-dev_4.3.7.1_amd64.deb?sv=2020-08-04&st=2022-09-14T09%3A38%3A00Z&se=2037-09-15T09%3A38%3A00Z&sr=b&sp=r&sig=woY1S03ENzUKUG0htzuIaPl%2ByV0dSOm2QsimPDBhGpw%3D==62e0023f93767abcbe661da66b4bdc7c +https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm_4.3.7.1_amd64.deb?sv=2020-08-04&st=2022-09-14T09%3A37%3A35Z&se=2037-09-15T09%3A37%3A00Z&sr=b&sp=r&sig=Yb9q50mb5E0A9mAj8DEc7xfc1WHdW1tyqi5OdAjUSec%3D==38415617b3bf93b2c64a6334e201a044 https://sonicstorage.blob.core.windows.net/packages/debian/smartmontools_6.6-1.debian.tar.xz?sv=2015-04-05&sr=b&sig=H0RFeC41MCvhTQCln85DuPLn5v2goozwz%2FB9sA9p5eQ%3D&se=2046-08-20T23%3A46%3A02Z&sp=r==47a284f4762f86ba24753ea75d85e6cb https://sonicstorage.blob.core.windows.net/packages/debian/smartmontools_6.6-1.dsc?sv=2015-04-05&sr=b&sig=IS7FKUN%2Bvq0T55f4X2hGAViB70Y%2FgzjGgvzpUJLyUfA%3D&se=2046-08-20T23%3A46%3A57Z&sp=r==151f97b46df2dafbd5bb954bb419642c https://sonicstorage.blob.core.windows.net/packages/debian/smartmontools_6.6.orig.tar.gz?sv=2015-04-05&sr=b&sig=JZx4qiLuO36T0rsGqk4V2RDuWjRw6NztsLK7vlBYAkg%3D&se=2046-08-20T23%3A47%3A13Z&sp=r==9ae2c6e7131cd2813edcc65cbe5f223f diff --git a/files/build/versions/build/build-sonic-slave-stretch/versions-web b/files/build/versions/build/build-sonic-slave-stretch/versions-web index 26ffd4974b35..71c012993d06 100644 --- a/files/build/versions/build/build-sonic-slave-stretch/versions-web +++ b/files/build/versions/build/build-sonic-slave-stretch/versions-web @@ -1,2 +1,2 @@ -https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm-dev_4.3.5.3-5_amd64.deb?sv=2020-08-04&st=2022-06-06T04%3A45%3A06Z&se=2037-06-07T04%3A45%3A00Z&sr=b&sp=r&sig=SF6YOtYzSIcwSR4BRInnimUjbusNp4mPHFunFjm%2Fors%3D==e9861d9d73d17207e120b2c089ae590a -https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm_4.3.5.3-5_amd64.deb?sv=2020-08-04&st=2022-06-06T04%3A44%3A45Z&se=2037-06-07T04%3A44%3A00Z&sr=b&sp=r&sig=uG51Q6rJrZYNVVuoShw8F4zas1n6zi%2FJ7udpTSZ87M8%3D==1594e9cfb991e0ed2d610d84a141a731 \ No newline at end of file +https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm-dev_4.3.7.1_amd64.deb?sv=2020-08-04&st=2022-09-14T09%3A38%3A00Z&se=2037-09-15T09%3A38%3A00Z&sr=b&sp=r&sig=woY1S03ENzUKUG0htzuIaPl%2ByV0dSOm2QsimPDBhGpw%3D==62e0023f93767abcbe661da66b4bdc7c +https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm_4.3.7.1_amd64.deb?sv=2020-08-04&st=2022-09-14T09%3A37%3A35Z&se=2037-09-15T09%3A37%3A00Z&sr=b&sp=r&sig=Yb9q50mb5E0A9mAj8DEc7xfc1WHdW1tyqi5OdAjUSec%3D==38415617b3bf93b2c64a6334e201a044 \ No newline at end of file diff --git a/files/build/versions/default/versions-docker b/files/build/versions/default/versions-docker index 4b545d5d71d3..7793b4dd0353 100644 --- a/files/build/versions/default/versions-docker +++ b/files/build/versions/default/versions-docker @@ -1,10 +1,10 @@ -amd64:amd64/debian:buster==sha256:0e328f15f5cb0f93bff52a37d98f0bbfc40f97fcaf250096fd2b2c6871a497eb +amd64:amd64/debian:buster==sha256:12da36082ea17cd91307adaf2e91bb631a3fbbf2c92f7ca9545caa91036c1043 amd64:amd64/debian:stretch==sha256:16ee3e11da473f6565ef94a715f1a38b3079e0664913be78869c336a71cb6085 -amd64:debian:buster==sha256:9740683722a2a8aa497a5b23e4bc229fcf8b8991e26d3935540c7704ff24012e +amd64:debian:buster==sha256:2f35b84014a5389e2a940113c51586bc067a05040ba181dee92c5a9fa9b15dcb amd64:debian:stretch==sha256:c5c5200ff1e9c73ffbf188b4a67eb1c91531b644856b4aefe86a58d2f0cb05be -arm64:arm64v8/debian:buster==sha256:e774922f3043b6564c6719a7ec32f25d4b70304eff9dbd725161d4033cf38038 -arm64:debian:buster==sha256:9740683722a2a8aa497a5b23e4bc229fcf8b8991e26d3935540c7704ff24012e +arm64:arm64v8/debian:buster==sha256:cb4597c2e5b3f7d54be4927f4f27d8d84d7b1cd5ef6743d4ecd752727a7e0a07 +arm64:debian:buster==sha256:2f35b84014a5389e2a940113c51586bc067a05040ba181dee92c5a9fa9b15dcb arm64:debian:stretch==sha256:c5c5200ff1e9c73ffbf188b4a67eb1c91531b644856b4aefe86a58d2f0cb05be -armhf:arm32v7/debian:buster==sha256:27ab779c4d59ead815ff584f2e41b34a6b261db358b4cdfe664b8bfa1f494ae8 -armhf:debian:buster==sha256:9740683722a2a8aa497a5b23e4bc229fcf8b8991e26d3935540c7704ff24012e +armhf:arm32v7/debian:buster==sha256:94d59fccce5b8617ff43a12549c046133e0310497d742d3ad9add1755297ba69 +armhf:debian:buster==sha256:2f35b84014a5389e2a940113c51586bc067a05040ba181dee92c5a9fa9b15dcb armhf:debian:stretch==sha256:c5c5200ff1e9c73ffbf188b4a67eb1c91531b644856b4aefe86a58d2f0cb05be \ No newline at end of file diff --git a/files/build/versions/default/versions-git b/files/build/versions/default/versions-git index dfc065b4da52..b62554876c65 100644 --- a/files/build/versions/default/versions-git +++ b/files/build/versions/default/versions-git @@ -1,20 +1,20 @@ -https://chromium.googlesource.com/chromium/tools/depot_tools.git==d22bf607218d50bf20444b0610f62b265f829dbc +https://chromium.googlesource.com/chromium/tools/depot_tools.git==a724859f7a9b3531c0373d86886a42314e772532 https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f -https://github.com/CESNET/libyang.git==87375f15159545a87a1e0de200f5d9d67e9091d7 +https://github.com/CESNET/libyang.git==0c609c35080f523c9696db48976de8257d174102 https://github.com/daveolson53/libnss-tacplus.git==19008ab68d9d504aa58eb34d5f564755a1613b8b https://github.com/dyninc/OpenBFDD.git==e35f43ad8d2b3f084e96a84c392528a90d05a287 https://github.com/jeroennijhof/pam_tacplus.git==453c7b6fc78eceeaaf39a59b6b87c124628f2fe8 -https://github.com/jpirko/libteam.git==69a7494bb77dc10bb27076add07b380dbd778592 -https://github.com/lguohan/gnxi.git==53901aba9ead82be21f1408a601b6266dcf1e3e4 +https://github.com/jpirko/libteam.git==c32369829b2b1881e25fab85d74aa0b3ad017dcb +https://github.com/lguohan/gnxi.git==f2b11e45b16ab13485ae14933f30c18ee6336499 https://github.com/Marvell-switching/mrvl-prestera.git==21a100e01b2ab00229da35dd178d9b294c66303f https://github.com/Mellanox/libpsample.git==62bb27d9a49424e45191eee81df7ce0d8c74e774 https://github.com/p4lang/scapy-vxlan.git==85ffe83da156568ee47a0750f638227e6e1d7479 -https://github.com/sflow/host-sflow==4ff2a940848fa9244a289f9c96fd9681d31a0264 +https://github.com/sflow/host-sflow==f1ddde6580ae049e53cb9e25822d4c7d98a672cf https://github.com/sflow/sflowtool==5307b19399ffb0a1a873c9d09e78cb5011deaf6f -https://github.com/thom311/libnl==3399f520bae2231c5b6a6c2adce52b383292c520 +https://github.com/thom311/libnl==cbafad9ddf24caef5230fef715d34f0539603be0 https://salsa.debian.org/debian/libteam.git==f8808df228b00873926b5e7b998ad8b61368d4c5 https://salsa.debian.org/dhcp-team/isc-dhcp.git==18ecb042065e51e088b7470566526cd00e297c14 -https://salsa.debian.org/kernel-team/ethtool/==5ead2b58847600ea0ccd0aa76b5bedce678f17ee +https://salsa.debian.org/kernel-team/ethtool/==fb77fb17864600d7deb46729c28c677c7da367d5 https://salsa.debian.org/kernel-team/initramfs-tools.git==40e544e13611c1b2690eb99a8096fc16c1b9c74e https://salsa.debian.org/sk-guest/monit.git==c9da7ebb1f35dfba17b50b5969a6e75e29cbec0d -https://salsa.debian.org/ssh-team/openssh.git==de790f931452a2dcb4490d074d5a16ab8456a523 \ No newline at end of file +https://salsa.debian.org/ssh-team/openssh.git==cac473afc339d472f01bd50674ddcf3adb5fc82e \ No newline at end of file diff --git a/files/build/versions/default/versions-web b/files/build/versions/default/versions-web index 6adf222a46ae..f424130a0d09 100644 --- a/files/build/versions/default/versions-web +++ b/files/build/versions/default/versions-web @@ -16,21 +16,20 @@ http://http.debian.net/debian/pool/main/h/hiredis/hiredis_0.14.0-3~bpo9+1.dsc==b http://http.debian.net/debian/pool/main/h/hiredis/hiredis_0.14.0.orig.tar.gz==6d565680a4af0d2e261abbc3e3431b2b http://www.mellanox.com/downloads/MFT/mft-4.18.0-106-x86_64-deb.tgz==83d169e43bc9fea43fa0d69a4f8c1398 https://bootstrap.pypa.io/pip/2.7/get-pip.py==60e8267eb1b7bc71dc4843eb7bd294d3 -https://chrome-infra-packages.appspot.com/client?platform=linux-amd64&version=git_revision:2fe24264d5b4585ecd16ba8e9bb582d8f4b20875==e1557fb4a093dec95a2251d01f0d4cd3 https://deb.nodesource.com/gpgkey/nodesource.gpg.key==003b51a89a133b5db4cca98b2dea3117 https://deb.nodesource.com/node_10.x/dists/stretch/Release==22738118af583db3bfad39d6fcb4fa5a -https://deb.nodesource.com/node_14.x/dists/buster/Release==2c6b9d29a3e20816e0ed35475d52e0d3 +https://deb.nodesource.com/node_14.x/dists/buster/Release==f603a03a9c19dfcff06549da4d65e6ea https://deb.nodesource.com/setup_10.x==6742c0148159980e8f6e886df1f8bbe1 -https://deb.nodesource.com/setup_14.x==badb28cf0604d9ff24c5fc3396b594d4 +https://deb.nodesource.com/setup_14.x==02e66fef39d18cc683f760a67ccd5d68 https://download.docker.com/linux/debian/gpg==1afae06b34a13c1b3d9cb61a26285a15 https://github.com/barefootnetworks/sonic-release-pkgs/raw/dev/bfnplatform_20220221_sai.1.7.1_deb10.deb==65de37f7834823ba69ab5e55acc5c5f4 https://github.com/barefootnetworks/sonic-release-pkgs/raw/dev/bfnsdk_20220221_sai.1.7.1_deb10.deb==75df8156b85467b501dc67f1914d6ed7 https://github.com/CentecNetworks/sonic-binaries/raw/master/amd64/libsai_1.6.3-1_amd64.deb==e7a41e5cf06b44ae3ed615d553de40d3 https://github.com/CentecNetworks/sonic-binaries/raw/master/arm64/sai/libsai_1.6.3-1_arm64.deb==4121f09fbc5319cd488b832d72287f93 https://github.com/CumulusNetworks/ifupdown2/archive/1.2.8-1.tar.gz==12f45e90d23178e96cf70f68dc9455e6 -https://github.com/Innovium/SONiC/raw/master/debian/202012/ipd.deb==f8030a384c95a1eea95d314a7fbc4ec9 -https://github.com/Innovium/SONiC/raw/master/debian/202012/isai.deb==397eea9f6fdcbefcc902943c41fc1d45 -https://github.com/Innovium/SONiC/raw/master/debian/202012/saihdr.deb==694484b69aa8ba2f1497f82b4316f23e +https://github.com/Innovium/SONiC/raw/master/debian/202012/ipd.deb==00af177c2eb6384accac0608a6a6cb4f +https://github.com/Innovium/SONiC/raw/master/debian/202012/isai.deb==fa95a0d1ca74688da7db2527516a3e30 +https://github.com/Innovium/SONiC/raw/master/debian/202012/saihdr.deb==f23bb3119dd6d319e72446bf203eaddc https://github.com/Marvell-switching/sonic-marvell-binaries/raw/master/armhf/sai-plugin/mrvllibsai_1.7.1-9_armhf.deb==b21b91609632e813443ccb00bf2d7c61 https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz==6f56ef28c93cee644e8c4aaaef7cfb55 https://github.com/NephosInc/SONiC/raw/master/sai/libsainps-dev_3.0.0_sai_1.5.0_06a67d_amd64.deb==64931041f82533e2a05e003ed9d878c8 diff --git a/files/build/versions/dockers/docker-base-buster/versions-deb-buster b/files/build/versions/dockers/docker-base-buster/versions-deb-buster index 933f061ad6cf..5de2692548cb 100644 --- a/files/build/versions/dockers/docker-base-buster/versions-deb-buster +++ b/files/build/versions/dockers/docker-base-buster/versions-deb-buster @@ -1,24 +1,24 @@ ca-certificates==20200601~deb10u2 -curl==7.64.0-4+deb10u2 +curl==7.64.0-4+deb10u3 jq==1.5+dfsg-2+b1 less==487-0.1+b1 libatomic1==8.3.0-6 -libcurl4==7.64.0-4+deb10u2 +libcurl4==7.64.0-4+deb10u3 libdaemon0==0.14-7 libdbus-1-3==1.12.20-0+deb10u1 libestr0==0.1.10-2.1 -libexpat1==2.2.6-2+deb10u4 +libexpat1==2.2.6-2+deb10u5 libfastjson4==0.99.8-2 libgdbm-compat4==1.18.1-4 libgdbm6==1.18.1-4 -libgssapi-krb5-2==1.17-3+deb10u3 +libgssapi-krb5-2==1.17-3+deb10u4 libjansson4==2.12-1 libjemalloc2==5.1.0-3 libjq1==1.5+dfsg-2+b1 -libk5crypto3==1.17-3+deb10u3 +libk5crypto3==1.17-3+deb10u4 libkeyutils1==1.6-6 -libkrb5-3==1.17-3+deb10u3 -libkrb5support0==1.17-3+deb10u3 +libkrb5-3==1.17-3+deb10u4 +libkrb5support0==1.17-3+deb10u4 libldap-2.4-2==2.4.47+dfsg-3+deb10u7 libldap-common==2.4.47+dfsg-3+deb10u7 liblognorm5==2.0.5-1 @@ -40,7 +40,7 @@ librtmp1==2.4+20151223.gitfa8646d.1-2 libsasl2-2==2.1.27+dfsg-1+deb10u2 libsasl2-modules-db==2.1.27+dfsg-1+deb10u2 libsodium23==1.0.17-1 -libsqlite3-0==3.27.2-3+deb10u1 +libsqlite3-0==3.27.2-3+deb10u2 libssh2-1==1.8.0-2.1 libssl1.1==1.1.1n-0+deb10u3 libwrap0==7.6.q-28 diff --git a/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster b/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster index bc85330e0243..0520eec0c0a7 100644 --- a/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster +++ b/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster @@ -3,7 +3,7 @@ binutils==2.31.1-16 binutils-common==2.31.1-16 binutils-x86-64-linux-gnu==2.31.1-16 build-essential==12.6 -bzip2==1.0.6-9.2~deb10u1 +bzip2==1.0.6-9.2~deb10u2 cpp==4:8.3.0-1 cpp-8==8.3.0-6 dh-python==3.20190308 @@ -15,11 +15,12 @@ gcc-8==8.3.0-6 libapt-inst2.0==1.8.2.3 libasan5==8.3.0-6 libbinutils==2.31.1-16 +libbz2-1.0==1.0.6-9.2~deb10u2 libc-dev-bin==2.28-10+deb10u1 libc6-dev==2.28-10+deb10u1 libcc1-0==8.3.0-6 libdpkg-perl==1.19.8 -libexpat1-dev==2.2.6-2+deb10u4 +libexpat1-dev==2.2.6-2+deb10u5 libgcc-8-dev==8.3.0-6 libgomp1==8.3.0-6 libhiredis0.14==0.14.0-3~bpo9+1 @@ -42,7 +43,7 @@ libstdc++-8-dev==8.3.0-6 libswsscommon==1.0.0 libtsan0==8.3.0-6 libubsan1==8.3.0-6 -linux-libc-dev==4.19.249-2 +linux-libc-dev==4.19.260-1 make==4.2.1-1.2 patch==2.7.6-3+deb10u1 python3-dev==3.7.3-1 diff --git a/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster-arm64 b/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster-arm64 index 1f699501031d..832fd7a2e36d 100644 --- a/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster-arm64 +++ b/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster-arm64 @@ -1,11 +1,12 @@ binutils-aarch64-linux-gnu==2.31.1-16 icu-devtools==63.1-6+deb10u3 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libicu-dev==63.1-6+deb10u3 libicu63==63.1-6+deb10u3 libxml2==2.9.4+dfsg1-7+deb10u4 libxml2-dev==2.9.4+dfsg1-7+deb10u4 -libxslt1-dev==1.1.32-2.2~deb10u1 -libxslt1.1==1.1.32-2.2~deb10u1 +libxslt1-dev==1.1.32-2.2~deb10u2 +libxslt1.1==1.1.32-2.2~deb10u2 pkg-config==0.29-6 -zlib1g-dev==1:1.2.11.dfsg-1+deb10u1 \ No newline at end of file +zlib1g==1:1.2.11.dfsg-1+deb10u2 +zlib1g-dev==1:1.2.11.dfsg-1+deb10u2 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster-armhf b/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster-armhf index 967b10df80c8..869dd6106476 100644 --- a/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster-armhf +++ b/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster-armhf @@ -1,11 +1,12 @@ binutils-arm-linux-gnueabihf==2.31.1-16 icu-devtools==63.1-6+deb10u3 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libicu-dev==63.1-6+deb10u3 libicu63==63.1-6+deb10u3 libxml2==2.9.4+dfsg1-7+deb10u4 libxml2-dev==2.9.4+dfsg1-7+deb10u4 -libxslt1-dev==1.1.32-2.2~deb10u1 -libxslt1.1==1.1.32-2.2~deb10u1 +libxslt1-dev==1.1.32-2.2~deb10u2 +libxslt1.1==1.1.32-2.2~deb10u2 pkg-config==0.29-6 -zlib1g-dev==1:1.2.11.dfsg-1+deb10u1 \ No newline at end of file +zlib1g==1:1.2.11.dfsg-1+deb10u2 +zlib1g-dev==1:1.2.11.dfsg-1+deb10u2 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-config-engine-buster/versions-py3 b/files/build/versions/dockers/docker-config-engine-buster/versions-py3 index 765d73fa6aaf..bf7c5b08e1e0 100644 --- a/files/build/versions/dockers/docker-config-engine-buster/versions-py3 +++ b/files/build/versions/dockers/docker-config-engine-buster/versions-py3 @@ -8,5 +8,5 @@ pyangbind==0.8.1 pyyaml==5.4.1 redis==3.5.3 redis-dump-load==1.1 -regex==2022.7.9 +regex==2022.9.13 six==1.16.0 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-database/versions-deb-buster b/files/build/versions/dockers/docker-database/versions-deb-buster index 1979ecc0b69f..3a15169bef7c 100644 --- a/files/build/versions/dockers/docker-database/versions-deb-buster +++ b/files/build/versions/dockers/docker-database/versions-deb-buster @@ -4,7 +4,7 @@ libbabeltrace1==1.5.6-2+deb10u1 libbsd0==0.9.1-2+deb10u1 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libipt2==2.0-2 libpopt0==1.16-12 diff --git a/files/build/versions/dockers/docker-dhcp-relay/versions-deb-buster b/files/build/versions/dockers/docker-dhcp-relay/versions-deb-buster index ae6ede20c056..bf6b5c979c2a 100644 --- a/files/build/versions/dockers/docker-dhcp-relay/versions-deb-buster +++ b/files/build/versions/dockers/docker-dhcp-relay/versions-deb-buster @@ -12,7 +12,7 @@ libdw1==0.176-1.1 libedit2==3.1-20181209-1 libevent-2.1-6==2.1.8-stable-4 libexplain51==1.4.D001-8 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libipt2==2.0-2 libirs-export161==1:9.11.5.P4+dfsg-5.1+deb10u7 diff --git a/files/build/versions/dockers/docker-fpm-frr/versions-deb-buster b/files/build/versions/dockers/docker-fpm-frr/versions-deb-buster index 25282ee1643b..c52cfd242a2f 100644 --- a/files/build/versions/dockers/docker-fpm-frr/versions-deb-buster +++ b/files/build/versions/dockers/docker-fpm-frr/versions-deb-buster @@ -10,23 +10,23 @@ libbsd0==0.9.1-2+deb10u1 libc-ares2==1.14.0-1+deb10u1 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libipt2==2.0-2 libjson-c3==0.12.1+ds-2+deb10u1 -libmariadb3==1:10.3.34-0+deb10u1 +libmariadb3==1:10.3.36-0+deb10u2 libpci3==1:3.5.2-1 libpopt0==1.16-12 libsensors-config==1:3.5.0-3 libsensors5==1:3.5.0-3 -libsnmp-base==5.7.3+dfsg-5+deb10u2 -libsnmp30==5.7.3+dfsg-5+deb10u2 +libsnmp-base==5.7.3+dfsg-5+deb10u3 +libsnmp30==5.7.3+dfsg-5+deb10u3 libswsscommon-dbg==1.0.0 libunwind8==1.2.1-10~deb10u1 libyang1==1.0.184-2 libyang1-dbgsym==1.0.184-2 logrotate==3.14.0-4 -mariadb-common==1:10.3.34-0+deb10u1 +mariadb-common==1:10.3.36-0+deb10u2 mysql-common==5.8+1.0.5 openssh-client==1:7.9p1-10+deb10u2 sensible-utils==0.0.12 diff --git a/files/build/versions/dockers/docker-gbsyncd-vs/versions-deb-buster b/files/build/versions/dockers/docker-gbsyncd-vs/versions-deb-buster index 9b8877c2e9c1..e194f52f4366 100644 --- a/files/build/versions/dockers/docker-gbsyncd-vs/versions-deb-buster +++ b/files/build/versions/dockers/docker-gbsyncd-vs/versions-deb-buster @@ -4,7 +4,7 @@ libbabeltrace1==1.5.6-2+deb10u1 libbsd0==0.9.1-2+deb10u1 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libipt2==2.0-2 libpopt0==1.16-12 diff --git a/files/build/versions/dockers/docker-lldp/versions-deb-buster b/files/build/versions/dockers/docker-lldp/versions-deb-buster index 00b50d4acadf..e3144dc4e7b0 100644 --- a/files/build/versions/dockers/docker-lldp/versions-deb-buster +++ b/files/build/versions/dockers/docker-lldp/versions-deb-buster @@ -5,11 +5,11 @@ libbsd0==0.9.1-2+deb10u1 libdw1==0.176-1.1 libedit2==3.1-20181209-1 libevent-2.1-6==2.1.8-stable-4 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libicu63==63.1-6+deb10u3 libipt2==2.0-2 -libmariadb3==1:10.3.34-0+deb10u1 +libmariadb3==1:10.3.36-0+deb10u2 libpci3==1:3.5.2-1 libpopt0==1.16-12 libsensors-config==1:3.5.0-3 @@ -21,7 +21,7 @@ libunwind8==1.2.1-10~deb10u1 libxml2==2.9.4+dfsg1-7+deb10u4 lldpd==1.0.4-1 lldpd-dbgsym==1.0.4-1 -mariadb-common==1:10.3.34-0+deb10u1 +mariadb-common==1:10.3.36-0+deb10u2 mysql-common==5.8+1.0.5 openssh-client==1:7.9p1-10+deb10u2 sshpass==1.06-1 diff --git a/files/build/versions/dockers/docker-mux/versions-deb-buster b/files/build/versions/dockers/docker-mux/versions-deb-buster index 1e89df10454d..d5d8b3763136 100644 --- a/files/build/versions/dockers/docker-mux/versions-deb-buster +++ b/files/build/versions/dockers/docker-mux/versions-deb-buster @@ -12,7 +12,7 @@ libboost-thread1.71.0==1.71.0-6~bpo10+1 libbsd0==0.9.1-2+deb10u1 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libhiredis0.14-dbgsym==0.14.0-3~bpo9+1 libicu63==63.1-6+deb10u3 diff --git a/files/build/versions/dockers/docker-nat/versions-deb-buster b/files/build/versions/dockers/docker-nat/versions-deb-buster index 9d09f1f1044d..995fea293abf 100644 --- a/files/build/versions/dockers/docker-nat/versions-deb-buster +++ b/files/build/versions/dockers/docker-nat/versions-deb-buster @@ -7,7 +7,7 @@ libbabeltrace1==1.5.6-2+deb10u1 libbsd0==0.9.1-2+deb10u1 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libip4tc0==1.8.2-4 libip6tc0==1.8.2-4 diff --git a/files/build/versions/dockers/docker-orchagent/versions-deb-buster b/files/build/versions/dockers/docker-orchagent/versions-deb-buster index 06926e89260f..6c65ba31fe0d 100644 --- a/files/build/versions/dockers/docker-orchagent/versions-deb-buster +++ b/files/build/versions/dockers/docker-orchagent/versions-deb-buster @@ -25,9 +25,9 @@ libcc1-0==8.3.0-6 libdpkg-perl==1.19.8 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libexpat1-dev==2.2.6-2+deb10u4 +libexpat1-dev==2.2.6-2+deb10u5 libgcc-8-dev==8.3.0-6 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgomp1==8.3.0-6 libgpm2==1.20.7-5 libipt2==2.0-2 @@ -51,7 +51,7 @@ libswsscommon-dbg==1.0.0 libtsan0==8.3.0-6 libubsan1==8.3.0-6 libunwind8==1.2.1-10~deb10u1 -linux-libc-dev==4.19.249-2 +linux-libc-dev==4.19.260-1 make==4.2.1-1.2 ndisc6==1.0.4-1 ndppd==0.2.5-4+deb10u1 diff --git a/files/build/versions/dockers/docker-platform-monitor/versions-deb-buster b/files/build/versions/dockers/docker-platform-monitor/versions-deb-buster index e57bb05b1c82..9484107a3412 100644 --- a/files/build/versions/dockers/docker-platform-monitor/versions-deb-buster +++ b/files/build/versions/dockers/docker-platform-monitor/versions-deb-buster @@ -1,5 +1,5 @@ -applibs==1.mlnx.4.5.2262 -applibs-dev==1.mlnx.4.5.2262 +applibs==1.mlnx.4.5.2320 +applibs-dev==1.mlnx.4.5.2320 binutils==2.31.1-16 binutils-common==2.31.1-16 binutils-x86-64-linux-gnu==2.31.1-16 @@ -35,13 +35,13 @@ libdbi1==0.9.0-5 libdpkg-perl==1.19.8 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libexpat1-dev==2.2.6-2+deb10u4 +libexpat1-dev==2.2.6-2+deb10u5 libfontconfig1==2.13.1-2 libfreeipmi17==1.6.3-1.1 -libfreetype6==2.9.1-3+deb10u2 -libfribidi0==1.0.5-3.1+deb10u1 +libfreetype6==2.9.1-3+deb10u3 +libfribidi0==1.0.5-3.1+deb10u2 libgcc-8-dev==8.3.0-6 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgomp1==8.3.0-6 libgpm2==1.20.7-5 libgraphite2-3==1.3.13-7 @@ -96,7 +96,7 @@ libxdmcp6==1:1.1.2-3 libxext6==2:1.3.3-1+b2 libxml2==2.9.4+dfsg1-7+deb10u4 libxrender1==1:0.9.10-1 -linux-libc-dev==4.19.249-2 +linux-libc-dev==4.19.260-1 lm-sensors==1:3.5.0-3 lm-sensors-dbgsym==1:3.5.0-3 make==4.2.1-1.2 @@ -108,7 +108,7 @@ python-dev==2.7.16-1 python-minimal==2.7.16-1 python-pip==18.1-5 python-pip-whl==18.1-5 -python-sdk-api==1.mlnx.4.5.2262 +python-sdk-api==1.mlnx.4.5.2320 python-smbus==4.1-1 python-swsscommon==1.0.0 python2==2.7.16-1 @@ -129,12 +129,12 @@ sensord-dbgsym==1:3.5.0-3 smartmontools==6.6-1 sshpass==1.06-1 strace==4.26-0.2 -sx-complib==1.mlnx.4.5.2262 -sx-complib-dev==1.mlnx.4.5.2262 -sx-gen-utils==1.mlnx.4.5.2262 -sx-gen-utils-dev==1.mlnx.4.5.2262 -sxd-libs==1.mlnx.4.5.2262 -sxd-libs-dev==1.mlnx.4.5.2262 +sx-complib==1.mlnx.4.5.2320 +sx-complib-dev==1.mlnx.4.5.2320 +sx-gen-utils==1.mlnx.4.5.2320 +sx-gen-utils-dev==1.mlnx.4.5.2320 +sxd-libs==1.mlnx.4.5.2320 +sxd-libs-dev==1.mlnx.4.5.2320 ucf==3.0038+nmu1 udev==241-7~deb10u8 vim==2:8.1.0875-5+deb10u2 diff --git a/files/build/versions/dockers/docker-platform-monitor/versions-py2 b/files/build/versions/dockers/docker-platform-monitor/versions-py2 index 01753180c581..ef1c55ef6e56 100644 --- a/files/build/versions/dockers/docker-platform-monitor/versions-py2 +++ b/files/build/versions/dockers/docker-platform-monitor/versions-py2 @@ -14,7 +14,7 @@ netaddr==0.8.0 pathlib2==2.3.7.post1 pyang==2.5.3 pyangbind==0.6.0 -python-sdk-api==4.5.2262 +python-sdk-api==4.5.2320 pyyaml==5.4.1 redis==3.5.3 redis-dump-load==1.1 diff --git a/files/build/versions/dockers/docker-platform-monitor/versions-py3 b/files/build/versions/dockers/docker-platform-monitor/versions-py3 index 1dae9b3c4445..3b41ecca6169 100644 --- a/files/build/versions/dockers/docker-platform-monitor/versions-py3 +++ b/files/build/versions/dockers/docker-platform-monitor/versions-py3 @@ -1,3 +1,3 @@ jsonschema==2.6.0 -python_sdk_api==4.5.2262 +python_sdk_api==4.5.2320 thrift==0.13.0 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-ptf/versions-py2 b/files/build/versions/dockers/docker-ptf/versions-py2 index 454a54602a78..c44749bd76b1 100644 --- a/files/build/versions/dockers/docker-ptf/versions-py2 +++ b/files/build/versions/dockers/docker-ptf/versions-py2 @@ -6,7 +6,7 @@ click==7.1.2 contextlib2==0.6.0.post1 cryptography==3.3.2 decorator==4.4.2 -dpkt==1.9.7.2 +dpkt==1.9.8 enum34==1.1.6 exabgp==3.4.17 flask==1.0 @@ -36,7 +36,7 @@ protobuf==3.6.1 ptf==0.9.1 ptyprocess==0.7.0 pyaml==21.10.1 -pybrctl==0.1.3 +pybrctl==0.1.4 pycparser==2.21 pygments==2.5.2 pylibpcap==0.6.4 diff --git a/files/build/versions/dockers/docker-router-advertiser/versions-deb-buster b/files/build/versions/dockers/docker-router-advertiser/versions-deb-buster index 919f91188e80..10f1ebf4bb91 100644 --- a/files/build/versions/dockers/docker-router-advertiser/versions-deb-buster +++ b/files/build/versions/dockers/docker-router-advertiser/versions-deb-buster @@ -4,7 +4,7 @@ libbabeltrace1==1.5.6-2+deb10u1 libbsd0==0.9.1-2+deb10u1 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libipt2==2.0-2 libpopt0==1.16-12 diff --git a/files/build/versions/dockers/docker-sflow/versions-deb-buster b/files/build/versions/dockers/docker-sflow/versions-deb-buster index c1675ee9e1a0..b484eb828ba2 100644 --- a/files/build/versions/dockers/docker-sflow/versions-deb-buster +++ b/files/build/versions/dockers/docker-sflow/versions-deb-buster @@ -6,7 +6,7 @@ libbabeltrace1==1.5.6-2+deb10u1 libbsd0==0.9.1-2+deb10u1 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libipt2==2.0-2 libpopt0==1.16-12 diff --git a/files/build/versions/dockers/docker-snmp/versions-deb-buster b/files/build/versions/dockers/docker-snmp/versions-deb-buster index cd8222097c2b..98c08afb5d8e 100644 --- a/files/build/versions/dockers/docker-snmp/versions-deb-buster +++ b/files/build/versions/dockers/docker-snmp/versions-deb-buster @@ -20,17 +20,17 @@ libc6-dev==2.28-10+deb10u1 libcc1-0==8.3.0-6 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libexpat1-dev==2.2.6-2+deb10u4 +libexpat1-dev==2.2.6-2+deb10u5 libfreeipmi17==1.6.3-1.1 libgcc-8-dev==8.3.0-6 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgomp1==8.3.0-6 libgpm2==1.20.7-5 libipt2==2.0-2 libisl19==0.20-2 libitm1==8.3.0-6 liblsan0==8.3.0-6 -libmariadb3==1:10.3.34-0+deb10u1 +libmariadb3==1:10.3.36-0+deb10u2 libmpc3==1.1.0-1 libmpfr6==4.0.2-1 libmpx2==8.3.0-6 @@ -47,10 +47,10 @@ libsnmp30-dbg==5.7.3+dfsg-5 libtsan0==8.3.0-6 libubsan1==8.3.0-6 libunwind8==1.2.1-10~deb10u1 -linux-libc-dev==4.19.249-2 +linux-libc-dev==4.19.260-1 locales==2.28-10+deb10u1 make==4.2.1-1.2 -mariadb-common==1:10.3.34-0+deb10u1 +mariadb-common==1:10.3.36-0+deb10u2 mysql-common==5.8+1.0.5 openssh-client==1:7.9p1-10+deb10u2 python3-dev==3.7.3-1 diff --git a/files/build/versions/dockers/docker-snmp/versions-py3 b/files/build/versions/dockers/docker-snmp/versions-py3 index ab2b43ab082f..d1092513c883 100644 --- a/files/build/versions/dockers/docker-snmp/versions-py3 +++ b/files/build/versions/dockers/docker-snmp/versions-py3 @@ -1,4 +1,4 @@ hiredis==2.0.0 -psutil==5.9.1 +psutil==5.9.2 python-arptable==0.0.2 smbus==1.1.post2 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-deb-buster b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-deb-buster index 037e43e3429f..9c994335f84e 100644 --- a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-deb-buster +++ b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-deb-buster @@ -19,9 +19,9 @@ libc6-dev==2.28-10+deb10u1 libcc1-0==8.3.0-6 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libexpat1-dev==2.2.6-2+deb10u4 +libexpat1-dev==2.2.6-2+deb10u5 libgcc-8-dev==8.3.0-6 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgomp1==8.3.0-6 libgpm2==1.20.7-5 libicu63==63.1-6+deb10u3 @@ -50,7 +50,7 @@ libubsan1==8.3.0-6 libunwind8==1.2.1-10~deb10u1 libxml2==2.9.4+dfsg1-7+deb10u4 libyang==1.0.73 -linux-libc-dev==4.19.249-2 +linux-libc-dev==4.19.260-1 openssh-client==1:7.9p1-10+deb10u2 python==2.7.16-1 python-dev==2.7.16-1 diff --git a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 index 8fe65d491263..9e8bf17299ea 100644 --- a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 +++ b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 @@ -1,26 +1,30 @@ -attrs==21.4.0 +attrs==22.1.0 certifi==2017.4.17 -charset-normalizer==2.1.0 +charset-normalizer==2.1.1 click==8.1.3 clickclick==20.10.2 connexion==2.7.0 -flask==2.1.2 -grpcio==1.47.0 +flask==2.2.2 +grpcio==1.49.1 grpcio-tools==1.20.0 -idna==3.3 -importlib-metadata==4.12.0 -importlib-resources==5.8.0 +idna==3.4 +importlib-metadata==5.0.0 +importlib-resources==5.9.0 inflection==0.5.1 itsdangerous==2.1.2 -jsonschema==4.7.2 -openapi-schema-validator==0.2.3 -openapi-spec-validator==0.4.0 -protobuf==4.21.2 +jsonschema==4.16.0 +jsonschema-spec==0.1.2 +lazy-object-proxy==1.7.1 +openapi-schema-validator==0.3.4 +openapi-spec-validator==0.5.1 +pathable==0.4.3 +pkgutil_resolve_name==1.3.10 +protobuf==4.21.7 pyrsistent==0.18.1 python-dateutil==2.6.0 requests==2.28.1 six==1.11.0 typing_extensions==4.3.0 urllib3==1.26.5 -werkzeug==2.1.2 -zipp==3.8.0 \ No newline at end of file +werkzeug==2.2.2 +zipp==3.8.1 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3-all-arm64 b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3-all-arm64 deleted file mode 100644 index b14bd866f5b8..000000000000 --- a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3-all-arm64 +++ /dev/null @@ -1 +0,0 @@ -jsonschema==4.7.1 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3-all-armhf b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3-all-armhf deleted file mode 100644 index b14bd866f5b8..000000000000 --- a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3-all-armhf +++ /dev/null @@ -1 +0,0 @@ -jsonschema==4.7.1 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-sonic-telemetry/versions-deb-buster b/files/build/versions/dockers/docker-sonic-telemetry/versions-deb-buster index 6fe8ddb0de94..db799f904509 100644 --- a/files/build/versions/dockers/docker-sonic-telemetry/versions-deb-buster +++ b/files/build/versions/dockers/docker-sonic-telemetry/versions-deb-buster @@ -4,7 +4,7 @@ libbabeltrace1==1.5.6-2+deb10u1 libbsd0==0.9.1-2+deb10u1 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libipt2==2.0-2 libpopt0==1.16-12 diff --git a/files/build/versions/dockers/docker-sonic-vs/versions-deb-buster b/files/build/versions/dockers/docker-sonic-vs/versions-deb-buster index 32ff5d4b0134..cacf7d27d4a2 100644 --- a/files/build/versions/dockers/docker-sonic-vs/versions-deb-buster +++ b/files/build/versions/dockers/docker-sonic-vs/versions-deb-buster @@ -28,9 +28,8 @@ gpg-wks-client==2.2.12-1+deb10u2 gpg-wks-server==2.2.12-1+deb10u2 gpgconf==2.2.12-1+deb10u2 gpgsm==2.2.12-1+deb10u2 -gpgv==2.2.12-1+deb10u2 -grub-common==2.02+dfsg1-20+deb10u4 -grub2-common==2.02+dfsg1-20+deb10u4 +grub-common==2.06-3~deb10u1 +grub2-common==2.06-3~deb10u1 ifupdown==0.8.35 iptables==1.8.2-4 libasan5==8.3.0-6 @@ -51,11 +50,11 @@ libdpkg-perl==1.19.8 libedit2==3.1-20181209-1 libefiboot1==37-2+deb10u1 libefivar1==37-2+deb10u1 -libexpat1-dev==2.2.6-2+deb10u4 -libfreetype6==2.9.1-3+deb10u2 +libexpat1-dev==2.2.6-2+deb10u5 +libfreetype6==2.9.1-3+deb10u3 libfuse2==2.9.9-1+deb10u1 libgcc-8-dev==8.3.0-6 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgomp1==8.3.0-6 libicu63==63.1-6+deb10u3 libip4tc0==1.8.2-4 @@ -89,9 +88,9 @@ libpython2.7-minimal==2.7.16-2+deb10u1 libpython2.7-stdlib==2.7.16-2+deb10u1 libpython3-dev==3.7.3-1 libpython3.7-dev==3.7.3-2+deb10u3 -libqt5core5a==5.11.3+dfsg1-1+deb10u4 -libqt5dbus5==5.11.3+dfsg1-1+deb10u4 -libqt5network5==5.11.3+dfsg1-1+deb10u4 +libqt5core5a==5.11.3+dfsg1-1+deb10u5 +libqt5dbus5==5.11.3+dfsg1-1+deb10u5 +libqt5network5==5.11.3+dfsg1-1+deb10u5 libquadmath0==8.3.0-6 libsaimetadata==1.0.0 libsairedis==1.0.0 @@ -107,7 +106,7 @@ libunwind8==1.2.1-10~deb10u1 libyang==1.0.73 libyang-cpp==1.0.73 libyang1==1.0.184-2 -linux-libc-dev==4.19.249-2 +linux-libc-dev==4.19.260-1 logrotate==3.14.0-4 make==4.2.1-1.2 ndisc6==1.0.4-1 diff --git a/files/build/versions/dockers/docker-sonic-vs/versions-py2 b/files/build/versions/dockers/docker-sonic-vs/versions-py2 index 1db34fe35214..86bba8faec64 100644 --- a/files/build/versions/dockers/docker-sonic-vs/versions-py2 +++ b/files/build/versions/dockers/docker-sonic-vs/versions-py2 @@ -10,4 +10,4 @@ pyroute2==0.5.3 requests==2.27.1 scapy==2.4.0 six==1.16.0 -urllib3==1.26.10 \ No newline at end of file +urllib3==1.26.12 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-sonic-vs/versions-py3 b/files/build/versions/dockers/docker-sonic-vs/versions-py3 index 1519f87a3801..4cbe3268a0ec 100644 --- a/files/build/versions/dockers/docker-sonic-vs/versions-py3 +++ b/files/build/versions/dockers/docker-sonic-vs/versions-py3 @@ -1,7 +1,7 @@ -certifi==2022.6.15 -charset-normalizer==2.1.0 +certifi==2022.9.24 +charset-normalizer==2.1.1 click==7.0 -idna==3.3 +idna==3.4 ijson==2.6.1 jsondiff==2.0.0 m2crypto==0.38.0 @@ -12,5 +12,5 @@ pyroute2==0.5.14 requests==2.28.1 scapy==2.4.4 tabulate==0.8.10 -urllib3==1.26.10 +urllib3==1.26.12 xmltodict==0.12.0 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-syncd-bfn-rpc/versions-deb-buster b/files/build/versions/dockers/docker-syncd-bfn-rpc/versions-deb-buster index f9af0d7d4e73..c0efeea00e29 100644 --- a/files/build/versions/dockers/docker-syncd-bfn-rpc/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-bfn-rpc/versions-deb-buster @@ -17,10 +17,10 @@ libboost-atomic1.71.0==1.71.0-6~bpo10+1 libcc1-0==8.3.0-6 libdouble-conversion1==3.1.0-3 libdpkg-perl==1.19.8 -libexpat1-dev==2.2.6-2+deb10u4 +libexpat1-dev==2.2.6-2+deb10u5 libffi-dev==3.2.1-9 libgcc-8-dev==8.3.0-6 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgomp1==8.3.0-6 libisl19==0.20-2 libitm1==8.3.0-6 @@ -39,9 +39,9 @@ libpython2.7==2.7.16-2+deb10u1 libpython2.7-dev==2.7.16-2+deb10u1 libpython2.7-minimal==2.7.16-2+deb10u1 libpython2.7-stdlib==2.7.16-2+deb10u1 -libqt5core5a==5.11.3+dfsg1-1+deb10u4 -libqt5dbus5==5.11.3+dfsg1-1+deb10u4 -libqt5network5==5.11.3+dfsg1-1+deb10u4 +libqt5core5a==5.11.3+dfsg1-1+deb10u5 +libqt5dbus5==5.11.3+dfsg1-1+deb10u5 +libqt5network5==5.11.3+dfsg1-1+deb10u5 libquadmath0==8.3.0-6 librhash0==1.3.8-1 libssl-dev==1.1.1n-0+deb10u3 diff --git a/files/build/versions/dockers/docker-syncd-bfn/versions-deb-buster b/files/build/versions/dockers/docker-syncd-bfn/versions-deb-buster index 714e0de0a715..dd6d71a0dca0 100644 --- a/files/build/versions/dockers/docker-syncd-bfn/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-bfn/versions-deb-buster @@ -3,8 +3,8 @@ bfnsdk==1.0.0 libc-ares2==1.14.0-1+deb10u1 libc-dev-bin==2.28-10+deb10u1 libc6-dev==2.28-10+deb10u1 -libcurl3-gnutls==7.64.0-4+deb10u2 -libcurl4-gnutls-dev==7.64.0-4+deb10u2 +libcurl3-gnutls==7.64.0-4+deb10u3 +libcurl4-gnutls-dev==7.64.0-4+deb10u3 libgoogle-perftools4==2.7-1 libicu63==63.1-6+deb10u3 liblzma-dev==5.2.4-1+deb10u1 @@ -19,5 +19,5 @@ libunwind8==1.2.1-10~deb10u1 libusb-1.0-0==2:1.0.22-2 libusb-1.0-0-dev==2:1.0.22-2 libxml2==2.9.4+dfsg1-7+deb10u4 -linux-libc-dev==4.19.249-2 +linux-libc-dev==4.19.260-1 syncd==1.0.0 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-syncd-brcm-rpc/versions-deb-buster b/files/build/versions/dockers/docker-syncd-brcm-rpc/versions-deb-buster index ada44fa26eb0..39690e90598b 100644 --- a/files/build/versions/dockers/docker-syncd-brcm-rpc/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-brcm-rpc/versions-deb-buster @@ -17,10 +17,10 @@ libboost-atomic1.71.0==1.71.0-6~bpo10+1 libcc1-0==8.3.0-6 libdouble-conversion1==3.1.0-3 libdpkg-perl==1.19.8 -libexpat1-dev==2.2.6-2+deb10u4 +libexpat1-dev==2.2.6-2+deb10u5 libffi-dev==3.2.1-9 libgcc-8-dev==8.3.0-6 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgomp1==8.3.0-6 libicu63==63.1-6+deb10u3 libisl19==0.20-2 @@ -40,9 +40,9 @@ libpython2.7==2.7.16-2+deb10u1 libpython2.7-dev==2.7.16-2+deb10u1 libpython2.7-minimal==2.7.16-2+deb10u1 libpython2.7-stdlib==2.7.16-2+deb10u1 -libqt5core5a==5.11.3+dfsg1-1+deb10u4 -libqt5dbus5==5.11.3+dfsg1-1+deb10u4 -libqt5network5==5.11.3+dfsg1-1+deb10u4 +libqt5core5a==5.11.3+dfsg1-1+deb10u5 +libqt5dbus5==5.11.3+dfsg1-1+deb10u5 +libqt5network5==5.11.3+dfsg1-1+deb10u5 libquadmath0==8.3.0-6 librhash0==1.3.8-1 libssl-dev==1.1.1n-0+deb10u3 diff --git a/files/build/versions/dockers/docker-syncd-brcm/versions-deb-buster b/files/build/versions/dockers/docker-syncd-brcm/versions-deb-buster index ced876e18827..514672d16566 100644 --- a/files/build/versions/dockers/docker-syncd-brcm/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-brcm/versions-deb-buster @@ -8,7 +8,7 @@ libc-dev-bin==2.28-10+deb10u1 libc6-dev==2.28-10+deb10u1 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libipt2==2.0-2 libkmod2==26-1 @@ -16,7 +16,7 @@ libpopt0==1.16-12 libprotobuf-dev==3.6.1.3-2 libprotobuf-lite17==3.6.1.3-2 libprotobuf17==3.6.1.3-2 -libsaibcm==4.3.5.3-5 +libsaibcm==4.3.7.1 libsaimetadata==1.0.0 libsaimetadata-dbg==1.0.0 libsairedis==1.0.0 @@ -25,7 +25,7 @@ libswsscommon-dbg==1.0.0 libunwind8==1.2.1-10~deb10u1 libyaml-0-2==0.2.1-1 libyaml-dev==0.2.1-1 -linux-libc-dev==4.19.249-2 +linux-libc-dev==4.19.260-1 openssh-client==1:7.9p1-10+deb10u2 sshpass==1.06-1 strace==4.26-0.2 @@ -33,4 +33,5 @@ syncd==1.0.0 syncd-dbg==1.0.0 vim==2:8.1.0875-5+deb10u2 vim-runtime==2:8.1.0875-5+deb10u2 -zlib1g-dev==1:1.2.11.dfsg-1+deb10u1 \ No newline at end of file +zlib1g==1:1.2.11.dfsg-1+deb10u2 +zlib1g-dev==1:1.2.11.dfsg-1+deb10u2 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-syncd-centec-rpc/versions-deb-buster b/files/build/versions/dockers/docker-syncd-centec-rpc/versions-deb-buster index 099d8c888783..b7b067a23dbf 100644 --- a/files/build/versions/dockers/docker-syncd-centec-rpc/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-centec-rpc/versions-deb-buster @@ -19,10 +19,10 @@ libc6-dev==2.28-10+deb10u1 libcc1-0==8.3.0-6 libdouble-conversion1==3.1.0-3 libdpkg-perl==1.19.8 -libexpat1-dev==2.2.6-2+deb10u4 +libexpat1-dev==2.2.6-2+deb10u5 libffi-dev==3.2.1-9 libgcc-8-dev==8.3.0-6 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgomp1==8.3.0-6 libicu63==63.1-6+deb10u3 libisl19==0.20-2 @@ -42,9 +42,9 @@ libpython2.7==2.7.16-2+deb10u1 libpython2.7-dev==2.7.16-2+deb10u1 libpython2.7-minimal==2.7.16-2+deb10u1 libpython2.7-stdlib==2.7.16-2+deb10u1 -libqt5core5a==5.11.3+dfsg1-1+deb10u4 -libqt5dbus5==5.11.3+dfsg1-1+deb10u4 -libqt5network5==5.11.3+dfsg1-1+deb10u4 +libqt5core5a==5.11.3+dfsg1-1+deb10u5 +libqt5dbus5==5.11.3+dfsg1-1+deb10u5 +libqt5network5==5.11.3+dfsg1-1+deb10u5 libquadmath0==8.3.0-6 librhash0==1.3.8-1 libssl-dev==1.1.1n-0+deb10u3 @@ -54,7 +54,7 @@ libtsan0==8.3.0-6 libubsan1==8.3.0-6 libuv1==1.24.1-1+deb10u1 libxml2==2.9.4+dfsg1-7+deb10u4 -linux-libc-dev==4.19.249-2 +linux-libc-dev==4.19.260-1 make==4.2.1-1.2 patch==2.7.6-3+deb10u1 python==2.7.16-1 diff --git a/files/build/versions/dockers/docker-syncd-centec/versions-deb-buster b/files/build/versions/dockers/docker-syncd-centec/versions-deb-buster index 898e95442221..d85883d1728c 100644 --- a/files/build/versions/dockers/docker-syncd-centec/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-centec/versions-deb-buster @@ -5,7 +5,7 @@ libbabeltrace1==1.5.6-2+deb10u1 libbsd0==0.9.1-2+deb10u1 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libipt2==2.0-2 libkmod2==26-1 diff --git a/files/build/versions/dockers/docker-syncd-centec/versions-deb-buster-arm64 b/files/build/versions/dockers/docker-syncd-centec/versions-deb-buster-arm64 index e13071edf35e..53745a721fa8 100644 --- a/files/build/versions/dockers/docker-syncd-centec/versions-deb-buster-arm64 +++ b/files/build/versions/dockers/docker-syncd-centec/versions-deb-buster-arm64 @@ -2,7 +2,7 @@ dmsetup==2:1.02.155-3 keyutils==1.6-6 libdevmapper1.02.1==2:1.02.155-3 libevent-2.1-6==2.1.8-stable-4 -libexpat1-dev==2.2.6-2+deb10u4 +libexpat1-dev==2.2.6-2+deb10u5 libnfsidmap2==0.25-5.1 libpcap-dev==1.8.1-6+deb10u1 libpcap0.8==1.8.1-6+deb10u1 @@ -18,8 +18,8 @@ libpython2.7-stdlib==2.7.16-2+deb10u1 libsensors-config==1:3.5.0-3 libsensors4-dev==1:3.5.0-3 libsensors5==1:3.5.0-3 -libtirpc-common==1.1.4-0.4 -libtirpc3==1.1.4-0.4 +libtirpc-common==1.1.4-0.4+deb10u1 +libtirpc3==1.1.4-0.4+deb10u1 nfs-common==1:1.3.4-2.5+deb10u1 python==2.7.16-1 python-dev==2.7.16-1 diff --git a/files/build/versions/dockers/docker-syncd-invm/versions-deb-buster b/files/build/versions/dockers/docker-syncd-invm/versions-deb-buster index b8d10d33db99..52b4bf3f9725 100644 --- a/files/build/versions/dockers/docker-syncd-invm/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-invm/versions-deb-buster @@ -1,12 +1,12 @@ gdb==8.2.1-2+b3 gdbserver==8.2.1-2+b3 -innovium-sai==0.107.5 -innovium-sai-headers==0.107.5 +innovium-sai==0.107.6 +innovium-sai-headers==0.107.6 libbabeltrace1==1.5.6-2+deb10u1 libbsd0==0.9.1-2+deb10u1 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libipt2==2.0-2 libpopt0==1.16-12 diff --git a/files/build/versions/dockers/docker-syncd-mlnx-rpc/versions-deb-buster b/files/build/versions/dockers/docker-syncd-mlnx-rpc/versions-deb-buster index b7a3d88403b3..2364dce02ea4 100644 --- a/files/build/versions/dockers/docker-syncd-mlnx-rpc/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-mlnx-rpc/versions-deb-buster @@ -19,7 +19,7 @@ libdouble-conversion1==3.1.0-3 libdpkg-perl==1.19.8 libffi-dev==3.2.1-9 libgcc-8-dev==8.3.0-6 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgomp1==8.3.0-6 libisl19==0.20-2 libitm1==8.3.0-6 @@ -30,9 +30,9 @@ libmpfr6==4.0.2-1 libmpx2==8.3.0-6 libpcre2-16-0==10.32-5 libpcre2-8-0==10.32-5 -libqt5core5a==5.11.3+dfsg1-1+deb10u4 -libqt5dbus5==5.11.3+dfsg1-1+deb10u4 -libqt5network5==5.11.3+dfsg1-1+deb10u4 +libqt5core5a==5.11.3+dfsg1-1+deb10u5 +libqt5dbus5==5.11.3+dfsg1-1+deb10u5 +libqt5network5==5.11.3+dfsg1-1+deb10u5 libquadmath0==8.3.0-6 librhash0==1.3.8-1 libssl-dev==1.1.1n-0+deb10u3 diff --git a/files/build/versions/dockers/docker-syncd-mlnx/versions-deb-buster b/files/build/versions/dockers/docker-syncd-mlnx/versions-deb-buster index 968aad1fd450..ad0cb74fea4d 100644 --- a/files/build/versions/dockers/docker-syncd-mlnx/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-mlnx/versions-deb-buster @@ -1,8 +1,8 @@ -applibs==1.mlnx.4.5.2262 -applibs-dev==1.mlnx.4.5.2262 +applibs==1.mlnx.4.5.2320 +applibs-dev==1.mlnx.4.5.2320 gdb==8.2.1-2+b3 gdbserver==8.2.1-2+b3 -iproute2-dev==1.mlnx.4.5.2262 +iproute2-dev==1.mlnx.4.5.2320 libbabeltrace1==1.5.6-2+deb10u1 libbsd0==0.9.1-2+deb10u1 libc-dev-bin==2.28-10+deb10u1 @@ -10,8 +10,8 @@ libc6-dev==2.28-10+deb10u1 libdw1==0.176-1.1 libedit2==3.1-20181209-1 libelf1==0.176-1.1 -libexpat1-dev==2.2.6-2+deb10u4 -libglib2.0-0==2.58.3-2+deb10u3 +libexpat1-dev==2.2.6-2+deb10u5 +libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libicu63==63.1-6+deb10u3 libipt2==2.0-2 @@ -31,9 +31,9 @@ libsairedis-dbg==1.0.0 libswsscommon-dbg==1.0.0 libunwind8==1.2.1-10~deb10u1 libxml2==2.9.4+dfsg1-7+deb10u4 -linux-libc-dev==4.19.249-2 +linux-libc-dev==4.19.260-1 mft==4.18.0-106 -mlnx-sai==1.mlnx.SAIRel1.21.2.2 +mlnx-sai==1.mlnx.SAIRel1.22.0.0 openssh-client==1:7.9p1-10+deb10u2 python==2.7.16-1 python-dev==2.7.16-1 @@ -41,7 +41,7 @@ python-minimal==2.7.16-1 python-pip==18.1-5 python-pip-whl==18.1-5 python-pkg-resources==40.8.0-1 -python-sdk-api==1.mlnx.4.5.2262 +python-sdk-api==1.mlnx.4.5.2320 python-setuptools==40.8.0-1 python2==2.7.16-1 python2-dev==2.7.16-1 @@ -51,21 +51,21 @@ python2.7-dev==2.7.16-2+deb10u1 python2.7-minimal==2.7.16-2+deb10u1 sshpass==1.06-1 strace==4.26-0.2 -sx-acl-helper==1.mlnx.4.5.2262 -sx-acl-helper-dev==1.mlnx.4.5.2262 -sx-complib==1.mlnx.4.5.2262 -sx-complib-dev==1.mlnx.4.5.2262 -sx-examples==1.mlnx.4.5.2262 -sx-examples-dev==1.mlnx.4.5.2262 -sx-gen-utils==1.mlnx.4.5.2262 -sx-gen-utils-dev==1.mlnx.4.5.2262 -sx-scew==1.mlnx.4.5.2262 -sx-scew-dev==1.mlnx.4.5.2262 -sxd-libs==1.mlnx.4.5.2262 -sxd-libs-dev==1.mlnx.4.5.2262 +sx-acl-helper==1.mlnx.4.5.2320 +sx-acl-helper-dev==1.mlnx.4.5.2320 +sx-complib==1.mlnx.4.5.2320 +sx-complib-dev==1.mlnx.4.5.2320 +sx-examples==1.mlnx.4.5.2320 +sx-examples-dev==1.mlnx.4.5.2320 +sx-gen-utils==1.mlnx.4.5.2320 +sx-gen-utils-dev==1.mlnx.4.5.2320 +sx-scew==1.mlnx.4.5.2320 +sx-scew-dev==1.mlnx.4.5.2320 +sxd-libs==1.mlnx.4.5.2320 +sxd-libs-dev==1.mlnx.4.5.2320 syncd==1.0.0 syncd-dbg==1.0.0 vim==2:8.1.0875-5+deb10u2 vim-runtime==2:8.1.0875-5+deb10u2 -wjh-libs==1.mlnx.4.5.2262 -wjh-libs-dev==1.mlnx.4.5.2262 \ No newline at end of file +wjh-libs==1.mlnx.4.5.2320 +wjh-libs-dev==1.mlnx.4.5.2320 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-syncd-mlnx/versions-py2 b/files/build/versions/dockers/docker-syncd-mlnx/versions-py2 index a979a56f0187..1f331339b2a0 100644 --- a/files/build/versions/dockers/docker-syncd-mlnx/versions-py2 +++ b/files/build/versions/dockers/docker-syncd-mlnx/versions-py2 @@ -1 +1 @@ -python-sdk-api==4.5.2262 \ No newline at end of file +python-sdk-api==4.5.2320 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-syncd-mlnx/versions-py3 b/files/build/versions/dockers/docker-syncd-mlnx/versions-py3 index 585326d2ef8c..7a17510aeb5e 100644 --- a/files/build/versions/dockers/docker-syncd-mlnx/versions-py3 +++ b/files/build/versions/dockers/docker-syncd-mlnx/versions-py3 @@ -1 +1 @@ -python_sdk_api==4.5.2262 \ No newline at end of file +python_sdk_api==4.5.2320 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-syncd-mrvl/versions-deb-buster-armhf b/files/build/versions/dockers/docker-syncd-mrvl/versions-deb-buster-armhf index 75858915943a..df1905503e3f 100644 --- a/files/build/versions/dockers/docker-syncd-mrvl/versions-deb-buster-armhf +++ b/files/build/versions/dockers/docker-syncd-mrvl/versions-deb-buster-armhf @@ -2,7 +2,7 @@ dmsetup==2:1.02.155-3 keyutils==1.6-6 libdevmapper1.02.1==2:1.02.155-3 libevent-2.1-6==2.1.8-stable-4 -libexpat1-dev==2.2.6-2+deb10u4 +libexpat1-dev==2.2.6-2+deb10u5 libnfsidmap2==0.25-5.1 libpcap-dev==1.8.1-6+deb10u1 libpcap0.8==1.8.1-6+deb10u1 @@ -20,8 +20,8 @@ libsairedis==1.0.0 libsensors-config==1:3.5.0-3 libsensors4-dev==1:3.5.0-3 libsensors5==1:3.5.0-3 -libtirpc-common==1.1.4-0.4 -libtirpc3==1.1.4-0.4 +libtirpc-common==1.1.4-0.4+deb10u1 +libtirpc3==1.1.4-0.4+deb10u1 mrvllibsai==1.7.1-9 nfs-common==1:1.3.4-2.5+deb10u1 python==2.7.16-1 diff --git a/files/build/versions/dockers/docker-syncd-vs/versions-deb-buster b/files/build/versions/dockers/docker-syncd-vs/versions-deb-buster index 9b8877c2e9c1..e194f52f4366 100644 --- a/files/build/versions/dockers/docker-syncd-vs/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-vs/versions-deb-buster @@ -4,7 +4,7 @@ libbabeltrace1==1.5.6-2+deb10u1 libbsd0==0.9.1-2+deb10u1 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libipt2==2.0-2 libpopt0==1.16-12 diff --git a/files/build/versions/dockers/docker-teamd/versions-deb-buster b/files/build/versions/dockers/docker-teamd/versions-deb-buster index 992786e8eb13..e5c88ab32b5d 100644 --- a/files/build/versions/dockers/docker-teamd/versions-deb-buster +++ b/files/build/versions/dockers/docker-teamd/versions-deb-buster @@ -4,7 +4,7 @@ libbabeltrace1==1.5.6-2+deb10u1 libbsd0==0.9.1-2+deb10u1 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libipt2==2.0-2 libpopt0==1.16-12 diff --git a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster index 7b37a4a560db..678ee6c0bfdf 100644 --- a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster +++ b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster @@ -35,8 +35,8 @@ bsd-mailx==8.1.2-0.20180807cvs-1 bsdmainutils==11.1.2+b1 build-essential==12.6 byacc==20140715-1+b1 -bzip2==1.0.6-9.2~deb10u1 -bzip2-doc==1.0.6-9.2~deb10u1 +bzip2==1.0.6-9.2~deb10u2 +bzip2-doc==1.0.6-9.2~deb10u2 ca-certificates==20200601~deb10u2 ca-certificates-java==20190405 cdbs==0.4.159 @@ -50,7 +50,7 @@ cmake==3.13.4-1 cmake-data==3.13.4-1 cmocka-doc==1.1.3-1 comerr-dev==2.1-1.44.5-1+deb10u3 -containerd.io==1.6.6-1 +containerd.io==1.6.8-1 cowbuilder==0.88 cowdancer==0.88 cpio==2.12+dfsg-9 @@ -58,7 +58,7 @@ cpp==4:8.3.0-1 cpp-8==8.3.0-6 cppcheck==1.86-1 cron==3.0pl1-134+deb10u1 -curl==7.64.0-4+deb10u2 +curl==7.64.0-4+deb10u3 dbus==1.12.20-0+deb10u1 dbus-user-session==1.12.20-0+deb10u1 dconf-gsettings-backend==0.30.1-2 @@ -66,7 +66,7 @@ dconf-service==0.30.1-2 dctrl-tools==2.24-3 debhelper==12.1.1 debian-keyring==2019.02.25 -debootstrap==1.0.114 +debootstrap==1.0.114+deb10u1 default-jdk-headless==2:1.11-71 default-jre==2:1.11-71 default-jre-headless==2:1.11-71 @@ -83,7 +83,7 @@ dh-systemd==12.1.1 dictionaries-common==1.28.1 diffstat==1.62-1 dirmngr==2.2.12-1+deb10u2 -distro-info-data==0.41+deb10u4 +distro-info-data==0.41+deb10u5 dkms==2.6.1-4 dmeventd==2:1.02.155-3 dmsetup==2:1.02.155-3 @@ -102,10 +102,10 @@ dwz==0.12-3 eatmydata==105-7 emacsen-common==3.0.4 equivs==2.2.0 -exim4-base==4.92-8+deb10u6 -exim4-config==4.92-8+deb10u6 -exim4-daemon-light==4.92-8+deb10u6 -expat==2.2.6-2+deb10u4 +exim4-base==4.92-8+deb10u7 +exim4-config==4.92-8+deb10u7 +exim4-daemon-light==4.92-8+deb10u7 +expat==2.2.6-2+deb10u5 exuberant-ctags==1:5.9~svn20110310-12 fakeroot==1.23-1 file==1:5.35-4+deb10u2 @@ -139,7 +139,7 @@ gettext==0.19.8.1-9 gettext-base==0.19.8.1-9 gfortran==4:8.3.0-1 gfortran-8==8.3.0-6 -ghostscript==9.27~dfsg-2+deb10u5 +ghostscript==9.27~dfsg-2+deb10u6 gir1.2-atk-1.0==2.30.0-2 gir1.2-atspi-2.0==2.30.0-7 gir1.2-freedesktop==1.58.3-2 @@ -166,7 +166,6 @@ gpg-wks-client==2.2.12-1+deb10u2 gpg-wks-server==2.2.12-1+deb10u2 gpgconf==2.2.12-1+deb10u2 gpgsm==2.2.12-1+deb10u2 -gpgv==2.2.12-1+deb10u2 graphviz==2.40.1-6+deb10u1 groff==1.22.4-3+deb10u1 groff-base==1.22.4-3+deb10u1 @@ -174,7 +173,7 @@ gsettings-desktop-schemas==3.28.1-1 gsfonts==1:8.11+urwcyr1.0.7~pre44-4.4 gstreamer1.0-libav==1.15.0.1+git20180723+db823502-2+deb10u1 gstreamer1.0-plugins-base==1.14.4-2+deb10u1 -gstreamer1.0-plugins-good==1.14.4-1+deb10u1 +gstreamer1.0-plugins-good==1.14.4-1+deb10u2 gstreamer1.0-plugins-ugly==1.14.4-1+deb10u1 gstreamer1.0-x==1.14.4-2+deb10u1 gtk-update-icon-cache==3.24.5-1 @@ -200,8 +199,8 @@ javahelper==0.72.9 javascript-common==11 kernel-wedge==2.99 kmod==26-1 -krb5-locales==1.17-3+deb10u3 -krb5-multidev==1.17-3+deb10u3 +krb5-locales==1.17-3+deb10u4 +krb5-multidev==1.17-3+deb10u4 lcov==1.13-4 less==487-0.1+b1 lib32asan5==8.3.0-6 @@ -325,7 +324,8 @@ libbs2b0==3.1.0+dfsg-2.2 libbsd-dev==0.9.1-2+deb10u1 libbsd0==0.9.1-2+deb10u1 libbsh-java==2.0b4-19 -libbz2-dev==1.0.6-9.2~deb10u1 +libbz2-1.0==1.0.6-9.2~deb10u2 +libbz2-dev==1.0.6-9.2~deb10u2 libc-ares-dev==1.14.0-1+deb10u1 libc-ares2==1.14.0-1+deb10u1 libc-dev-bin==2.28-10+deb10u1 @@ -399,10 +399,10 @@ libcrystalhd3==1:0.0~git20110715.fdd2f19-13 libcups2==2.2.10-6+deb10u6 libcupsfilters1==1.21.6-5 libcupsimage2==2.2.10-6+deb10u6 -libcurl3-gnutls==7.64.0-4+deb10u2 -libcurl3-nss==7.64.0-4+deb10u2 -libcurl4==7.64.0-4+deb10u2 -libcurl4-nss-dev==7.64.0-4+deb10u2 +libcurl3-gnutls==7.64.0-4+deb10u3 +libcurl3-nss==7.64.0-4+deb10u3 +libcurl4==7.64.0-4+deb10u3 +libcurl4-nss-dev==7.64.0-4+deb10u3 libdaemon-dev==0.14-7 libdaemon0==0.14-7 libdata-dump-perl==1.23-1 @@ -473,8 +473,8 @@ libevent-dev==2.1.8-stable-4 libevent-extra-2.1-6==2.1.8-stable-4 libevent-openssl-2.1-6==2.1.8-stable-4 libevent-pthreads-2.1-6==2.1.8-stable-4 -libexpat1==2.2.6-2+deb10u4 -libexpat1-dev==2.2.6-2+deb10u4 +libexpat1==2.2.6-2+deb10u5 +libexpat1-dev==2.2.6-2+deb10u5 libexplain-dev==1.4.D001-8 libexplain51==1.4.D001-8 libexporter-tiny-perl==1.002001-1 @@ -496,7 +496,7 @@ libfile-stripnondeterminism-perl==1.1.2-1 libfile-which-perl==1.23-1 libfl-dev==2.6.4-6.2 libfl2==2.6.4-6.2 -libflac8==1.3.2-3+deb10u1 +libflac8==1.3.2-3+deb10u2 libflite1==2.1-release-3 libfont-afm-perl==1.20-2 libfontbox2-java==2.0.13-2 @@ -504,10 +504,10 @@ libfontconfig1==2.13.1-2 libfontconfig1-dev==2.13.1-2 libfontenc1==1:1.1.3-1+b2 libfop-java==1:2.3-2 -libfreetype6==2.9.1-3+deb10u2 -libfreetype6-dev==2.9.1-3+deb10u2 -libfribidi-dev==1.0.5-3.1+deb10u1 -libfribidi0==1.0.5-3.1+deb10u1 +libfreetype6==2.9.1-3+deb10u3 +libfreetype6-dev==2.9.1-3+deb10u3 +libfribidi-dev==1.0.5-3.1+deb10u2 +libfribidi0==1.0.5-3.1+deb10u2 libfstrm0==0.4.0-1 libfuture-perl==0.39-1 libgail-common==2.24.32-3 @@ -539,11 +539,11 @@ libgl1-mesa-dri==18.3.6-2+deb10u1 libglapi-mesa==18.3.6-2+deb10u1 libgles1==1.1.0-1 libgles2==1.1.0-1 -libglib2.0-0==2.58.3-2+deb10u3 -libglib2.0-bin==2.58.3-2+deb10u3 -libglib2.0-data==2.58.3-2+deb10u3 -libglib2.0-dev==2.58.3-2+deb10u3 -libglib2.0-dev-bin==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 +libglib2.0-bin==2.58.3-2+deb10u4 +libglib2.0-data==2.58.3-2+deb10u4 +libglib2.0-dev==2.58.3-2+deb10u4 +libglib2.0-dev-bin==2.58.3-2+deb10u4 libglu1-mesa==9.0.0-2.1+b3 libglu1-mesa-dev==9.0.0-2.1+b3 libglvnd-core-dev==1.1.0-1 @@ -554,21 +554,21 @@ libglx0==1.1.0-1 libgme0==0.6.2-1 libgmp-dev==2:6.1.2+dfsg-4+deb10u1 libgmpxx4ldbl==2:6.1.2+dfsg-4+deb10u1 -libgnutls-dane0==3.6.7-4+deb10u7 -libgnutls-openssl27==3.6.7-4+deb10u7 -libgnutls28-dev==3.6.7-4+deb10u7 -libgnutlsxx28==3.6.7-4+deb10u7 +libgnutls-dane0==3.6.7-4+deb10u9 +libgnutls-openssl27==3.6.7-4+deb10u9 +libgnutls28-dev==3.6.7-4+deb10u9 +libgnutlsxx28==3.6.7-4+deb10u9 libgomp1==8.3.0-6 libgoogle-perftools4==2.7-1 libgpgme11==1.12.0-6 libgpm2==1.20.7-5 libgraphite2-3==1.3.13-7 libgraphite2-dev==1.3.13-7 -libgs9==9.27~dfsg-2+deb10u5 -libgs9-common==9.27~dfsg-2+deb10u5 +libgs9==9.27~dfsg-2+deb10u6 +libgs9-common==9.27~dfsg-2+deb10u6 libgsm1==1.0.18-2 -libgssapi-krb5-2==1.17-3+deb10u3 -libgssrpc4==1.17-3+deb10u3 +libgssapi-krb5-2==1.17-3+deb10u4 +libgssrpc4==1.17-3+deb10u4 libgstreamer-plugins-base1.0-0==1.14.4-2+deb10u1 libgstreamer1.0-0==1.14.4-1 libgtest-dev==1.8.1-3 @@ -598,7 +598,7 @@ libhtml-parser-perl==3.72-3+b3 libhtml-tagset-perl==3.20-3 libhtml-tree-perl==5.07-2 libhttp-cookies-perl==6.04-1 -libhttp-daemon-perl==6.01-3 +libhttp-daemon-perl==6.01-3+deb10u1 libhttp-date-perl==6.02-1 libhttp-message-perl==6.18-1 libhttp-negotiate-perl==6.01-1 @@ -664,7 +664,7 @@ libjbig0==2.1-3.1+b2 libjbig2dec0==0.16-1+deb10u1 libjemalloc-dev==5.1.0-3 libjemalloc2==5.1.0-3 -libjetty9-java==9.4.16-0+deb10u1 +libjetty9-java==9.4.16-0+deb10u2 libjpeg62-turbo==1:1.5.2-2+deb10u1 libjs-bootstrap==3.4.1+dfsg-1 libjs-jquery==3.3.1~dfsg-3+deb10u1 @@ -690,16 +690,16 @@ libjudy-dev==1.0.5-5 libjudydebian1==1.0.5-5 libjxr-tools==1.1-6+b1 libjxr0==1.1-6+b1 -libk5crypto3==1.17-3+deb10u3 -libkadm5clnt-mit11==1.17-3+deb10u3 -libkadm5srv-mit11==1.17-3+deb10u3 -libkdb5-9==1.17-3+deb10u3 +libk5crypto3==1.17-3+deb10u4 +libkadm5clnt-mit11==1.17-3+deb10u4 +libkadm5srv-mit11==1.17-3+deb10u4 +libkdb5-9==1.17-3+deb10u4 libkeyutils1==1.6-6 libkmod2==26-1 libkpathsea6==2018.20181218.49446-1 -libkrb5-3==1.17-3+deb10u3 -libkrb5-dev==1.17-3+deb10u3 -libkrb5support0==1.17-3+deb10u3 +libkrb5-3==1.17-3+deb10u4 +libkrb5-dev==1.17-3+deb10u4 +libkrb5support0==1.17-3+deb10u4 libksba8==1.3.5-2 liblab-gamut1==2.40.1-6+deb10u1 liblcms2-2==2.9-3 @@ -739,9 +739,9 @@ libmagickcore-6.q16-6-extra==8:6.9.10.23+dfsg-2.1+deb10u1 libmagickwand-6.q16-6==8:6.9.10.23+dfsg-2.1+deb10u1 libmail-sendmail-perl==0.80-1 libmailtools-perl==2.18-1 -libmariadb-dev==1:10.3.34-0+deb10u1 -libmariadb-dev-compat==1:10.3.34-0+deb10u1 -libmariadb3==1:10.3.34-0+deb10u1 +libmariadb-dev==1:10.3.36-0+deb10u2 +libmariadb-dev-compat==1:10.3.36-0+deb10u2 +libmariadb3==1:10.3.36-0+deb10u2 libmaven-archiver-java==3.2.0-2 libmaven-clean-plugin-java==3.1.0-1 libmaven-common-artifact-filters-java==3.0.1-3 @@ -756,7 +756,7 @@ libmaven-reporting-impl-java==3.0.0-2 libmaven-resolver-java==1.3.1-1 libmaven-resources-plugin-java==3.1.0-1 libmaven-shared-incremental-java==1.1-3 -libmaven-shared-utils-java==3.3.0-1 +libmaven-shared-utils-java==3.3.0-1+deb10u1 libmaven-site-plugin-java==3.6-3 libmaven3-core-java==3.6.0-1 libmime-tools-perl==5.509-1 @@ -794,7 +794,7 @@ libnet-http-perl==6.18-1 libnet-ip-perl==1.26-2 libnet-libidn-perl==0.12.ds-3+b1 libnet-smtp-ssl-perl==1.04-1 -libnet-ssleay-perl==1.85-2+b1 +libnet-ssleay-perl==1.85-2+deb10u1 libnetfilter-conntrack-dev==1.0.7-1 libnetfilter-conntrack3==1.0.7-1 libnetpbm10==2:10.0-15.3+b2 @@ -967,20 +967,20 @@ libqt4-svg==4:4.8.7+dfsg-18+deb10u1 libqt4-test==4:4.8.7+dfsg-18+deb10u1 libqt4-xml==4:4.8.7+dfsg-18+deb10u1 libqt4-xmlpatterns==4:4.8.7+dfsg-18+deb10u1 -libqt5concurrent5==5.11.3+dfsg1-1+deb10u4 -libqt5core5a==5.11.3+dfsg1-1+deb10u4 -libqt5dbus5==5.11.3+dfsg1-1+deb10u4 -libqt5gui5==5.11.3+dfsg1-1+deb10u4 -libqt5network5==5.11.3+dfsg1-1+deb10u4 -libqt5opengl5==5.11.3+dfsg1-1+deb10u4 -libqt5opengl5-dev==5.11.3+dfsg1-1+deb10u4 -libqt5printsupport5==5.11.3+dfsg1-1+deb10u4 -libqt5sql5==5.11.3+dfsg1-1+deb10u4 -libqt5sql5-sqlite==5.11.3+dfsg1-1+deb10u4 +libqt5concurrent5==5.11.3+dfsg1-1+deb10u5 +libqt5core5a==5.11.3+dfsg1-1+deb10u5 +libqt5dbus5==5.11.3+dfsg1-1+deb10u5 +libqt5gui5==5.11.3+dfsg1-1+deb10u5 +libqt5network5==5.11.3+dfsg1-1+deb10u5 +libqt5opengl5==5.11.3+dfsg1-1+deb10u5 +libqt5opengl5-dev==5.11.3+dfsg1-1+deb10u5 +libqt5printsupport5==5.11.3+dfsg1-1+deb10u5 +libqt5sql5==5.11.3+dfsg1-1+deb10u5 +libqt5sql5-sqlite==5.11.3+dfsg1-1+deb10u5 libqt5svg5==5.11.3-2 -libqt5test5==5.11.3+dfsg1-1+deb10u4 -libqt5widgets5==5.11.3+dfsg1-1+deb10u4 -libqt5xml5==5.11.3+dfsg1-1+deb10u4 +libqt5test5==5.11.3+dfsg1-1+deb10u5 +libqt5widgets5==5.11.3+dfsg1-1+deb10u5 +libqt5xml5==5.11.3+dfsg1-1+deb10u5 libqtcore4==4:4.8.7+dfsg-18+deb10u1 libqtdbus4==4:4.8.7+dfsg-18+deb10u1 libqtgui4==4:4.8.7+dfsg-18+deb10u1 @@ -1000,8 +1000,8 @@ librhash0==1.3.8-1 librole-tiny-perl==2.000006-1 librrd-dev==1.7.1-2 librrd8==1.7.1-2 -librsvg2-2==2.44.10-2.1 -librsvg2-common==2.44.10-2.1 +librsvg2-2==2.44.10-2.1+deb10u3 +librsvg2-common==2.44.10-2.1+deb10u3 librtmp1==2.4+20151223.gitfa8646d.1-2 librubberband2==1.8.1-7 libruby2.5==2.5.5-3+deb10u4 @@ -1037,10 +1037,10 @@ libsm6==2:1.2.3-1 libsnappy-java==1.1.7.2-1 libsnappy-jni==1.1.7.2-1 libsnappy1v5==1.1.7-1 -libsndfile1==1.0.28-6+deb10u1 -libsnmp-base==5.7.3+dfsg-5+deb10u2 -libsnmp-dev==5.7.3+dfsg-5+deb10u2 -libsnmp30==5.7.3+dfsg-5+deb10u2 +libsndfile1==1.0.28-6+deb10u2 +libsnmp-base==5.7.3+dfsg-5+deb10u3 +libsnmp-dev==5.7.3+dfsg-5+deb10u3 +libsnmp30==5.7.3+dfsg-5+deb10u3 libsoap-lite-perl==1.27-1 libsodium-dev==1.0.17-1 libsodium23==1.0.17-1 @@ -1052,7 +1052,7 @@ libsoup2.4-1==2.64.2-2 libsoxr0==0.1.2-3 libspeex1==1.2~rc1.2-1+b2 libspice-server1==0.14.0-1.3+deb10u1 -libsqlite3-0==3.27.2-3+deb10u1 +libsqlite3-0==3.27.2-3+deb10u2 libsratom-0-0==0.6.0~dfsg0-1 libssh-gcrypt-4==0.8.7-1+deb10u1 libssh2-1==1.8.0-2.1 @@ -1291,7 +1291,7 @@ libxrender-dev==1:0.9.10-1 libxrender1==1:0.9.10-1 libxshmfence-dev==1.3-1 libxshmfence1==1.3-1 -libxslt1.1==1.1.32-2.2~deb10u1 +libxslt1.1==1.1.32-2.2~deb10u2 libxss1==1:1.2.3-1 libxt-dev==1:1.1.5-1+b3 libxt6==1:1.1.5-1+b3 @@ -1316,12 +1316,12 @@ libzvbi0==0.2.35-16 libzzip-0-13==0.13.62-3.2+deb10u1 licensecheck==3.0.31-3 lintian==2.15.0 -linux-compiler-gcc-8-x86==4.19.249-2 -linux-headers-4.19.0-21-amd64==4.19.249-2 -linux-headers-4.19.0-21-common==4.19.249-2 -linux-headers-amd64==4.19+105+deb10u16 -linux-kbuild-4.19==4.19.249-2 -linux-libc-dev==4.19.249-2 +linux-compiler-gcc-8-x86==4.19.260-1 +linux-headers-4.19.0-22-amd64==4.19.260-1 +linux-headers-4.19.0-22-common==4.19.260-1 +linux-headers-amd64==4.19+105+deb10u17 +linux-kbuild-4.19==4.19.260-1 +linux-libc-dev==4.19.260-1 linuxdoc-tools==0.9.73-2 llvm-7==1:7.0.1-8+deb10u2 llvm-7-dev==1:7.0.1-8+deb10u2 @@ -1343,7 +1343,7 @@ make==4.2.1-1.2 man-db==2.8.5-2 manpages==4.16-2 manpages-dev==4.16-2 -mariadb-common==1:10.3.34-0+deb10u1 +mariadb-common==1:10.3.36-0+deb10u2 maven==3.6.0-1 maven-debian-helper==2.3.2 maven-repo-helper==1.9.3 @@ -1359,10 +1359,10 @@ netpbm==2:10.0-15.3+b2 nettle-dev==3.4.1-1+deb10u1 nftables==0.9.0-2 ocl-icd-libopencl1==2.2.12-2 -openjdk-11-jdk==11.0.15+10-1~deb10u1 -openjdk-11-jdk-headless==11.0.15+10-1~deb10u1 -openjdk-11-jre==11.0.15+10-1~deb10u1 -openjdk-11-jre-headless==11.0.15+10-1~deb10u1 +openjdk-11-jdk==11.0.16+8-1~deb10u1 +openjdk-11-jdk-headless==11.0.16+8-1~deb10u1 +openjdk-11-jre==11.0.16+8-1~deb10u1 +openjdk-11-jre-headless==11.0.16+8-1~deb10u1 openmpi-bin==3.1.3-11 openmpi-common==3.1.3-11 opensp==1.5.2-13+b1 @@ -1430,12 +1430,12 @@ poppler-data==0.4.9-2 pps-tools==1.0.2-1 preview-latex-style==11.91-2 pristine-tar==1.46 -procmail==3.22-26 +procmail==3.22-26+deb10u1 procps==2:3.3.15-2 protobuf-compiler==3.6.1.3-2 psmisc==23.2-1+deb10u1 psutils==1.17.dfsg-4 -publicsuffix==20211109.1735-0+deb10u1 +publicsuffix==20220811.1734-0+deb10u1 pylint==1.9.4-1 python==2.7.16-1 python-alabaster==0.7.8-1 @@ -1522,9 +1522,9 @@ python-soupsieve==1.8+dfsg-1 python-sphinx==1.8.4-1 python-stdeb==0.8.5-1 python-tk==2.7.16-2 -python-twisted==18.9.0-3 -python-twisted-bin==18.9.0-3 -python-twisted-core==18.9.0-3 +python-twisted==18.9.0-3+deb10u1 +python-twisted-bin==18.9.0-3+deb10u1 +python-twisted-core==18.9.0-3+deb10u1 python-typing==3.6.6-1 python-tz==2019.1-1 python-urllib3==1.24.1-1 @@ -1610,21 +1610,21 @@ python3.7-dbg==3.7.3-2+deb10u3 python3.7-dev==3.7.3-2+deb10u3 python3.7-minimal==3.7.3-2+deb10u3 qdbus==4:4.8.7+dfsg-18+deb10u1 -qemu-kvm==1:3.1+dfsg-8+deb10u8 -qemu-system-common==1:3.1+dfsg-8+deb10u8 -qemu-system-data==1:3.1+dfsg-8+deb10u8 -qemu-system-gui==1:3.1+dfsg-8+deb10u8 -qemu-system-x86==1:3.1+dfsg-8+deb10u8 -qemu-utils==1:3.1+dfsg-8+deb10u8 +qemu-kvm==1:3.1+dfsg-8+deb10u9 +qemu-system-common==1:3.1+dfsg-8+deb10u9 +qemu-system-data==1:3.1+dfsg-8+deb10u9 +qemu-system-gui==1:3.1+dfsg-8+deb10u9 +qemu-system-x86==1:3.1+dfsg-8+deb10u9 +qemu-utils==1:3.1+dfsg-8+deb10u9 qt-at-spi==0.4.0-9 qt4-linguist-tools==4:4.8.7+dfsg-18+deb10u1 qt4-qmake==4:4.8.7+dfsg-18+deb10u1 -qt5-default==5.11.3+dfsg1-1+deb10u4 -qt5-gtk-platformtheme==5.11.3+dfsg1-1+deb10u4 -qt5-qmake==5.11.3+dfsg1-1+deb10u4 -qt5-qmake-bin==5.11.3+dfsg1-1+deb10u4 -qtbase5-dev==5.11.3+dfsg1-1+deb10u4 -qtbase5-dev-tools==5.11.3+dfsg1-1+deb10u4 +qt5-default==5.11.3+dfsg1-1+deb10u5 +qt5-gtk-platformtheme==5.11.3+dfsg1-1+deb10u5 +qt5-qmake==5.11.3+dfsg1-1+deb10u5 +qt5-qmake-bin==5.11.3+dfsg1-1+deb10u5 +qtbase5-dev==5.11.3+dfsg1-1+deb10u5 +qtbase5-dev-tools==5.11.3+dfsg1-1+deb10u5 qtchooser==66-2 qtcore4-l10n==4:4.8.7+dfsg-18+deb10u1 qttranslations5-l10n==5.11.3-2 @@ -1689,7 +1689,7 @@ tk8.6==8.6.9-2 tk8.6-blt2.5==2.5.3+dfsg-4 ucf==3.0038+nmu1 unattended-upgrades==1.11.2 -unzip==6.0-23+deb10u2 +unzip==6.0-23+deb10u3 uuid-dev==2.33.1-0.1 va-driver-all==2.4.0-1 vdpau-driver-all==1.1.1-10 @@ -1725,10 +1725,11 @@ xfonts-utils==1:7.7+6 xkb-data==2.26-2 xml-core==0.18+nmu1 xorg-sgml-doctools==1:1.11-1 -xsltproc==1.1.32-2.2~deb10u1 +xsltproc==1.1.32-2.2~deb10u2 xterm==344-1+deb10u2 xtrans-dev==1.3.5-1 xxd==2:8.1.0875-5+deb10u2 xz-utils==5.2.4-1+deb10u1 zip==3.0-11+b1 -zlib1g-dev==1:1.2.11.dfsg-1+deb10u1 \ No newline at end of file +zlib1g==1:1.2.11.dfsg-1+deb10u2 +zlib1g-dev==1:1.2.11.dfsg-1+deb10u2 \ No newline at end of file diff --git a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster-arm64 b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster-arm64 index ae8f49c2dc58..879016873318 100644 --- a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster-arm64 +++ b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster-arm64 @@ -3,5 +3,5 @@ libdrm-etnaviv1==2.4.97-1 libdrm-freedreno1==2.4.97-1 libdrm-tegra0==2.4.97-1 libtext-iconv-perl==1.7-5+b6 -libxslt1-dev==1.1.32-2.2~deb10u1 -nodejs==14.20.0-deb-1nodesource1 \ No newline at end of file +libxslt1-dev==1.1.32-2.2~deb10u2 +nodejs==14.20.1-deb-1nodesource1 \ No newline at end of file diff --git a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster-armhf b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster-armhf index a994f5f0fe27..1922ccd3534b 100644 --- a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster-armhf +++ b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster-armhf @@ -97,13 +97,13 @@ libsombok3==2.4.0-2 libspecio-perl==0.43-1 libunicode-linebreak-perl==0.0.20190101-1 libxapian-dev==1.4.11-1 -libxslt1-dev==1.1.32-2.2~deb10u1 +libxslt1-dev==1.1.32-2.2~deb10u2 libyaml-tiny-perl==1.73-1 -linux-compiler-gcc-8-arm==4.19.249-2 +linux-compiler-gcc-8-arm==4.19.260-1 llvm-6.0==1:6.0.1-10 llvm-6.0-dev==1:6.0.1-10 llvm-6.0-runtime==1:6.0.1-10 -nodejs==14.20.0-deb-1nodesource1 +nodejs==14.20.1-deb-1nodesource1 ps2eps==1.68+binaryfree-2 rdfind==1.4.1-1 sassc==3.5.0-1 diff --git a/files/build/versions/dockers/sonic-slave-buster/versions-git b/files/build/versions/dockers/sonic-slave-buster/versions-git index d7cbfb3e3c61..9b6ab98c48b2 100644 --- a/files/build/versions/dockers/sonic-slave-buster/versions-git +++ b/files/build/versions/dockers/sonic-slave-buster/versions-git @@ -1,2 +1,2 @@ -https://chromium.googlesource.com/chromium/tools/depot_tools.git==d22bf607218d50bf20444b0610f62b265f829dbc +https://chromium.googlesource.com/chromium/tools/depot_tools.git==a724859f7a9b3531c0373d86886a42314e772532 https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f \ No newline at end of file diff --git a/files/build/versions/dockers/sonic-slave-buster/versions-py3 b/files/build/versions/dockers/sonic-slave-buster/versions-py3 index 3ff9fa9ec159..b9140ea457be 100644 --- a/files/build/versions/dockers/sonic-slave-buster/versions-py3 +++ b/files/build/versions/dockers/sonic-slave-buster/versions-py3 @@ -3,7 +3,7 @@ asn1crypto==0.24.0 atomicwrites==1.1.5 attrs==18.2.0 babel==2.6.0 -bitarray==2.5.1 +bitarray==2.6.0 certifi==2018.8.24 chardet==3.0.4 cov-core==1.15.0 @@ -58,7 +58,7 @@ pytz==2019.1 pyxdg==0.25 pyyaml==5.4.1 redis==3.5.3 -regex==2022.7.9 +regex==2022.9.13 requests==2.21.0 roman==2.0.0 secretstorage==2.3.1 diff --git a/files/build/versions/dockers/sonic-slave-stretch/versions-git b/files/build/versions/dockers/sonic-slave-stretch/versions-git index d7cbfb3e3c61..9b6ab98c48b2 100644 --- a/files/build/versions/dockers/sonic-slave-stretch/versions-git +++ b/files/build/versions/dockers/sonic-slave-stretch/versions-git @@ -1,2 +1,2 @@ -https://chromium.googlesource.com/chromium/tools/depot_tools.git==d22bf607218d50bf20444b0610f62b265f829dbc +https://chromium.googlesource.com/chromium/tools/depot_tools.git==a724859f7a9b3531c0373d86886a42314e772532 https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f \ No newline at end of file diff --git a/files/build/versions/dockers/sonic-slave-stretch/versions-py3 b/files/build/versions/dockers/sonic-slave-stretch/versions-py3 index d16d157b6578..1599cc05ecaa 100644 --- a/files/build/versions/dockers/sonic-slave-stretch/versions-py3 +++ b/files/build/versions/dockers/sonic-slave-stretch/versions-py3 @@ -1,6 +1,6 @@ alabaster==0.7.8 babel==2.3.4 -bitarray==2.5.1 +bitarray==2.6.0 chardet==2.3.0 cryptography==1.7.1 devscripts==2.17.6+deb9u2 diff --git a/files/build/versions/host-base-image/versions-deb-buster b/files/build/versions/host-base-image/versions-deb-buster index d95e8a34c208..44598d7dbfb3 100644 --- a/files/build/versions/host-base-image/versions-deb-buster +++ b/files/build/versions/host-base-image/versions-deb-buster @@ -1,6 +1,6 @@ adduser==3.118 apt==1.8.2.3 -base-files==10.3+deb10u12 +base-files==10.3+deb10u13 base-passwd==3.5.46 bash==5.0-4 bsdutils==1:2.33.1-0.1 @@ -10,14 +10,14 @@ debconf==1.5.71+deb10u1 debian-archive-keyring==2019.1+deb10u1 debianutils==4.8.6.1 diffutils==1:3.7-3 -dpkg==1.19.7 +dpkg==1.19.8 e2fsprogs==1.44.5-1+deb10u3 fdisk==2.33.1-0.1 findutils==4.6.0+git+20190209-2 gcc-8-base==8.3.0-6 -gpgv==2.2.12-1+deb10u1 +gpgv==2.2.12-1+deb10u2 grep==3.3-1 -gzip==1.9-3 +gzip==1.9-3+deb10u1 hostname==3.21 init-system-helpers==1.56+nmu1 libacl1==2.2.53-4 @@ -39,12 +39,12 @@ libffi6==3.2.1-9 libgcc1==1:8.3.0-6 libgcrypt20==1.8.4-5+deb10u1 libgmp10==2:6.1.2+dfsg-4+deb10u1 -libgnutls30==3.6.7-4+deb10u7 +libgnutls30==3.6.7-4+deb10u8 libgpg-error0==1.35-1 libhogweed4==3.4.1-1+deb10u1 libidn2-0==2.0.5-1+deb10u1 liblz4-1==1.8.3-1+deb10u1 -liblzma5==5.2.4-1 +liblzma5==5.2.4-1+deb10u1 libmount1==2.33.1-0.1 libncursesw6==6.1+20181013-2+deb10u2 libnettle6==3.4.1-1+deb10u1 @@ -79,6 +79,6 @@ perl-base==5.28.1-6+deb10u1 sed==4.7-1 sysvinit-utils==2.93-8 tar==1.30+dfsg-6 -tzdata==2021a-0+deb10u3 +tzdata==2021a-0+deb10u6 util-linux==2.33.1-0.1 -zlib1g==1:1.2.11.dfsg-1 \ No newline at end of file +zlib1g==1:1.2.11.dfsg-1+deb10u1 \ No newline at end of file diff --git a/files/build/versions/host-image/versions-deb-buster b/files/build/versions/host-image/versions-deb-buster index 4300bcc6e050..54001683418d 100644 --- a/files/build/versions/host-image/versions-deb-buster +++ b/files/build/versions/host-image/versions-deb-buster @@ -10,26 +10,25 @@ bridge-utils==1.6-2 bsdmainutils==11.1.2+b1 build-essential==12.6 busybox==1:1.30.1-4 -bzip2==1.0.6-9.2~deb10u1 +bzip2==1.0.6-9.2~deb10u2 ca-certificates==20200601~deb10u2 cgroup-tools==0.41-8.1 conntrack==1:1.4.5-2 -containerd.io==1.6.6-1 +containerd.io==1.6.8-1 cpio==2.12+dfsg-9 cpp==4:8.3.0-1 cpp-8==8.3.0-6 cron==3.0pl1-134+deb10u1 -curl==7.64.0-4+deb10u2 +curl==7.64.0-4+deb10u3 dbus==1.12.20-0+deb10u1 device-tree-compiler==1.4.7-4 dh-python==3.20190308 dirmngr==2.2.12-1+deb10u2 -distro-info-data==0.41+deb10u4 +distro-info-data==0.41+deb10u5 dmidecode==3.2-1 dmsetup==2:1.02.155-3 docker-ce==5:18.09.8~3-0~debian-buster docker-ce-cli==5:18.09.8~3-0~debian-buster -dpkg==1.19.8 dpkg-dev==1.19.8 ebtables==2.0.10.4+snapshot20181205-3 efibootmgr==15-1 @@ -57,20 +56,18 @@ gpg-wks-client==2.2.12-1+deb10u2 gpg-wks-server==2.2.12-1+deb10u2 gpgconf==2.2.12-1+deb10u2 gpgsm==2.2.12-1+deb10u2 -gpgv==2.2.12-1+deb10u2 -grub-common==2.02+dfsg1-20+deb10u4 -grub2-common==2.02+dfsg1-20+deb10u4 -gzip==1.9-3+deb10u1 +grub-common==2.06-3~deb10u1 +grub2-common==2.06-3~deb10u1 haveged==1.9.1-7 hdparm==9.58+ds-1 hping3==3.a2.ds2-7 -hw-management==1.mlnx.7.0010.2347 +hw-management==1.mlnx.7.0010.2349 i2c-tools==4.1-1 ifmetric==0.3-5 ifupdown2==1.2.8-1 initramfs-tools==0.133 initramfs-tools-core==0.133 -innovium-platform-driver==0.107.5 +innovium-platform-driver==0.107.6 ipmitool==1.8.18-6+deb10u1 iproute2==4.20.0-2+deb10u1 iptables==1.8.2-4 @@ -93,6 +90,7 @@ libassuan0==2.5.2-1 libatomic1==8.3.0-6 libbinutils==2.31.1-16 libbsd0==0.9.1-2+deb10u1 +libbz2-1.0==1.0.6-9.2~deb10u2 libc-dev-bin==2.28-10+deb10u1 libc-l10n==2.28-10+deb10u1 libc6-dev==2.28-10+deb10u1 @@ -101,8 +99,8 @@ libcap2-bin==1:2.25-2 libcc1-0==8.3.0-6 libcgroup1==0.41-8.1 libcryptsetup12==2:2.1.0-5+deb10u2 -libcurl3-gnutls==7.64.0-4+deb10u2 -libcurl4==7.64.0-4+deb10u2 +libcurl3-gnutls==7.64.0-4+deb10u3 +libcurl4==7.64.0-4+deb10u3 libdbd-sqlite3-perl==1.62-3 libdbi-perl==1.642-1+deb10u2 libdbus-1-3==1.12.20-0+deb10u1 @@ -115,22 +113,23 @@ libefiboot1==37-2+deb10u1 libefivar1==37-2+deb10u1 libelf1==0.176-1.1 libestr0==0.1.10-2.1 -libexpat1==2.2.6-2+deb10u4 -libexpat1-dev==2.2.6-2+deb10u4 +libexpat1==2.2.6-2+deb10u5 +libexpat1-dev==2.2.6-2+deb10u5 libfastjson4==0.99.8-2 libffi-dev==3.2.1-9 libfreeipmi17==1.6.3-1.1 -libfreetype6==2.9.1-3+deb10u2 +libfreetype6==2.9.1-3+deb10u3 libftdi1-2==1.4-1+b2 libfuse2==2.9.9-1+deb10u1 libgcc-8-dev==8.3.0-6 libgdbm-compat4==1.18.1-4 libgdbm6==1.18.1-4 libgirepository-1.0-1==1.58.3-2 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 +libgnutls30==3.6.7-4+deb10u9 libgomp1==8.3.0-6 libgpm2==1.20.7-5 -libgssapi-krb5-2==1.17-3+deb10u3 +libgssapi-krb5-2==1.17-3+deb10u4 libhavege1==1.9.1-7 libhiredis0.14==0.14.0-3~bpo9+1 libi2c0==4.1-1 @@ -143,18 +142,17 @@ libisl19==0.20-2 libitm1==8.3.0-6 libjq1==1.5+dfsg-2+b1 libjson-c3==0.12.1+ds-2+deb10u1 -libk5crypto3==1.17-3+deb10u3 +libk5crypto3==1.17-3+deb10u4 libkeyutils1==1.6-6 libklibc==2.0.6-1+deb10u1 libkmod2==26-1 -libkrb5-3==1.17-3+deb10u3 -libkrb5support0==1.17-3+deb10u3 +libkrb5-3==1.17-3+deb10u4 +libkrb5support0==1.17-3+deb10u4 libksba8==1.3.5-2 libldap-2.4-2==2.4.47+dfsg-3+deb10u7 libldap-common==2.4.47+dfsg-3+deb10u7 liblognorm5==2.0.5-1 liblsan0==8.3.0-6 -liblzma5==5.2.4-1+deb10u1 liblzo2-2==2.10-0.1 libmagic-mgc==1:5.35-4+deb10u2 libmagic1==1:5.35-4+deb10u2 @@ -206,7 +204,7 @@ libreadline7==7.0-5 librtmp1==2.4+20151223.gitfa8646d.1-2 libsasl2-2==2.1.27+dfsg-1+deb10u2 libsasl2-modules-db==2.1.27+dfsg-1+deb10u2 -libsqlite3-0==3.27.2-3+deb10u1 +libsqlite3-0==3.27.2-3+deb10u2 libssh2-1==1.8.0-2.1 libssl-dev==1.1.1n-0+deb10u3 libssl1.1==1.1.1n-0+deb10u3 @@ -229,7 +227,7 @@ libyang-cpp==1.0.73 libzstd1==1.4.4+dfsg-3~bpo10+1 linux-base==4.6 linux-image-4.19.0-12-2-amd64-unsigned==4.19.152-1 -linux-libc-dev==4.19.249-2 +linux-libc-dev==4.19.260-1 locales==2.28-10+deb10u1 logrotate==3.14.0-4 lsb-base==10.2019051400 @@ -305,12 +303,12 @@ software-properties-common==0.96.20.2-2 sonic-device-data==1.0-1 sonic-host-services-data==1.0-1 sonic-utilities-data==1.0-1 -sqlite3==3.27.2-3+deb10u1 +sqlite3==3.27.2-3+deb10u2 squashfs-tools==1:4.3-12+deb10u2 sudo==1.8.27-1+deb10u3 swig==3.0.12-2 swig3.0==3.0.12-2 -sx-kernel==1.mlnx.4.5.2262 +sx-kernel==1.mlnx.4.5.2320 sysfsutils==2.1.0+repack-5 systemd==247.3-6~bpo10+1 systemd-sonic-generator==1.0.0 @@ -322,7 +320,7 @@ traceroute==1:2.1.0-2 u-boot-tools==2019.01+dfsg-7 ucf==3.0038+nmu1 udev==247.3-6~bpo10+1 -unzip==6.0-23+deb10u2 +unzip==6.0-23+deb10u3 usb.ids==2019.07.27-0+deb10u1 usbutils==1:010-3 vim==2:8.1.0875-5+deb10u2 @@ -330,4 +328,4 @@ vim-common==2:8.1.0875-5+deb10u2 vim-runtime==2:8.1.0875-5+deb10u2 xxd==2:8.1.0875-5+deb10u2 xz-utils==5.2.4-1+deb10u1 -zlib1g==1:1.2.11.dfsg-1+deb10u1 \ No newline at end of file +zlib1g==1:1.2.11.dfsg-1+deb10u2 \ No newline at end of file diff --git a/files/build/versions/host-image/versions-deb-buster-arm64 b/files/build/versions/host-image/versions-deb-buster-arm64 index 8f0adeed12e2..597a612fb166 100644 --- a/files/build/versions/host-image/versions-deb-buster-arm64 +++ b/files/build/versions/host-image/versions-deb-buster-arm64 @@ -1,35 +1,23 @@ binutils-aarch64-linux-gnu==2.31.1-16 -dirmngr==2.2.12-1+deb10u1 -dpkg-dev==1.19.7 -gnupg==2.2.12-1+deb10u1 -gnupg-l10n==2.2.12-1+deb10u1 -gnupg-utils==2.2.12-1+deb10u1 -gnupg2==2.2.12-1+deb10u1 -gpg==2.2.12-1+deb10u1 -gpg-agent==2.2.12-1+deb10u1 -gpg-wks-client==2.2.12-1+deb10u1 -gpg-wks-server==2.2.12-1+deb10u1 -gpgconf==2.2.12-1+deb10u1 -gpgsm==2.2.12-1+deb10u1 +bzip2==1.0.6-9.2~deb10u1 +curl==7.64.0-4+deb10u2 icu-devtools==63.1-6+deb10u3 libcryptsetup12==2:2.3.7-1+deb11u1~bpo10+1 -libdpkg-perl==1.19.7 +libcurl3-gnutls==7.64.0-4+deb10u2 +libcurl4==7.64.0-4+deb10u2 +libexpat1==2.2.6-2+deb10u4 +libexpat1-dev==2.2.6-2+deb10u4 +libglib2.0-0==2.58.3-2+deb10u3 libicu-dev==63.1-6+deb10u3 libicu63==63.1-6+deb10u3 -libldap-2.4-2==2.4.47+dfsg-3+deb10u6 -libldap-common==2.4.47+dfsg-3+deb10u6 -libssl-dev==1.1.1n-0+deb10u1 -libssl1.1==1.1.1n-0+deb10u1 -libxml2==2.9.4+dfsg1-7+deb10u3 -libxml2-dev==2.9.4+dfsg1-7+deb10u3 +libsqlite3-0==3.27.2-3+deb10u1 +libxml2==2.9.4+dfsg1-7+deb10u4 +libxml2-dev==2.9.4+dfsg1-7+deb10u4 libxslt1-dev==1.1.32-2.2~deb10u1 libxslt1.1==1.1.32-2.2~deb10u1 linux-image-4.19.0-12-2-arm64-unsigned==4.19.152-1 -linux-libc-dev==4.19.235-1 -openssl==1.1.1n-0+deb10u1 +linux-libc-dev==4.19.249-2 pkg-config==0.29-6 -rsyslog==8.1901.0-1+deb10u1 tsingma-bsp==1.0 -tzdata==2021a-0+deb10u5 -xz-utils==5.2.4-1 -zlib1g-dev==1:1.2.11.dfsg-1 \ No newline at end of file +unzip==6.0-23+deb10u2 +zlib1g-dev==1:1.2.11.dfsg-1+deb10u1 \ No newline at end of file diff --git a/files/build/versions/host-image/versions-deb-buster-armhf b/files/build/versions/host-image/versions-deb-buster-armhf index fdf7ab9b15b9..4ffac782fd19 100644 --- a/files/build/versions/host-image/versions-deb-buster-armhf +++ b/files/build/versions/host-image/versions-deb-buster-armhf @@ -1,35 +1,23 @@ binutils-arm-linux-gnueabihf==2.31.1-16 -dirmngr==2.2.12-1+deb10u1 -dpkg-dev==1.19.7 -gnupg==2.2.12-1+deb10u1 -gnupg-l10n==2.2.12-1+deb10u1 -gnupg-utils==2.2.12-1+deb10u1 -gnupg2==2.2.12-1+deb10u1 -gpg==2.2.12-1+deb10u1 -gpg-agent==2.2.12-1+deb10u1 -gpg-wks-client==2.2.12-1+deb10u1 -gpg-wks-server==2.2.12-1+deb10u1 -gpgconf==2.2.12-1+deb10u1 -gpgsm==2.2.12-1+deb10u1 +bzip2==1.0.6-9.2~deb10u1 +curl==7.64.0-4+deb10u2 icu-devtools==63.1-6+deb10u3 libcryptsetup12==2:2.3.7-1+deb11u1~bpo10+1 -libdpkg-perl==1.19.7 +libcurl3-gnutls==7.64.0-4+deb10u2 +libcurl4==7.64.0-4+deb10u2 +libexpat1==2.2.6-2+deb10u4 +libexpat1-dev==2.2.6-2+deb10u4 +libglib2.0-0==2.58.3-2+deb10u3 libicu-dev==63.1-6+deb10u3 libicu63==63.1-6+deb10u3 -libldap-2.4-2==2.4.47+dfsg-3+deb10u6 -libldap-common==2.4.47+dfsg-3+deb10u6 -libssl-dev==1.1.1n-0+deb10u1 -libssl1.1==1.1.1n-0+deb10u1 -libxml2==2.9.4+dfsg1-7+deb10u3 -libxml2-dev==2.9.4+dfsg1-7+deb10u3 +libsqlite3-0==3.27.2-3+deb10u1 +libxml2==2.9.4+dfsg1-7+deb10u4 +libxml2-dev==2.9.4+dfsg1-7+deb10u4 libxslt1-dev==1.1.32-2.2~deb10u1 libxslt1.1==1.1.32-2.2~deb10u1 linux-image-4.19.0-12-2-armmp==4.19.152-1 -linux-libc-dev==4.19.235-1 +linux-libc-dev==4.19.249-2 mrvlprestera==1.0 -openssl==1.1.1n-0+deb10u1 pkg-config==0.29-6 -rsyslog==8.1901.0-1+deb10u1 -tzdata==2021a-0+deb10u5 -xz-utils==5.2.4-1 -zlib1g-dev==1:1.2.11.dfsg-1 \ No newline at end of file +unzip==6.0-23+deb10u2 +zlib1g-dev==1:1.2.11.dfsg-1+deb10u1 \ No newline at end of file diff --git a/files/build/versions/host-image/versions-py3 b/files/build/versions/host-image/versions-py3 index 475ce37ba040..e04877350542 100644 --- a/files/build/versions/host-image/versions-py3 +++ b/files/build/versions/host-image/versions-py3 @@ -2,13 +2,13 @@ azure-common==1.1.28 azure-nspkg==3.0.2 azure-storage==0.36.0 bitarray==1.5.3 -certifi==2022.6.15 +certifi==2022.9.24 cffi==1.15.1 -charset-normalizer==2.1.0 +charset-normalizer==2.1.1 click==7.0 -cryptography==37.0.4 +cryptography==38.0.1 docker==4.3.1 -idna==3.3 +idna==3.4 ijson==2.6.1 ipaddress==1.0.23 j2cli==0.3.10 @@ -23,7 +23,7 @@ netaddr==0.8.0 netifaces==0.11.0 pathtools==0.1.2 pexpect==4.8.0 -psutil==5.9.1 +psutil==5.9.2 ptyprocess==0.7.0 pyang==2.5.3 pyangbind==0.8.1 @@ -32,13 +32,13 @@ pyroute2==0.5.14 python-dateutil==2.8.2 pyyaml==5.4.1 redis==3.5.3 -regex==2022.7.9 +regex==2022.9.13 requests==2.28.1 scapy==2.4.4 six==1.16.0 tabulate==0.8.10 thrift==0.13.0 -urllib3==1.26.10 +urllib3==1.26.12 watchdog==0.10.3 -websocket-client==1.3.3 +websocket-client==1.4.1 xmltodict==0.12.0 \ No newline at end of file diff --git a/files/build_templates/buffers_config.j2 b/files/build_templates/buffers_config.j2 index 2089b0e01ed0..5e6f2a3ca4d1 100644 --- a/files/build_templates/buffers_config.j2 +++ b/files/build_templates/buffers_config.j2 @@ -171,10 +171,6 @@ def {{ defs.generate_pg_profiles_with_extra_lossless_pgs_with_inactive_ports(port_names_active, port_names_extra_queues, port_names_inactive) }}, {% elif defs.generate_pg_profiles_with_inactive_ports is defined %} {{ defs.generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) }}, -{% elif (defs.generate_pg_buffers_with_extra_lossy_pgs is defined) and (port_names_extra_queues != '') %} -{{ defs.generate_pg_buffers_with_extra_lossy_pgs(port_names_active, port_names_extra_queues) }} -{% elif (defs.generate_pg_buffers_with_extra_lossy_pgs_with_inactive_ports is defined) and (port_names_extra_queues != '') %} -{{ defs.generate_pg_buffers_with_extra_lossy_pgs_with_inactive_ports(port_names_active, port_names_extra_queues, port_names_inactive) }} {% elif defs.generate_pg_profils is defined %} {{ defs.generate_pg_profils(port_names_active) }} {% else %} diff --git a/files/build_templates/mux.service.j2 b/files/build_templates/mux.service.j2 index abc04ab30d18..ee1f8ce75389 100644 --- a/files/build_templates/mux.service.j2 +++ b/files/build_templates/mux.service.j2 @@ -14,7 +14,7 @@ ExecStartPre=/usr/local/bin/mark_dhcp_packet.py ExecStartPre=/usr/bin/{{docker_container_name}}.sh start ExecStart=/usr/bin/{{docker_container_name}}.sh wait ExecStop=/usr/bin/{{docker_container_name}}.sh stop -ExecStopPost=/usr/local/bin/write_standby.py +ExecStopPost=/usr/local/bin/write_standby.py --shutdown mux Restart=always RestartSec=30 diff --git a/files/build_templates/per_namespace/bgp.service.j2 b/files/build_templates/per_namespace/bgp.service.j2 index 03fb6285fb43..e9909f037103 100644 --- a/files/build_templates/per_namespace/bgp.service.j2 +++ b/files/build_templates/per_namespace/bgp.service.j2 @@ -15,7 +15,7 @@ User={{ sonicadmin_user }} ExecStartPre=/usr/local/bin/{{docker_container_name}}.sh start{% if multi_instance == 'true' %} %i{% endif %} ExecStart=/usr/local/bin/{{docker_container_name}}.sh wait{% if multi_instance == 'true' %} %i{% endif %} ExecStop=/usr/local/bin/{{docker_container_name}}.sh stop{% if multi_instance == 'true' %} %i{% endif %} -ExecStopPost=/usr/local/bin/write_standby.py +ExecStopPost=/usr/local/bin/write_standby.py --shutdown bgp Restart=always RestartSec=30 diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index c106f7944a36..d234757898d4 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -416,7 +416,7 @@ sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install watchd {% if include_kubernetes == "y" %} # Point to kubelet to /etc/resolv.conf # -echo 'KUBELET_EXTRA_ARGS="--resolv-conf=/etc/resolv.conf"' | sudo tee -a $FILESYSTEM_ROOT/etc/default/kubelet +echo 'KUBELET_EXTRA_ARGS="--resolv-conf=/etc/resolv.conf --cgroup-driver=cgroupfs --node-ip=::"' | sudo tee -a $FILESYSTEM_ROOT/etc/default/kubelet # Copy Flannel conf file into sonic-templates # diff --git a/files/image_config/monit/memory_checker b/files/image_config/monit/memory_checker index dfe270e79524..a93bc30b3fe4 100755 --- a/files/image_config/monit/memory_checker +++ b/files/image_config/monit/memory_checker @@ -96,6 +96,19 @@ def check_memory_usage(container_name, threshold_value): sys.exit(4) +def is_service_active(service_name): + """Test if service is running. + + Args: + service_name: A string contains the service name + + Returns: + True if service is running, False otherwise + """ + status = subprocess.run("systemctl is-active --quiet {}".format(service_name), shell=True, check=False) + return status.returncode == 0 + + def get_running_container_names(): """Retrieves names of running containers by talking to the docker daemon. @@ -128,6 +141,12 @@ def main(): parser.add_argument("threshold_value", type=int, help="threshold value in bytes") args = parser.parse_args() + if not is_service_active("docker"): + syslog.syslog(syslog.LOG_INFO, + "[memory_checker] Exits without checking memory usage of container '{}' since docker daemon is not running!" + .format(args.container_name)) + sys.exit(0) + running_container_names = get_running_container_names() if args.container_name in running_container_names: check_memory_usage(args.container_name, args.threshold_value) diff --git a/files/image_config/warmboot-finalizer/finalize-warmboot.sh b/files/image_config/warmboot-finalizer/finalize-warmboot.sh index 172fd95ab2e9..54f9bfc2aa24 100755 --- a/files/image_config/warmboot-finalizer/finalize-warmboot.sh +++ b/files/image_config/warmboot-finalizer/finalize-warmboot.sh @@ -10,6 +10,7 @@ declare -A RECONCILE_COMPONENTS=( \ ["swss"]="orchagent neighsyncd" \ ["bgp"]="bgp" \ ["nat"]="natsyncd" \ + ["mux"]="linkmgrd" \ ) EXP_STATE="reconciled" diff --git a/files/scripts/arp_update b/files/scripts/arp_update index e7f083e20d27..cd2b13d0cf7c 100755 --- a/files/scripts/arp_update +++ b/files/scripts/arp_update @@ -26,6 +26,7 @@ while /bin/true; do done VLAN=$(echo $ARP_UPDATE_VARS | jq -r '.vlan') + SUBTYPE=$(sonic-db-cli CONFIG_DB hget 'DEVICE_METADATA|localhost' 'subtype' | tr '[:upper:]' '[:lower:]') for vlan in $VLAN; do # generate a list of arping commands: # arping -q -w 0 -c 1 -i ; @@ -47,7 +48,37 @@ while /bin/true; do ndisc6cmd="sed -e 's/^/ndisc6 -q -w 0 -1 /' -e 's/$/;/'" ip6cmd="ip -6 neigh show | grep -v fe80 | grep $vlan | cut -d ' ' -f 1,3 | $ndisc6cmd" eval `eval $ip6cmd` + + if [[ $SUBTYPE == "dualtor" ]]; then + # manually set any remaining FAILED/INCOMPLETE entries to permanently INCOMPLETE + # this prevents any remaining INCOMPLETE entries from automatically transitioning to FAILED + # once these entries are incomplete, any subsequent neighbor advertisement messages + # are able to resolve the entry + + # generates the following command for each failed or incomplete IPv6 neighbor + # ip neigh replace dev nud incomplete + neigh_replace_template="sed -e 's/^/ip neigh replace /' -e 's/,/ dev /' -e 's/$/ nud incomplete;/'" + ip_neigh_replace_cmd="ip -6 neigh show | grep -v fe80 | grep Vlan1000 | grep -E 'FAILED|INCOMPLETE' | cut -d ' ' -f 1,3 --output-delimiter=',' | $neigh_replace_template" + eval `eval $ip_neigh_replace_cmd` + + # on dual ToR devices, try to resolve failed neighbor entries since + # these entries will have tunnel routes installed, preventing normal + # neighbor resolution (SWSS PR #2137) + + # since ndisc6 is a userland process, the above ndisc6 commands are + # insufficient to update the kernel neighbor table for failed entries + + # we don't need to do this for ipv4 neighbors since arping is able to + # update the kernel neighbor table + + # generates the following command for each failed or incomplete IPv6 neighbor + # timeout 0.2 ping -n -q -i 0 -c 1 -W 1 -I >/dev/null + ping6_template="sed -e 's/^/timeout 0.2 ping /' -e 's/,/ -n -q -i 0 -c 1 -W 1 -I /' -e 's/$/ >\/dev\/null;/'" + failed_ip6_neigh_cmd="ip -6 neigh show | grep -v fe80 | grep $vlan | grep -E 'FAILED|INCOMPLETE' | cut -d ' ' -f 1,3 --output-delimiter=',' | $ping6_template" + eval `eval $failed_ip6_neigh_cmd` + fi done + # sleep here before handling the mismatch as it is not required during startup sleep 300 diff --git a/files/scripts/swss.sh b/files/scripts/swss.sh index 48c0f7621566..ceb3a057ae3e 100755 --- a/files/scripts/swss.sh +++ b/files/scripts/swss.sh @@ -1,6 +1,6 @@ #!/bin/bash -DEPENDENT="radv dhcp_relay" +DEPENDENT="radv dhcp_relay bgp" MULTI_INST_DEPENDENT="teamd" function debug() @@ -15,7 +15,7 @@ function lock_service_state_change() exec {LOCKFD}>${LOCKFILE} /usr/bin/flock -x ${LOCKFD} - trap "/usr/bin/flock -u ${LOCKFD}" 0 2 3 15 + trap "/usr/bin/flock -u ${LOCKFD}" EXIT debug "Locked ${LOCKFILE} (${LOCKFD}) from ${SERVICE}$DEV service" } @@ -147,7 +147,7 @@ start() { $SONIC_DB_CLI COUNTERS_DB FLUSHDB $SONIC_DB_CLI FLEX_COUNTER_DB FLUSHDB $SONIC_DB_CLI RESTAPI_DB FLUSHDB - clean_up_tables STATE_DB "'PORT_TABLE*', 'MGMT_PORT_TABLE*', 'VLAN_TABLE*', 'VLAN_MEMBER_TABLE*', 'LAG_TABLE*', 'LAG_MEMBER_TABLE*', 'INTERFACE_TABLE*', 'MIRROR_SESSION*', 'VRF_TABLE*', 'FDB_TABLE*', 'FG_ROUTE_TABLE*', 'BUFFER_POOL*', 'BUFFER_PROFILE*', 'MUX_CABLE_TABLE*', 'ADVERTISE_NETWORK_TABLE*', 'VXLAN_TUNNEL_TABLE*'" + clean_up_tables STATE_DB "'PORT_TABLE*', 'MGMT_PORT_TABLE*', 'VLAN_TABLE*', 'VLAN_MEMBER_TABLE*', 'LAG_TABLE*', 'LAG_MEMBER_TABLE*', 'INTERFACE_TABLE*', 'MIRROR_SESSION*', 'VRF_TABLE*', 'FDB_TABLE*', 'FG_ROUTE_TABLE*', 'BUFFER_POOL*', 'BUFFER_PROFILE*', 'MUX_CABLE_TABLE*', 'ADVERTISE_NETWORK_TABLE*', 'VXLAN_TUNNEL_TABLE*', 'VNET_ROUTE*'" fi # start service docker diff --git a/files/scripts/syncd_common.sh b/files/scripts/syncd_common.sh index 5d75ae841e42..a1566d4e58bc 100755 --- a/files/scripts/syncd_common.sh +++ b/files/scripts/syncd_common.sh @@ -3,11 +3,11 @@ # # common functions used by "syncd" scipts (syncd.sh, gbsyncd.sh, etc..) # scripts using this must provide implementations of the following functions: -# +# # startplatform # waitplatform # stopplatform1 and stopplatform2 -# +# # For examples of these, see gbsyncd.sh and syncd.sh. # @@ -23,7 +23,7 @@ function lock_service_state_change() exec {LOCKFD}>${LOCKFILE} /usr/bin/flock -x ${LOCKFD} - trap "/usr/bin/flock -u ${LOCKFD}" 0 2 3 15 + trap "/usr/bin/flock -u ${LOCKFD}" EXIT debug "Locked ${LOCKFILE} (${LOCKFD}) from ${SERVICE}$DEV service" } diff --git a/files/scripts/write_standby.py b/files/scripts/write_standby.py index 53cf5265ecde..13c5b17ea64e 100755 --- a/files/scripts/write_standby.py +++ b/files/scripts/write_standby.py @@ -1,10 +1,11 @@ #!/usr/bin/env python3 +import argparse import time from sonic_py_common import logger as log -from swsscommon.swsscommon import ConfigDBConnector, DBConnector, FieldValuePairs, ProducerStateTable, SonicV2Connector -from swsscommon.swsscommon import APPL_DB +from swsscommon.swsscommon import ConfigDBConnector, DBConnector, FieldValuePairs, ProducerStateTable, SonicV2Connector, Table +from swsscommon.swsscommon import APPL_DB, STATE_DB logger = log.Logger('write_standby') @@ -19,10 +20,15 @@ class MuxStateWriter(object): Class used to write standby mux state to APP DB """ - def __init__(self): + def __init__(self, activeactive, activestandby, shutdown_module): self.config_db_connector = None self.appl_db_connector = None + self.state_db_connector = None self.asic_db_connector = None + self.default_active_active_state = activeactive + self.default_active_standby_state = activestandby + self.shutdown_module = shutdown_module + self.is_shutdwon = (self.shutdown_module != None) @property def config_db(self): @@ -45,6 +51,16 @@ def appl_db(self): if self.appl_db_connector is None: self.appl_db_connector = DBConnector(APPL_DB, REDIS_SOCK_PATH, True) return self.appl_db_connector + + @property + def state_db(self): + """ + Returns the state DB connector. + Intializes the connector during the first call + """ + if self.state_db_connector is None: + self.state_db_connector = DBConnector(STATE_DB, REDIS_SOCK_PATH, True) + return self.state_db_connector @property def asic_db(self): @@ -75,14 +91,43 @@ def is_dualtor(self): return 'subtype' in metadata and 'dualtor' in metadata['subtype'].lower() - def get_auto_mux_intfs(self): + @property + def is_warmrestart(self): """ - Returns a list of all mux cable interfaces that are configured to auto-switch + Checks if a warmrestart is going on """ + tbl = Table(self.state_db, 'WARM_RESTART_ENABLE_TABLE') + (status, value) = tbl.hget('system', 'enable') + + if status and value == 'true': + return True + + if self.shutdown_module: + (status, value) = tbl.hget(self.shutdown_module, 'enable') + if status and value == 'true': + return True + + return False + + def get_all_mux_intfs_modes(self): + """ + Returns a list of all mux cable interfaces, with suggested modes + Setting mux initial modes is crucial to kick off the statemachines, + have to set the modes for all mux/gRPC ports. + """ + intf_modes = {} all_intfs = self.config_db.get_table('MUX_CABLE') - auto_intfs = [intf for intf, status in all_intfs.items() - if status['state'].lower() == 'auto'] - return auto_intfs + for intf, status in all_intfs.items(): + state = status['state'].lower() + if state in ['active', 'standby']: + intf_modes[intf] = state + elif state in ['auto', 'manual']: + if ('soc_ipv4' in status or 'soc_ipv6' in status or + ('cable_type' in status and status['cable_type'] == 'active-active')): + intf_modes[intf] = self.default_active_active_state + else: + intf_modes[intf] = self.default_active_standby_state + return intf_modes def tunnel_exists(self): """ @@ -117,19 +162,38 @@ def apply_mux_config(self): if not self.is_dualtor: # If not running on a dual ToR system, take no action return - intfs = self.get_auto_mux_intfs() - state = 'standby' + + if self.is_warmrestart and self.is_shutdwon: + # If in warmrestart context, take no action + logger.log_warning("Skip setting mux state due to ongoing warmrestart.") + return + + modes = self.get_all_mux_intfs_modes() if self.wait_for_tunnel(): - logger.log_warning("Applying {} state to interfaces {}".format(state, intfs)) + logger.log_warning("Applying state to interfaces {}".format(modes)) producer_state_table = ProducerStateTable(self.appl_db, 'MUX_CABLE_TABLE') - fvs = create_fvs(state=state) - for intf in intfs: + for intf, state in modes.items(): + fvs = create_fvs(state=state) producer_state_table.set(intf, fvs) else: logger.log_error("Timed out waiting for tunnel {}, mux state will not be written".format(self.tunnel_name)) if __name__ == '__main__': - mux_writer = MuxStateWriter() + parser = argparse.ArgumentParser(description='Write initial mux state') + parser.add_argument('-a', '--active_active', + help='state: intial state for "auto" and/or "manual" config in active-active mode, default "active"', + type=str, required=False, default='active') + parser.add_argument('-s', '--active_standby', + help='state: intial state for "auto" and/or "manual" config in active-standby mode, default "standby"', + type=str, required=False, default='standby') + parser.add_argument('--shutdown', help='write mux state after shutdown other services, supported: mux, bgp', + type=str, required=False, choices=['mux', 'bgp'], default=None) + args = parser.parse_args() + active_active_state = args.active_active + active_standby_state = args.active_standby + if args.shutdown in ['mux', 'bgp']: + active_active_state = "standby" + mux_writer = MuxStateWriter(activeactive=active_active_state, activestandby=active_standby_state, shutdown_module=args.shutdown) mux_writer.apply_mux_config() diff --git a/platform/broadcom/sai.mk b/platform/broadcom/sai.mk index 5efc4d739ee1..80c1698d30e5 100644 --- a/platform/broadcom/sai.mk +++ b/platform/broadcom/sai.mk @@ -1,8 +1,8 @@ -BRCM_SAI = libsaibcm_4.3.5.3-5_amd64.deb -$(BRCM_SAI)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm_4.3.5.3-5_amd64.deb?sv=2020-08-04&st=2022-06-06T04%3A44%3A45Z&se=2037-06-07T04%3A44%3A00Z&sr=b&sp=r&sig=uG51Q6rJrZYNVVuoShw8F4zas1n6zi%2FJ7udpTSZ87M8%3D" -BRCM_SAI_DEV = libsaibcm-dev_4.3.5.3-5_amd64.deb +BRCM_SAI = libsaibcm_4.3.7.1_amd64.deb +$(BRCM_SAI)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm_4.3.7.1_amd64.deb?sv=2020-08-04&st=2022-09-14T09%3A37%3A35Z&se=2037-09-15T09%3A37%3A00Z&sr=b&sp=r&sig=Yb9q50mb5E0A9mAj8DEc7xfc1WHdW1tyqi5OdAjUSec%3D" +BRCM_SAI_DEV = libsaibcm-dev_4.3.7.1_amd64.deb $(eval $(call add_derived_package,$(BRCM_SAI),$(BRCM_SAI_DEV))) -$(BRCM_SAI_DEV)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm-dev_4.3.5.3-5_amd64.deb?sv=2020-08-04&st=2022-06-06T04%3A45%3A06Z&se=2037-06-07T04%3A45%3A00Z&sr=b&sp=r&sig=SF6YOtYzSIcwSR4BRInnimUjbusNp4mPHFunFjm%2Fors%3D" +$(BRCM_SAI_DEV)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm-dev_4.3.7.1_amd64.deb?sv=2020-08-04&st=2022-09-14T09%3A38%3A00Z&se=2037-09-15T09%3A38%3A00Z&sr=b&sp=r&sig=woY1S03ENzUKUG0htzuIaPl%2ByV0dSOm2QsimPDBhGpw%3D" SONIC_ONLINE_DEBS += $(BRCM_SAI) $(BRCM_SAI_DEV)_DEPENDS += $(BRCM_SAI) diff --git a/platform/broadcom/sonic-platform-modules-cel/debian/platform-modules-haliburton.init b/platform/broadcom/sonic-platform-modules-cel/debian/platform-modules-haliburton.init index 07a6542109b5..3f6358bf4ab4 100644 --- a/platform/broadcom/sonic-platform-modules-cel/debian/platform-modules-haliburton.init +++ b/platform/broadcom/sonic-platform-modules-cel/debian/platform-modules-haliburton.init @@ -11,6 +11,26 @@ # Short-Description: Setup Haliburton board. ### END INIT INFO +setup_swap () { + SWAPFILE=/host/myswapfile + + if [ ! -f $SWAPFILE ]; then + availspace=`df -h --output=avail /host | sed '1d;s/\s//g;s/[^0-9].*//g'` + diff=$(( availspace - 2*$1 )) + if [ $diff -gt 0 ]; then + fallocate -l ${1}G $SWAPFILE + chmod 600 $SWAPFILE + echo "swap file created successfully" + else + echo "not enough disk space to turn on swap." + return + fi + fi + mkswap $SWAPFILE + swapon $SWAPFILE + echo "swap on successfully" +} + case "$1" in start) echo -n "Setting up board... " @@ -74,6 +94,8 @@ start) /bin/sh /usr/local/bin/platform_api_mgnt.sh init + setup_swap 2 + echo "done." ;; diff --git a/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/chassis.py b/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/chassis.py index 72f46653d51a..e14ce1ce4ddb 100755 --- a/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/chassis.py +++ b/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/chassis.py @@ -59,17 +59,17 @@ class Chassis(ChassisBase): SYSLED_COLOR_TO_REG = { "green": 0xd0, "yellow": 0xe0, - "flash_green": 0xd2, - "flash_yellow": 0xe2 + "flashing green": 0xd2, + "flashing yellow": 0xe2 } REG_TO_SYSLED_COLOR = { 0xd0 : "green", 0xe0 : "yellow", - 0xd2 : "flash_green", - 0xd1 : "flash_green", - 0xe2 : "flash_yellow", - 0xe1 : "flash_yellow" + 0xd2 : "flashing green", + 0xd1 : "flashing green", + 0xe2 : "flashing yellow", + 0xe1 : "flashing yellow" } _global_port_pres_dict = {} diff --git a/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/sfp.py b/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/sfp.py index a08667a8e71e..c0ee8bdb84f6 100644 --- a/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/sfp.py +++ b/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/sfp.py @@ -70,7 +70,7 @@ SFP_DOM_OFFSET = 256 SFP_STATUS_CONTROL_OFFSET = 110 -SFP_STATUS_CONTROL_WIDTH = 7 +SFP_STATUS_CONTROL_WIDTH = 1 SFP_TX_DISABLE_HARD_BIT = 7 SFP_TX_DISABLE_SOFT_BIT = 6 @@ -912,15 +912,14 @@ def get_rx_los(self): rx_los_list = [] try: if self.sfp_type == 'QSFP_DD': - offset = 512 + offset = 2176 rx_los_mask = [ 0x01, 0x02, 0x04, 0x08 ,0x10, 0x20, 0x40, 0x80 ] dom_channel_monitor_raw = self._read_eeprom_bytes(self.eeprom_path, - offset + QSFP_DD_RXLOS_OFFSET, QSFP_DD_RXLOS_WIDTH) + offset + 147, 1) if dom_channel_monitor_raw is not None: rx_los_data = int(dom_channel_monitor_raw[0], 8) for mask in rx_los_mask: - rx_los_list.append(rx_los_data & mask != 0) - + rx_los_list.append(bool(rx_los_data & mask != 0)) elif self.sfp_type == 'QSFP': rx_los_data = self._get_eeprom_data('rx_los') # As the function expects a single boolean, if any one channel experience LOS, @@ -962,13 +961,19 @@ def get_tx_disable(self): tx_disable_list = [] try: if self.sfp_type == 'QSFP_DD': - return False + dom_channel_monitor_raw = self._read_eeprom_bytes(self.eeprom_path,2048 + 130, 1) + if dom_channel_monitor_raw is not None: + tx_disable_data = int(dom_channel_monitor_raw[0], 16) + for i in range(8): + tx_disable_list.append(bool(tx_disable_data & (1 << i) != 0)) + elif self.sfp_type == 'QSFP': tx_disable_data = self._get_eeprom_data('tx_disable') for tx_disable_id in ('Tx1Disable', 'Tx2Disable', 'Tx3Disable', 'Tx4Disable'): tx_disable_list.append(tx_disable_data['data'][tx_disable_id]['value'] == 'On') else: - tx_disable_data = self._read_eeprom_bytes(self.eeprom_path, SFP_STATUS_CONTROL_OFFSET, SFP_STATUS_CONTROL_WIDTH) + offset = 256 + tx_disable_data = self._read_eeprom_bytes(self.eeprom_path, offset + SFP_STATUS_CONTROL_OFFSET, SFP_STATUS_CONTROL_WIDTH) data = int(tx_disable_data[0], 16) tx_disable_hard = (sffbase().test_bit(data, SFP_TX_DISABLE_HARD_BIT) != 0) tx_disable_soft = (sffbase().test_bit(data, SFP_TX_DISABLE_SOFT_BIT) != 0) @@ -977,19 +982,41 @@ def get_tx_disable(self): return 'N/A' return tx_disable_list + def tx_disable(self, tx_disable): + if self.sfp_type == 'QSFP_DD': + val = 0xff if tx_disable else 0x0 + return self._write_eeprom_bytes(2048 + 130, 1, bytearray([val])) + + elif self.sfp_type == 'QSFP': + val = 0xf if tx_disable else 0x0 + return self._write_eeprom_bytes( 0 + 86, 1, bytearray([val])) + + else: + offset = 256 + if tx_disable is True: + val = 64 + else: + val = 191 + return self._write_eeprom_bytes(offset + SFP_STATUS_CONTROL_OFFSET, SFP_STATUS_CONTROL_WIDTH, bytearray([val])) + def get_tx_disable_channel(self): """ Retrieves the TX disabled channels in this SFP """ - tx_disable_channel = 0 + tx_disable_channel = None try: if self.sfp_type == 'QSFP_DD': - tx_disable_channel = 0 + offset = 2048 + dom_channel_monitor_raw = self._read_eeprom_bytes(self.eeprom_path, offset + 130, 1) + if dom_channel_monitor_raw is not None: + tx_disable_channel = int(dom_channel_monitor_raw[0], 16) elif self.sfp_type == 'QSFP': tx_disable_data = self._get_eeprom_data('tx_disable') for tx_disable_id in ('Tx1Disable', 'Tx2Disable', 'Tx3Disable', 'Tx4Disable'): tx_disable_channel <<= 1 tx_disable_channel |= (tx_disable_data['data']['Tx1Disable']['value'] == 'On') + else: + tx_disable_channel = int(self.get_tx_disable()[0]) except (TypeError, ValueError): return 'N/A' return tx_disable_channel @@ -1091,7 +1118,7 @@ def get_tx_bias(self): return None if not self.qsfp_dd_txbias_supported: for lane in range(0, 8): - tx_bias_list.append("N/A") + tx_bias_list.append(False) return tx_bias_list tx_bias_data_raw = self._read_eeprom_bytes(self.eeprom_path, offset + QSFP_DD_TXBIAS_OFFSET, QSFP_DD_TXBIAS_WIDTH) @@ -1128,7 +1155,7 @@ def get_rx_power(self): return None if not self.qsfp_dd_rxpower_supported: for lane in range(0, 8): - rx_power_list.append("N/A") + rx_power_list.append(False) return rx_power_list offset = QSFP_DD_PAGE17 @@ -1165,7 +1192,7 @@ def get_tx_power(self): return None if not self.qsfp_dd_txpower_supported: for lane in range(0, 8): - tx_power_list.append("N/A") + tx_power_list.append(False) return tx_power_list offset = QSFP_DD_PAGE17 @@ -1293,17 +1320,45 @@ def get_intl_state(self): except ValueError: pass return intl_state - def tx_disable(self, tx_disable): - """ - Disable SFP TX for all channels - """ - return False - def tx_disable_channel(self, channel, disable): """ - Sets the tx_disable for specified SFP channels + Enables/Disables TX channel for SFP based on disable flag """ - return False + channel_state = self.get_tx_disable_channel() + if channel_state is None or channel_state == 'N/A': + return False + if self.sfp_type == 'QSFP_DD': + for i in range(8): + mask = (1 << i) + if not (channel & mask): + continue + if disable: + channel_state |= mask + else: + channel_state &= ~mask + return self._write_eeprom_bytes(2048 + 130, 1, bytearray([channel_state])) + elif self.sfp_type == 'QSFP': + for i in range(4): + mask = (1 << i) + if not (channel & mask): + continue + if disable: + channel_state |= mask + else: + channel_state &= ~mask + return self._write_eeprom_bytes(86, 1, bytearray([channel_state])) + else: + channel_state = self.get_tx_disable_channel() + if channel_state is None or channel_state == "N/A": + return False + offset = 256 + mask = (1 << 0) + if disable: + channel_state |= mask + else: + channel_state &= ~mask + + return self._write_eeprom_bytes(offset + SFP_STATUS_CONTROL_OFFSET, SFP_STATUS_CONTROL_WIDTH, bytearray([channel_state])) def set_power_override(self, power_override, power_set): """ diff --git a/platform/checkout/cisco-8000.ini b/platform/checkout/cisco-8000.ini index dd9bdcd725ef..919f75d112da 100644 --- a/platform/checkout/cisco-8000.ini +++ b/platform/checkout/cisco-8000.ini @@ -1,3 +1,3 @@ [module] repo=git@github.com:Cisco-8000-sonic/platform-cisco-8000.git -ref=202012-v0.102 +ref=202012-v0.117 diff --git a/platform/mellanox/fw.mk b/platform/mellanox/fw.mk index 67a4876fef3e..e7504aa1e91b 100644 --- a/platform/mellanox/fw.mk +++ b/platform/mellanox/fw.mk @@ -11,17 +11,17 @@ else FW_FROM_URL = n endif -MLNX_SPC_FW_VERSION = 13.2010.2262 +MLNX_SPC_FW_VERSION = 13.2010.2320 MLNX_SPC_FW_FILE = fw-SPC-rel-$(subst .,_,$(MLNX_SPC_FW_VERSION))-EVB.mfa $(MLNX_SPC_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH) $(MLNX_SPC_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC_FW_FILE) -MLNX_SPC2_FW_VERSION = 29.2010.2262 +MLNX_SPC2_FW_VERSION = 29.2010.2320 MLNX_SPC2_FW_FILE = fw-SPC2-rel-$(subst .,_,$(MLNX_SPC2_FW_VERSION))-EVB.mfa $(MLNX_SPC2_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH) $(MLNX_SPC2_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC2_FW_FILE) -MLNX_SPC3_FW_VERSION = 30.2010.2262 +MLNX_SPC3_FW_VERSION = 30.2010.2320 MLNX_SPC3_FW_FILE = fw-SPC3-rel-$(subst .,_,$(MLNX_SPC3_FW_VERSION))-EVB.mfa $(MLNX_SPC3_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH) $(MLNX_SPC3_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC3_FW_FILE) diff --git a/platform/mellanox/hw-management.mk b/platform/mellanox/hw-management.mk index 61157329403b..5e9c2e3c2215 100644 --- a/platform/mellanox/hw-management.mk +++ b/platform/mellanox/hw-management.mk @@ -1,6 +1,6 @@ # Mellanox HW Management -MLNX_HW_MANAGEMENT_VERSION = 7.0010.2347 +MLNX_HW_MANAGEMENT_VERSION = 7.0010.2349 export MLNX_HW_MANAGEMENT_VERSION diff --git a/platform/mellanox/hw-management/hw-mgmt b/platform/mellanox/hw-management/hw-mgmt index 3a8787997d7b..67c3b6bd8617 160000 --- a/platform/mellanox/hw-management/hw-mgmt +++ b/platform/mellanox/hw-management/hw-mgmt @@ -1 +1 @@ -Subproject commit 3a8787997d7b0269c144861bfc9e7263c028f6bc +Subproject commit 67c3b6bd8617f4e0a282dab704a5f741088a3dd6 diff --git a/platform/mellanox/mlnx-sai.mk b/platform/mellanox/mlnx-sai.mk index c37b8fcefacd..c8c87a61a723 100644 --- a/platform/mellanox/mlnx-sai.mk +++ b/platform/mellanox/mlnx-sai.mk @@ -1,6 +1,6 @@ # Mellanox SAI -MLNX_SAI_VERSION = SAIRel1.21.2.2 +MLNX_SAI_VERSION = SAIRel1.22.0.0 export MLNX_SAI_VERSION diff --git a/platform/mellanox/mlnx-sai/SAI-Implementation b/platform/mellanox/mlnx-sai/SAI-Implementation index 392c4fc3c5e3..9c4d6af340fc 160000 --- a/platform/mellanox/mlnx-sai/SAI-Implementation +++ b/platform/mellanox/mlnx-sai/SAI-Implementation @@ -1 +1 @@ -Subproject commit 392c4fc3c5e300611cecf42457b832f085088719 +Subproject commit 9c4d6af340fcacfc01f308b261484314cdfce6af diff --git a/platform/mellanox/sdk-src/sx-kernel/Switch-SDK-drivers b/platform/mellanox/sdk-src/sx-kernel/Switch-SDK-drivers index e9fa9a843702..5650c3519b55 160000 --- a/platform/mellanox/sdk-src/sx-kernel/Switch-SDK-drivers +++ b/platform/mellanox/sdk-src/sx-kernel/Switch-SDK-drivers @@ -1 +1 @@ -Subproject commit e9fa9a843702aa55b13c8eb01c7a1f188e4a16a9 +Subproject commit 5650c3519b55051124810a4625f8269694b1e592 diff --git a/platform/mellanox/sdk.mk b/platform/mellanox/sdk.mk index cedcffcd4dc3..439a2e1328ec 100644 --- a/platform/mellanox/sdk.mk +++ b/platform/mellanox/sdk.mk @@ -1,6 +1,6 @@ MLNX_SDK_BASE_PATH = $(PLATFORM_PATH)/sdk-src/sx-kernel/Switch-SDK-drivers/bin/ MLNX_SDK_PKG_BASE_PATH = $(MLNX_SDK_BASE_PATH)/$(BLDENV)/$(CONFIGURED_ARCH)/ -MLNX_SDK_VERSION = 4.5.2262 +MLNX_SDK_VERSION = 4.5.2320 MLNX_SDK_ISSU_VERSION = 101 MLNX_SDK_DEB_VERSION = $(subst -,.,$(subst _,.,$(MLNX_SDK_VERSION))) diff --git a/rules/config b/rules/config index 70ff038e6e63..cc67914a807e 100644 --- a/rules/config +++ b/rules/config @@ -157,9 +157,9 @@ KUBE_DOCKER_PROXY = http://172.16.1.1:3128/ # These are Used *only* when INCLUDE_KUBERNETES=y # NOTE: As a worker node it has to run version compatible to kubernetes master. # -KUBERNETES_VERSION = 1.21.1 +KUBERNETES_VERSION = 1.22.2 KUBERNETES_CNI_VERSION = 0.8.7 -K8s_GCR_IO_PAUSE_VERSION = 3.4.1 +K8s_GCR_IO_PAUSE_VERSION = 3.5 # SONIC_ENABLE_IMAGE_SIGNATURE - enable image signature # To not use the auto-generated self-signed certificate, the required files to sign the image as below: diff --git a/rules/dhcp6relay.dep b/rules/dhcp6relay.dep deleted file mode 100644 index be82d326fe21..000000000000 --- a/rules/dhcp6relay.dep +++ /dev/null @@ -1,9 +0,0 @@ - -SPATH := $($(SONIC_DHCP6RELAY)_SRC_PATH) -DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/dhcp6relay.mk rules/dhcp6relay.dep -DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) -DEP_FILES += $(shell git ls-files $(SPATH)) - -$(SONIC_DHCP6RELAY)_CACHE_MODE := GIT_CONTENT_SHA -$(SONIC_DHCP6RELAY)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) -$(SONIC_DHCP6RELAY)_DEP_FILES := $(DEP_FILES) diff --git a/rules/dhcp6relay.mk b/rules/dhcp6relay.mk deleted file mode 100644 index 204bf6fa34dd..000000000000 --- a/rules/dhcp6relay.mk +++ /dev/null @@ -1,12 +0,0 @@ -# SONiC DHCPV6 RELAY Package - -SONIC_DHCP6RELAY_VERSION = 1.0.0-0 -SONIC_DHCP6RELAY_PKG_NAME = dhcp6relay - -SONIC_DHCP6RELAY = sonic-$(SONIC_DHCP6RELAY_PKG_NAME)_$(SONIC_DHCP6RELAY_VERSION)_$(CONFIGURED_ARCH).deb -$(SONIC_DHCP6RELAY)_DEPENDS = $(LIBSWSSCOMMON) $(LIBHIREDIS) $(LIBSWSSCOMMON_DEV) $(LIBHIREDIS_DEV) -$(SONIC_DHCP6RELAY)_SRC_PATH = $(SRC_PATH)/$(SONIC_DHCP6RELAY_PKG_NAME) -SONIC_DPKG_DEBS += $(SONIC_DHCP6RELAY) - -SONIC_DHCP6RELAY_DBG = sonic-$(SONIC_DHCP6RELAY_PKG_NAME)-dbgsym_$(SONIC_DHCP6RELAY_VERSION)_$(CONFIGURED_ARCH).deb -$(eval $(call add_derived_package,$(SONIC_DHCP6RELAY),$(SONIC_DHCP6RELAY_DBG))) diff --git a/rules/dhcpmon.mk b/rules/dhcpmon.mk index 3f8f5e139bce..8f9d6403a677 100644 --- a/rules/dhcpmon.mk +++ b/rules/dhcpmon.mk @@ -4,6 +4,7 @@ SONIC_DHCPMON_VERSION = 1.0.0-0 SONIC_DHCPMON_PKG_NAME = dhcpmon SONIC_DHCPMON = sonic-$(SONIC_DHCPMON_PKG_NAME)_$(SONIC_DHCPMON_VERSION)_$(CONFIGURED_ARCH).deb +$(SONIC_DHCPMON)_DEPENDS = $(LIBSWSSCOMMON) $(LIBHIREDIS) $(LIBSWSSCOMMON_DEV) $(LIBHIREDIS_DEV) $(SONIC_DHCPMON)_SRC_PATH = $(SRC_PATH)/$(SONIC_DHCPMON_PKG_NAME) SONIC_DPKG_DEBS += $(SONIC_DHCPMON) diff --git a/rules/dhcprelay.dep b/rules/dhcprelay.dep new file mode 100644 index 000000000000..5f6d77a84fc3 --- /dev/null +++ b/rules/dhcprelay.dep @@ -0,0 +1,11 @@ + +SPATH := $($(SONIC_DHCPRELAY)_SRC_PATH) +DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/dhcprelay.mk rules/dhcprelay.dep +DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) +SMDEP_FILES := $(addprefix $(SPATH)/,$(shell cd $(SPATH) && git ls-files)) + +$(SONIC_DHCPRELAY)_CACHE_MODE := GIT_CONTENT_SHA +$(SONIC_DHCPRELAY)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) +$(SONIC_DHCPRELAY)_DEP_FILES := $(DEP_FILES) +$(SONIC_DHCPRELAY)_SMDEP_FILES := $(SMDEP_FILES) +$(SONIC_DHCPRELAY)_SMDEP_PATHS := $(SPATH) diff --git a/rules/dhcprelay.mk b/rules/dhcprelay.mk new file mode 100644 index 000000000000..0a32d7d54297 --- /dev/null +++ b/rules/dhcprelay.mk @@ -0,0 +1,12 @@ +# SONiC DHCPV6 RELAY Package + +SONIC_DHCPRELAY_VERSION = 1.0.0-0 +SONIC_DHCPRELAY_PKG_NAME = dhcp6relay + +SONIC_DHCPRELAY = sonic-$(SONIC_DHCPRELAY_PKG_NAME)_$(SONIC_DHCPRELAY_VERSION)_$(CONFIGURED_ARCH).deb +$(SONIC_DHCPRELAY)_DEPENDS = $(LIBSWSSCOMMON) $(LIBHIREDIS) $(LIBSWSSCOMMON_DEV) $(LIBHIREDIS_DEV) +$(SONIC_DHCPRELAY)_SRC_PATH = $(SRC_PATH)/dhcprelay +SONIC_DPKG_DEBS += $(SONIC_DHCPRELAY) + +SONIC_DHCPRELAY_DBG = sonic-$(SONIC_DHCPRELAY_PKG_NAME)-dbgsym_$(SONIC_DHCPRELAY_VERSION)_$(CONFIGURED_ARCH).deb +$(eval $(call add_derived_package,$(SONIC_DHCPRELAY),$(SONIC_DHCPRELAY_DBG))) diff --git a/rules/docker-dhcp-relay.mk b/rules/docker-dhcp-relay.mk index 2ade8d641a02..3ecfb5195e2b 100644 --- a/rules/docker-dhcp-relay.mk +++ b/rules/docker-dhcp-relay.mk @@ -6,10 +6,10 @@ DOCKER_DHCP_RELAY_DBG = $(DOCKER_DHCP_RELAY_STEM)-$(DBG_IMAGE_MARK).gz $(DOCKER_DHCP_RELAY)_PATH = $(DOCKERS_PATH)/$(DOCKER_DHCP_RELAY_STEM) -$(DOCKER_DHCP_RELAY)_DEPENDS += $(ISC_DHCP_RELAY) $(SONIC_DHCPMON) $(SONIC_DHCP6RELAY) $(LIBSWSSCOMMON) +$(DOCKER_DHCP_RELAY)_DEPENDS += $(ISC_DHCP_RELAY) $(SONIC_DHCPMON) $(SONIC_DHCPRELAY) $(LIBSWSSCOMMON) $(DOCKER_DHCP_RELAY)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_DEPENDS) -$(DOCKER_DHCP_RELAY)_DBG_DEPENDS += $(ISC_DHCP_RELAY_DBG) $(SONIC_DHCP6RELAY_DBG) $(SONIC_DHCPMON_DBG) +$(DOCKER_DHCP_RELAY)_DBG_DEPENDS += $(ISC_DHCP_RELAY_DBG) $(SONIC_DHCPRELAY_DBG) $(SONIC_DHCPMON_DBG) $(DOCKER_DHCP_RELAY)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_PACKAGES) diff --git a/src/dhcp6relay/.gitignore b/src/dhcp6relay/.gitignore deleted file mode 100644 index 9d09ae6b3f1a..000000000000 --- a/src/dhcp6relay/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -debian/* -!debian/changelog -!debian/compat -!debian/control -!debian/rules diff --git a/src/dhcp6relay/Makefile b/src/dhcp6relay/Makefile deleted file mode 100644 index dd384452a5fc..000000000000 --- a/src/dhcp6relay/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -RM := rm -rf -DHCP6RELAY_TARGET := dhcp6relay -CP := cp -MKDIR := mkdir -CC := g++ -MV := mv -LIBS := -levent -lhiredis -lswsscommon -pthread -lboost_thread -lboost_system -CFLAGS += -Wall -std=c++17 -fPIE -I$(PWD)/../sonic-swss-common/common -PWD := $(shell pwd) - -ifneq ($(MAKECMDGOALS),clean) -ifneq ($(strip $(C_DEPS)),) --include $(C_DEPS) $(OBJS) -endif -endif - --include src/subdir.mk - -all: sonic-dhcp6relay - -sonic-dhcp6relay: $(OBJS) - @echo 'Building target: $@' - @echo 'Invoking: G++ Linker' - $(CC) $(LDFLAGS) -o $(DHCP6RELAY_TARGET) $(OBJS) $(LIBS) - @echo 'Finished building target: $@' - @echo ' ' - -install: - $(MKDIR) -p $(DESTDIR)/usr/sbin - $(MV) $(DHCP6RELAY_TARGET) $(DESTDIR)/usr/sbin - -deinstall: - $(RM) $(DESTDIR)/usr/sbin/$(DHCP6RELAY_TARGET) - $(RM) -rf $(DESTDIR)/usr/sbin - -clean: - -$(RM) $(EXECUTABLES) $(C_DEPS) $(OBJS) $(DHCP6RELAY_TARGET) - -@echo ' ' - -.PHONY: all clean dependents - - diff --git a/src/dhcp6relay/debian/changelog b/src/dhcp6relay/debian/changelog deleted file mode 100644 index 67ed277049e5..000000000000 --- a/src/dhcp6relay/debian/changelog +++ /dev/null @@ -1,5 +0,0 @@ -sonic-dhcp6relay (1.0.0-0) UNRELEASED; urgency=medium - - * Initial release. - --- Kelly Yeh diff --git a/src/dhcp6relay/debian/compat b/src/dhcp6relay/debian/compat deleted file mode 100644 index ec635144f600..000000000000 --- a/src/dhcp6relay/debian/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/src/dhcp6relay/debian/control b/src/dhcp6relay/debian/control deleted file mode 100644 index 31fdb6f41f3b..000000000000 --- a/src/dhcp6relay/debian/control +++ /dev/null @@ -1,17 +0,0 @@ -Source: sonic-dhcp6relay -Section: devel -Priority: optional -Maintainer: Kelly Yeh -Build-Depends: debhelper (>= 8.0.0), - dh-systemd -Standards-Version: 3.9.3 -Homepage: https://github.com/Azure/sonic-buildimage -XS-Go-Import-Path: github.com/Azure/sonic-buildimage - -Package: sonic-dhcp6relay -Architecture: any -Built-Using: ${misc:Built-Using} -Depends: libevent-2.1-6, - libboost-thread1.71.0, - libboost-system1.71.0 -Description: SONiC DHCPv6 Relay diff --git a/src/dhcp6relay/debian/rules b/src/dhcp6relay/debian/rules deleted file mode 100755 index ac2cd63889ef..000000000000 --- a/src/dhcp6relay/debian/rules +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/make -f - -export DEB_BUILD_MAINT_OPTIONS=hardening=+all - -%: - dh $@ --parallel diff --git a/src/dhcp6relay/src/configInterface.cpp b/src/dhcp6relay/src/configInterface.cpp deleted file mode 100644 index ca78d80e63da..000000000000 --- a/src/dhcp6relay/src/configInterface.cpp +++ /dev/null @@ -1,152 +0,0 @@ -#include -#include -#include -#include "configInterface.h" - -constexpr auto DEFAULT_TIMEOUT_MSEC = 1000; - -bool pollSwssNotifcation = true; -std::shared_ptr mSwssThreadPtr; - -std::shared_ptr configDbPtr = std::make_shared ("CONFIG_DB", 0); -swss::SubscriberStateTable ipHelpersTable(configDbPtr.get(), "DHCP_RELAY"); -swss::Select swssSelect; - -/** - * @code void initialize_swss() - * - * @brief initialize DB tables and start SWSS listening thread - * - * @return none - */ -void initialize_swss(std::vector *vlans) -{ - try { - swssSelect.addSelectable(&ipHelpersTable); - get_dhcp(vlans); - mSwssThreadPtr = std::make_shared (&handleSwssNotification, vlans); - } - catch (const std::bad_alloc &e) { - syslog(LOG_ERR, "Failed allocate memory. Exception details: %s", e.what()); - } -} - -/** - * @code void deinitialize_swss() - * - * @brief deinitialize DB interface and join SWSS listening thread - * - * @return none - */ -void deinitialize_swss() -{ - stopSwssNotificationPoll(); - mSwssThreadPtr->interrupt(); -} - - -/** - * @code void get_dhcp(std::vector *vlans) - * - * @brief initialize and get vlan table information from DHCP_RELAY - * - * @return none - */ -void get_dhcp(std::vector *vlans) { - swss::Selectable *selectable; - int ret = swssSelect.select(&selectable, DEFAULT_TIMEOUT_MSEC); - if (ret == swss::Select::ERROR) { - syslog(LOG_WARNING, "Select: returned ERROR"); - } else if (ret == swss::Select::TIMEOUT) { - } - if (selectable == static_cast (&ipHelpersTable)) { - handleRelayNotification(ipHelpersTable, vlans); - } -} -/** - * @code void handleSwssNotification(std::vector *vlans) - * - * @brief main thread for handling SWSS notification - * - * @param context list of vlans/argument config that contains strings of server and option - * - * @return none - */ -void handleSwssNotification(std::vector *vlans) -{ - while (pollSwssNotifcation) { - get_dhcp(vlans); - } -} - -/** - * @code void handleRelayNotification(swss::SubscriberStateTable &ipHelpersTable, std::vector *vlans) - * - * @brief handles DHCPv6 relay configuration change notification - * - * @param ipHelpersTable DHCP table - * @param vlans list of vlans/argument config that contains strings of server and option - * - * @return none - */ -void handleRelayNotification(swss::SubscriberStateTable &ipHelpersTable, std::vector *vlans) -{ - std::deque entries; - - ipHelpersTable.pops(entries); - processRelayNotification(entries, vlans); -} - -/** - * @code void processRelayNotification(std::deque &entries, std::vector *vlans) - * - * @brief process DHCPv6 relay servers and options configuration change notification - * - * @param entries queue of std::tuple> entries in DHCP table - * @param vlans list of vlans/argument config that contains strings of server and option - * - * @return none - */ -void processRelayNotification(std::deque &entries, std::vector *vlans) -{ - std::vector servers; - - for (auto &entry: entries) { - std::string vlan = kfvKey(entry); - std::string operation = kfvOp(entry); - std::vector fieldValues = kfvFieldsValues(entry); - - relay_config intf; - intf.is_option_79 = true; - intf.interface = vlan; - intf.db = nullptr; - for (auto &fieldValue: fieldValues) { - std::string f = fvField(fieldValue); - std::string v = fvValue(fieldValue); - if(f == "dhcpv6_servers") { - std::stringstream ss(v); - while (ss.good()) { - std::string substr; - getline(ss, substr, ','); - intf.servers.push_back(substr); - } - syslog(LOG_DEBUG, "key: %s, Operation: %s, f: %s, v: %s", vlan.c_str(), operation.c_str(), f.c_str(), v.c_str()); - } - if(f == "dhcpv6_option|rfc6939_support" && v == "false") { - intf.is_option_79 = false; - } - } - vlans->push_back(intf); - } -} - -/** -*@code stopSwssNotificationPoll -* -*@brief stop SWSS listening thread -* -*@return none -*/ -void stopSwssNotificationPoll() { - pollSwssNotifcation = false; -}; diff --git a/src/dhcp6relay/src/configInterface.h b/src/dhcp6relay/src/configInterface.h deleted file mode 100644 index 20b0912c5cef..000000000000 --- a/src/dhcp6relay/src/configInterface.h +++ /dev/null @@ -1,75 +0,0 @@ -#include -#include "subscriberstatetable.h" -#include "select.h" -#include "relay.h" - -/** - * @code void initialize_swss() - * - * @brief initialize DB tables and start SWSS listening thread - * - * @return none - */ -void initialize_swss(std::vector *vlans); - -/** - * @code void deinitialize_swss() - * - * @brief deinitialize DB interface and join SWSS listening thread - * - * @return none - */ -void deinitialize_swss(); - -/** - * @code void get_dhcp(std::vector *vlans) - * - * @brief initialize and get vlan information from DHCP_RELAY - * - * @return none - */ -void get_dhcp(std::vector *vlans); - -/** - * @code void handleSwssNotification(std::vector *vlans) - * - * @brief main thread for handling SWSS notification - * - * @param vlans list of vlans/argument config that contains strings of server and option - * - * @return none - */ -void handleSwssNotification(std::vector *vlans); - -/** - * @code void handleRelayNotification(swss::SubscriberStateTable &ipHelpersTable, std::vector *vlans) - * - * @brief handles DHCPv6 relay configuration change notification - * - * @param ipHelpersTable DHCP table - * @param vlans list of vlans/argument config that contains strings of server and option - * - * @return none - */ -void handleRelayNotification(swss::SubscriberStateTable &configMuxTable, std::vector *vlans); - -/** - * @code void processRelayNotification(std::deque &entries, std::vector *vlans) - * - * @brief process DHCPv6 relay servers and options configuration change notification - * - * @param entries queue of std::tuple> entries in DHCP table - * @param context list of vlans/argument config that contains strings of server and option - * - * @return none - */ -void processRelayNotification(std::deque &entries, std::vector *vlans); - -/** -*@code stopSwssNotificationPoll -* -*@brief stop SWSS listening thread -* -*@return none -*/ -void stopSwssNotificationPoll(); diff --git a/src/dhcp6relay/src/main.cpp b/src/dhcp6relay/src/main.cpp deleted file mode 100644 index 9f5bc74bcfa0..000000000000 --- a/src/dhcp6relay/src/main.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#include -#include -#include "configInterface.h" - -int main(int argc, char *argv[]) { - try { - std::vector vlans; - swss::DBConnector state_db("STATE_DB", 0); - initialize_swss(&vlans); - loop_relay(&vlans, &state_db); - } - catch (std::exception &e) - { - syslog(LOG_ERR, "An exception occurred.\n"); - return 1; - } - return 0; -} diff --git a/src/dhcp6relay/src/relay.cpp b/src/dhcp6relay/src/relay.cpp deleted file mode 100644 index 08cec458c74d..000000000000 --- a/src/dhcp6relay/src/relay.cpp +++ /dev/null @@ -1,861 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -#include "configdb.h" -#include "sonicv2connector.h" -#include "dbconnector.h" -#include "configInterface.h" - - -struct event *listen_event; -struct event *server_listen_event; -struct event_base *base; -struct event *ev_sigint; -struct event *ev_sigterm; -static std::string counter_table = "DHCPv6_COUNTER_TABLE|"; - -/* DHCPv6 filter */ -/* sudo tcpdump -dd "ip6 dst ff02::1:2 && udp dst port 547" */ - -static struct sock_filter ether_relay_filter[] = { - - { 0x28, 0, 0, 0x0000000c }, - { 0x15, 0, 13, 0x000086dd }, - { 0x20, 0, 0, 0x00000026 }, - { 0x15, 0, 11, 0xff020000 }, - { 0x20, 0, 0, 0x0000002a }, - { 0x15, 0, 9, 0x00000000 }, - { 0x20, 0, 0, 0x0000002e }, - { 0x15, 0, 7, 0x00000000 }, - { 0x20, 0, 0, 0x00000032 }, - { 0x15, 0, 5, 0x00010002 }, - { 0x30, 0, 0, 0x00000014 }, - { 0x15, 0, 3, 0x00000011 }, - { 0x28, 0, 0, 0x00000038 }, - { 0x15, 0, 1, 0x00000223 }, - { 0x6, 0, 0, 0x00040000 }, - { 0x6, 0, 0, 0x00000000 }, -}; -const struct sock_fprog ether_relay_fprog = { - lengthof(ether_relay_filter), - ether_relay_filter -}; - -/* DHCPv6 Counter */ -uint64_t counters[DHCPv6_MESSAGE_TYPE_COUNT]; -std::map counterMap = {{DHCPv6_MESSAGE_TYPE_UNKNOWN, "Unknown"}, - {DHCPv6_MESSAGE_TYPE_SOLICIT, "Solicit"}, - {DHCPv6_MESSAGE_TYPE_ADVERTISE, "Advertise"}, - {DHCPv6_MESSAGE_TYPE_REQUEST, "Request"}, - {DHCPv6_MESSAGE_TYPE_CONFIRM, "Confirm"}, - {DHCPv6_MESSAGE_TYPE_RENEW, "Renew"}, - {DHCPv6_MESSAGE_TYPE_REBIND, "Rebind"}, - {DHCPv6_MESSAGE_TYPE_REPLY, "Reply"}, - {DHCPv6_MESSAGE_TYPE_RELEASE, "Release"}, - {DHCPv6_MESSAGE_TYPE_DECLINE, "Decline"}, - {DHCPv6_MESSAGE_TYPE_RECONFIGURE, "Reconfigure"}, - {DHCPv6_MESSAGE_TYPE_INFORMATION_REQUEST, "Information-Request"}, - {DHCPv6_MESSAGE_TYPE_RELAY_FORW, "Relay-Forward"}, - {DHCPv6_MESSAGE_TYPE_RELAY_REPL, "Relay-Reply"}, - {DHCPv6_MESSAGE_TYPE_MALFORMED, "Malformed"}}; - -/** - * @code void initialize_counter(swss::DBConnector *db, std::string counterVlan); - * - * @brief initialize the counter by each Vlan - * - * @param swss::DBConnector *db state_db connector - * @param counterVlan counter table with interface name - * - * @return none - */ -void initialize_counter(swss::DBConnector *db, std::string counterVlan) { - db->hset(counterVlan, "Unknown", toString(counters[DHCPv6_MESSAGE_TYPE_UNKNOWN])); - db->hset(counterVlan, "Solicit", toString(counters[DHCPv6_MESSAGE_TYPE_SOLICIT])); - db->hset(counterVlan, "Advertise", toString(counters[DHCPv6_MESSAGE_TYPE_ADVERTISE])); - db->hset(counterVlan, "Request", toString(counters[DHCPv6_MESSAGE_TYPE_REQUEST])); - db->hset(counterVlan, "Confirm", toString(counters[DHCPv6_MESSAGE_TYPE_CONFIRM])); - db->hset(counterVlan, "Renew", toString(counters[DHCPv6_MESSAGE_TYPE_RENEW])); - db->hset(counterVlan, "Rebind", toString(counters[DHCPv6_MESSAGE_TYPE_REBIND])); - db->hset(counterVlan, "Reply", toString(counters[DHCPv6_MESSAGE_TYPE_REPLY])); - db->hset(counterVlan, "Release", toString(counters[DHCPv6_MESSAGE_TYPE_RELEASE])); - db->hset(counterVlan, "Decline", toString(counters[DHCPv6_MESSAGE_TYPE_DECLINE])); - db->hset(counterVlan, "Reconfigure", toString(counters[DHCPv6_MESSAGE_TYPE_RECONFIGURE])); - db->hset(counterVlan, "Information-Request", toString(counters[DHCPv6_MESSAGE_TYPE_INFORMATION_REQUEST])); - db->hset(counterVlan, "Relay-Forward", toString(counters[DHCPv6_MESSAGE_TYPE_RELAY_FORW])); - db->hset(counterVlan, "Relay-Reply", toString(counters[DHCPv6_MESSAGE_TYPE_RELAY_REPL])); - db->hset(counterVlan, "Malformed", toString(counters[DHCPv6_MESSAGE_TYPE_MALFORMED])); -} - -/** - * @code void update_counter(swss::DBConnector *db, std::string CounterVlan, uint8_t msg_type); - * - * @brief update the counter in state_db with count of each DHCPv6 message type - * - * @param swss::DBConnector *db state_db connector - * @param counterVlan counter table with interface name - * @param msg_type dhcpv6 message type to be updated in counter - * - * @return none - */ -void update_counter(swss::DBConnector *db, std::string counterVlan, uint8_t msg_type) { - db->hset(counterVlan, counterMap.find(msg_type)->second, toString(counters[msg_type])); -} - -/** - * @code std::string toString(uint16_t count); - * - * @brief convert uint16_t to string - * - * @param count count of messages in counter - * - * @return count in string - */ -std::string toString(uint16_t count) { - std::stringstream ss; - ss << count; - std::string countValue = ss.str(); - return countValue; -} - -/** - * @code const struct ether_header *parse_ether_frame(const uint8_t *buffer, const uint8_t **out_end); - * - * @brief parse through ethernet frame - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return ether_header end of ethernet header position - */ -const struct ether_header *parse_ether_frame(const uint8_t *buffer, const uint8_t **out_end) { - (*out_end) = buffer + sizeof(struct ether_header); - return (const struct ether_header *)buffer; -} - -/** - * @code const struct ip6_hdr *parse_ip6_hdr(const uint8_t *buffer, const uint8_t **out_end); - * - * @brief parse through ipv6 header - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return ip6_hdr end of ipv6 header position - */ -const struct ip6_hdr *parse_ip6_hdr(const uint8_t *buffer, const uint8_t **out_end) { - (*out_end) = buffer + sizeof(struct ip6_hdr); - return (struct ip6_hdr *)buffer; -} - -/** - * @code const struct udphdr *parse_udp(const uint8_t *buffer, const uint8_t **out_end); - * - * @brief parse through udp header - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return udphdr end of udp header position - */ -const struct udphdr *parse_udp(const uint8_t *buffer, const uint8_t **out_end) { - (*out_end) = buffer + sizeof(struct udphdr); - return (const struct udphdr *)buffer; -} - -/** - * @code const struct dhcpv6_msg *parse_dhcpv6_hdr(const uint8_t *buffer); - * - * @brief parse through dhcpv6 header - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return dhcpv6_msg end of dhcpv6 header position - */ -const struct dhcpv6_msg *parse_dhcpv6_hdr(const uint8_t *buffer) { - return (const struct dhcpv6_msg *)buffer; -} - -/** - * @code const struct dhcpv6_relay_msg *parse_dhcpv6_relay(const uint8_t *buffer); - * - * @brief parse through dhcpv6 relay message - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return dhcpv6_relay_msg start of dhcpv6 relay message or end of dhcpv6 message type position - */ -const struct dhcpv6_relay_msg *parse_dhcpv6_relay(const uint8_t *buffer) { - return (const struct dhcpv6_relay_msg *)buffer; -} - -/** - * @code const struct dhcpv6_option *parse_dhcpv6_opt(const uint8_t *buffer, const uint8_t **out_end); - * - * @brief parse through dhcpv6 option - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return dhcpv6_option end of dhcpv6 message option - */ -const struct dhcpv6_option *parse_dhcpv6_opt(const uint8_t *buffer, const uint8_t **out_end) { - auto option = (const struct dhcpv6_option *)buffer; - uint8_t size = 4; // option-code + option-len - size += *(uint16_t *)(buffer); - (*out_end) = buffer + size + ntohs(option->option_length); - - return option; -} - -/** - * @code void send_udp(int sock, uint8_t *buffer, struct sockaddr_in6 target, uint32_t n, relay_config *config, uint8_t msg_type); - * - * @brief send udp packet - * - * @param *buffer message buffer - * @param sockaddr_in6 target target socket - * @param n length of message - * @param relay_config *config pointer to relay_config - * @param uint8_t msg_type message type of dhcpv6 option of relayed message - * - * @return dhcpv6_option end of dhcpv6 message option - */ -void send_udp(int sock, uint8_t *buffer, struct sockaddr_in6 target, uint32_t n, relay_config *config, uint8_t msg_type) { - std::string counterVlan = counter_table; - if(sendto(sock, buffer, n, 0, (const struct sockaddr *)&target, sizeof(target)) == -1) - syslog(LOG_ERR, "sendto: Failed to send to target address\n"); - else if (counterMap.find(msg_type) != counterMap.end()) { - counters[msg_type]++; - update_counter(config->db, counterVlan.append(config->interface), msg_type); - } else { - syslog(LOG_WARNING, "unexpected message type %d(0x%x)\n", msg_type, msg_type); - } -} - -/** - * @code relay_forward(uint8_t *buffer, const struct dhcpv6_msg *msg, uint16_t msg_length); - * - * @brief embed the DHCPv6 message received into DHCPv6 relay forward message - * - * @param buffer pointer to buffer - * @param msg pointer to parsed DHCPv6 message - * @param msg_length length of DHCPv6 message - * - * @return none - */ -void relay_forward(uint8_t *buffer, const struct dhcpv6_msg *msg, uint16_t msg_length) { - struct dhcpv6_option option; - option.option_code = htons(OPTION_RELAY_MSG); - option.option_length = htons(msg_length); - memcpy(buffer, &option, sizeof(struct dhcpv6_option)); - memcpy(buffer + sizeof(struct dhcpv6_option), msg, msg_length); -} - -/** - * @code sock_open(int ifindex, const struct sock_fprog *fprog); - * - * @brief prepare L2 socket to attach to "udp and port 547" filter - * - * @param ifindex interface index - * @param fprog bpf filter "udp and port 547" - * - * @return socket descriptor - */ -int sock_open(int ifindex, const struct sock_fprog *fprog) -{ - if (!ifindex) { - errno = EINVAL; - return -1; - } - - int s = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); - if (s == -1) { - syslog(LOG_ERR, "socket: Failed to create socket\n"); - return -1; - } - - struct sockaddr_ll sll = { - .sll_family = AF_PACKET, - .sll_protocol = htons(ETH_P_ALL), - .sll_ifindex = ifindex - }; - - if (bind(s, (struct sockaddr *)&sll, sizeof sll) == -1) { - syslog(LOG_ERR, "bind: Failed to bind to specified interface\n"); - (void) close(s); - return -1; - } - - if (fprog && setsockopt(s, SOL_SOCKET, SO_ATTACH_FILTER, fprog, sizeof *fprog) == -1) - { - syslog(LOG_ERR, "setsockopt: Failed to attach filter\n"); - (void) close(s); - return -1; - } - - return s; -} - -/** - * @code prepare_relay_config(relay_config *interface_config, int local_sock, int filter); - * - * @brief prepare for specified relay interface config: server and link address - * - * @param interface_config pointer to relay config to be prepared - * @param local_sock L3 socket used for relaying messages - * @param filter socket attached with filter - * - * @return none - */ -void prepare_relay_config(relay_config *interface_config, int *local_sock, int filter) { - struct ifaddrs *ifa, *ifa_tmp; - sockaddr_in6 non_link_local; - sockaddr_in6 link_local; - - interface_config->local_sock = *local_sock; - interface_config->filter = filter; - - for(auto server: interface_config->servers) { - sockaddr_in6 tmp; - if(inet_pton(AF_INET6, server.c_str(), &tmp.sin6_addr) != 1) - { - syslog(LOG_WARNING, "inet_pton: Failed to convert IPv6 address\n"); - } - tmp.sin6_family = AF_INET6; - tmp.sin6_flowinfo = 0; - tmp.sin6_port = htons(RELAY_PORT); - tmp.sin6_scope_id = 0; - interface_config->servers_sock.push_back(tmp); - } - - if (getifaddrs(&ifa) == -1) { - syslog(LOG_WARNING, "getifaddrs: Unable to get network interfaces\n"); - exit(1); - } - - ifa_tmp = ifa; - while (ifa_tmp) { - if (ifa_tmp->ifa_addr && ifa_tmp->ifa_addr->sa_family == AF_INET6) { - struct sockaddr_in6 *in6 = (struct sockaddr_in6*) ifa_tmp->ifa_addr; - if((strcmp(ifa_tmp->ifa_name, interface_config->interface.c_str()) == 0) && !IN6_IS_ADDR_LINKLOCAL(&in6->sin6_addr)) { - non_link_local = *in6; - break; - } - if((strcmp(ifa_tmp->ifa_name, interface_config->interface.c_str()) == 0) && IN6_IS_ADDR_LINKLOCAL(&in6->sin6_addr)) { - link_local = *in6; - } - } - ifa_tmp = ifa_tmp->ifa_next; - } - freeifaddrs(ifa); - - if(!IN6_IS_ADDR_LINKLOCAL(&non_link_local.sin6_addr)) { - interface_config->link_address = non_link_local; - } - else { - interface_config->link_address = link_local; - } -} - -/** - * @code prepare_socket(int *local_sock, int *server_sock, relay_config *config, int index); - * - * @brief prepare L3 socket for sending - * - * @param local_sock pointer to socket binded to global address for relaying client message to server and listening for server message - * @param server_sock pointer to socket binded to link_local address for relaying server message to client - * @param index scope id of interface - * - * @return none - */ -void prepare_socket(int *local_sock, int *server_sock, relay_config *config, int index) { - struct ifaddrs *ifa, *ifa_tmp; - sockaddr_in6 addr; - sockaddr_in6 ll_addr; - memset(&addr, 0, sizeof(addr)); - memset(&ll_addr, 0, sizeof(ll_addr)); - - if ((*local_sock = socket(AF_INET6, SOCK_DGRAM, 0)) == -1) { - syslog(LOG_ERR, "socket: Failed to create socket on interface %s\n", config->interface.c_str()); - } - - if ((*server_sock= socket(AF_INET6, SOCK_DGRAM, 0)) == -1) { - syslog(LOG_ERR, "socket: Failed to create socket on interface %s\n", config->interface.c_str()); - } - - int retry = 0; - bool bind_addr = false; - bool bind_ll_addr = false; - do { - if (getifaddrs(&ifa) == -1) { - syslog(LOG_WARNING, "getifaddrs: Unable to get network interfaces with %s\n", strerror(errno)); - } - else { - ifa_tmp = ifa; - while (ifa_tmp) { - if (ifa_tmp->ifa_addr && (ifa_tmp->ifa_addr->sa_family == AF_INET6) && (strcmp(ifa_tmp->ifa_name, config->interface.c_str()) == 0)) { - struct sockaddr_in6 *in6 = (struct sockaddr_in6*) ifa_tmp->ifa_addr; - if(!IN6_IS_ADDR_LINKLOCAL(&in6->sin6_addr)) { - bind_addr = true; - in6->sin6_family = AF_INET6; - in6->sin6_port = htons(RELAY_PORT); - addr = *in6; - } - if(IN6_IS_ADDR_LINKLOCAL(&in6->sin6_addr)) { - bind_ll_addr = true; - in6->sin6_family = AF_INET6; - in6->sin6_port = htons(RELAY_PORT); - ll_addr = *in6; - } - } - ifa_tmp = ifa_tmp->ifa_next; - } - freeifaddrs(ifa); - } - - if (bind_addr && bind_ll_addr) { - break; - } - - syslog(LOG_WARNING, "Retry #%d to bind to sockets on interface %s\n", ++retry, config->interface.c_str()); - sleep(5); - } while (retry < 6); - - if ((!bind_addr) || (bind(*local_sock, (sockaddr *)&addr, sizeof(addr)) == -1)) { - syslog(LOG_ERR, "bind: Failed to bind socket to global ipv6 address on interface %s after %d retries with %s\n", config->interface.c_str(), retry, strerror(errno)); - } - - if ((!bind_ll_addr) || (bind(*server_sock, (sockaddr *)&ll_addr, sizeof(addr)) == -1)) { - syslog(LOG_ERR, "bind: Failed to bind socket to link local ipv6 address on interface %s after %d retries with %s\n", config->interface.c_str(), retry, strerror(errno)); - } -} - - -/** - * @code relay_client(int sock, const uint8_t *msg, int32_t len, ip6_hdr *ip_hdr, const ether_header *ether_hdr, relay_config *config); - * - * @brief construct relay-forward message - * - * @param sock L3 socket for sending data to servers - * @param msg pointer to dhcpv6 message header position - * @param len size of data received - * @param ip_hdr pointer to IPv6 header - * @param ether_hdr pointer to Ethernet header - * @param config pointer to the relay interface config - * - * @return none - */ -void relay_client(int sock, const uint8_t *msg, int32_t len, const ip6_hdr *ip_hdr, const ether_header *ether_hdr, relay_config *config) { - static uint8_t buffer[4096]; - auto current_buffer_position = buffer; - dhcpv6_relay_msg new_message; - new_message.msg_type = DHCPv6_MESSAGE_TYPE_RELAY_FORW; - memcpy(&new_message.peer_address, &ip_hdr->ip6_src, sizeof(in6_addr)); - new_message.hop_count = 0; - - memcpy(&new_message.link_address, &config->link_address.sin6_addr, sizeof(in6_addr)); - memcpy(current_buffer_position, &new_message, sizeof(dhcpv6_relay_msg)); - current_buffer_position += sizeof(dhcpv6_relay_msg); - - if(config->is_option_79) { - linklayer_addr_option option79; - option79.link_layer_type = htons(1); - option79.option_code = htons(OPTION_CLIENT_LINKLAYER_ADDR); - option79.option_length = htons(2 + 6); // link_layer_type field + address - - memcpy(current_buffer_position, &option79, sizeof(linklayer_addr_option)); - current_buffer_position += sizeof(linklayer_addr_option); - - memcpy(current_buffer_position, ðer_hdr->ether_shost, sizeof(ether_hdr->ether_shost)); - current_buffer_position += sizeof(ether_hdr->ether_shost); - } - - auto dhcp_message_length = len; - relay_forward(current_buffer_position, parse_dhcpv6_hdr(msg), dhcp_message_length); - current_buffer_position += dhcp_message_length + sizeof(dhcpv6_option); - - for(auto server: config->servers_sock) { - send_udp(sock, buffer, server, current_buffer_position - buffer, config, new_message.msg_type); - } -} - -/** - * @code relay_relay_forw(int sock, const uint8_t *msg, int32_t len, const ip6_hdr *ip_hdr, relay_config *config) - * - * @brief construct a relay-forward message encapsulated relay-forward message - * - * @param sock L3 socket for sending data to servers - * @param msg pointer to dhcpv6 message header position - * @param len size of data received - * @param ip_hdr pointer to IPv6 header - * @param config pointer to the relay interface config - * - * @return none - */ -void relay_relay_forw(int sock, const uint8_t *msg, int32_t len, const ip6_hdr *ip_hdr, relay_config *config) { - static uint8_t buffer[4096]; - dhcpv6_relay_msg new_message; - auto current_buffer_position = buffer; - auto dhcp_relay_header = parse_dhcpv6_relay(msg); - - if (dhcp_relay_header->hop_count >= HOP_LIMIT) - return; - - new_message.msg_type = DHCPv6_MESSAGE_TYPE_RELAY_FORW; - memcpy(&new_message.peer_address, &ip_hdr->ip6_src, sizeof(in6_addr)); - new_message.hop_count = dhcp_relay_header->hop_count + 1; - - memset(&new_message.link_address, 0, sizeof(in6_addr)); - - memcpy(current_buffer_position, &new_message, sizeof(dhcpv6_relay_msg)); - current_buffer_position += sizeof(dhcpv6_relay_msg); - - auto dhcp_message_length = len; - relay_forward(current_buffer_position, parse_dhcpv6_hdr(msg), dhcp_message_length); - current_buffer_position += dhcp_message_length + sizeof(dhcpv6_option); - - for(auto server: config->servers_sock) { - send_udp(sock, buffer, server, current_buffer_position - buffer, config, new_message.msg_type); - } -} - -/** - * @code relay_relay_reply(int sock, const uint8_t *msg, int32_t len, relay_config *configs); - * - * @brief relay and unwrap a relay-reply message - * - * @param sock L3 socket for sending data to servers - * @param msg pointer to dhcpv6 message header position - * @param len size of data received - * @param config relay interface config - * - * @return none - */ - void relay_relay_reply(int sock, const uint8_t *msg, int32_t len, relay_config *config) { - static uint8_t buffer[4096]; - uint8_t type = 0; - struct sockaddr_in6 target_addr; - auto current_buffer_position = buffer; - auto current_position = msg; - const uint8_t *tmp = NULL; - auto dhcp_relay_header = parse_dhcpv6_relay(msg); - current_position += sizeof(struct dhcpv6_relay_msg); - - auto position = current_position + sizeof(struct dhcpv6_option); - auto dhcpv6msg = parse_dhcpv6_hdr(position); - - while ((current_position - msg) < len) { - auto option = parse_dhcpv6_opt(current_position, &tmp); - current_position = tmp; - if (current_position - msg > len || ntohs(option->option_length) > sizeof(buffer) - (current_buffer_position - buffer)) { - break; - } - switch (ntohs(option->option_code)) { - case OPTION_RELAY_MSG: - memcpy(current_buffer_position, ((uint8_t *)option) + sizeof(struct dhcpv6_option), ntohs(option->option_length)); - current_buffer_position += ntohs(option->option_length); - type = dhcpv6msg->msg_type; - break; - default: - break; - } - } - - memcpy(&target_addr.sin6_addr, &dhcp_relay_header->peer_address, sizeof(struct in6_addr)); - target_addr.sin6_family = AF_INET6; - target_addr.sin6_flowinfo = 0; - target_addr.sin6_port = htons(CLIENT_PORT); - target_addr.sin6_scope_id = if_nametoindex(config->interface.c_str()); - - send_udp(sock, buffer, target_addr, current_buffer_position - buffer, config, type); -} - - -/** - * @code callback(evutil_socket_t fd, short event, void *arg); - * - * @brief callback for libevent that is called everytime data is received at the filter socket - * - * @param fd filter socket - * @param event libevent triggered event - * @param arg callback argument provided by user - * - * @return none - */ -void callback(evutil_socket_t fd, short event, void *arg) { - struct relay_config *config = (struct relay_config *)arg; - static uint8_t message_buffer[4096]; - std::string counterVlan = counter_table; - int32_t len = recv(config->filter, message_buffer, 4096, 0); - if (len <= 0) { - syslog(LOG_WARNING, "recv: Failed to receive data at filter socket: %s\n", strerror(errno)); - return; - } - - char* ptr = (char *)message_buffer; - const uint8_t *current_position = (uint8_t *)ptr; - const uint8_t *tmp = NULL; - const uint8_t *prev = NULL; - - auto ether_header = parse_ether_frame(current_position, &tmp); - current_position = tmp; - - auto ip_header = parse_ip6_hdr(current_position, &tmp); - current_position = tmp; - - prev = current_position; - if (ip_header->ip6_ctlun.ip6_un1.ip6_un1_nxt != IPPROTO_UDP) { - const struct ip6_ext *ext_header; - do { - ext_header = (const struct ip6_ext *)current_position; - current_position += ext_header->ip6e_len; - if((current_position == prev) || (current_position >= (uint8_t *)ptr + sizeof(message_buffer))) { - return; - } - prev = current_position; - } - while (ext_header->ip6e_nxt != IPPROTO_UDP); - } - - auto udp_header = parse_udp(current_position, &tmp); - current_position = tmp; - - auto msg = parse_dhcpv6_hdr(current_position); - auto option_position = current_position + sizeof(struct dhcpv6_msg); - - switch (msg->msg_type) { - case DHCPv6_MESSAGE_TYPE_RELAY_FORW: - { - relay_relay_forw(config->local_sock, current_position, ntohs(udp_header->len) - sizeof(udphdr), ip_header, config); - break; - } - case DHCPv6_MESSAGE_TYPE_SOLICIT: - case DHCPv6_MESSAGE_TYPE_REQUEST: - case DHCPv6_MESSAGE_TYPE_CONFIRM: - case DHCPv6_MESSAGE_TYPE_RENEW: - case DHCPv6_MESSAGE_TYPE_REBIND: - case DHCPv6_MESSAGE_TYPE_RELEASE: - case DHCPv6_MESSAGE_TYPE_DECLINE: - case DHCPv6_MESSAGE_TYPE_INFORMATION_REQUEST: - { - while (option_position - message_buffer < len) { - auto option = parse_dhcpv6_opt(option_position, &tmp); - option_position = tmp; - if (ntohs(option->option_code) > DHCPv6_OPTION_LIMIT) { - counters[DHCPv6_MESSAGE_TYPE_MALFORMED]++; - update_counter(config->db, counterVlan.append(config->interface), DHCPv6_MESSAGE_TYPE_MALFORMED); - syslog(LOG_WARNING, "DHCPv6 option is invalid or contains malformed payload\n"); - return; - } - } - counters[msg->msg_type]++; - update_counter(config->db, counterVlan.append(config->interface), msg->msg_type); - relay_client(config->local_sock, current_position, ntohs(udp_header->len) - sizeof(udphdr), ip_header, ether_header, config); - break; - } - default: - { - syslog(LOG_WARNING, "DHCPv6 client message received was not relayed\n"); - break; - } - } -} - -/** - * @code void server_callback(evutil_socket_t fd, short event, void *arg); - * - * @brief callback for libevent that is called everytime data is received at the server socket - * - * @param fd filter socket - * @param event libevent triggered event - * @param arg callback argument provided by user - * - * @return none - */ -void server_callback(evutil_socket_t fd, short event, void *arg) { - struct relay_config *config = (struct relay_config *)arg; - sockaddr_in6 from; - socklen_t len = sizeof(from); - int32_t data = 0; - static uint8_t message_buffer[4096]; - - if ((data = recvfrom(config->local_sock, message_buffer, 4096, 0, (sockaddr *)&from, &len)) == -1) { - syslog(LOG_WARNING, "recv: Failed to receive data from server\n"); - } - - auto msg = parse_dhcpv6_hdr(message_buffer); - counters[msg->msg_type]++; - std::string counterVlan = counter_table; - update_counter(config->db, counterVlan.append(config->interface), msg->msg_type); - if (msg->msg_type == DHCPv6_MESSAGE_TYPE_RELAY_REPL) { - relay_relay_reply(config->server_sock, message_buffer, data, config); - } -} - -/** - * @code signal_init(); - * - * @brief initialize DHCPv6 Relay libevent signals - */ -int signal_init() { - int rv = -1; - do { - ev_sigint = evsignal_new(base, SIGINT, signal_callback, base); - if (ev_sigint == NULL) { - syslog(LOG_ERR, "Could not create SIGINT libevent signal\n"); - break; - } - - ev_sigterm = evsignal_new(base, SIGTERM, signal_callback, base); - if (ev_sigterm == NULL) { - syslog(LOG_ERR, "Could not create SIGTERM libevent signal\n"); - break; - } - rv = 0; - } while(0); - return rv; -} - -/** - * @code signal_start(); - * - * @brief start DHCPv6 Relay libevent base and add signals - */ -int signal_start() -{ - int rv = -1; - do - { - if (evsignal_add(ev_sigint, NULL) != 0) { - syslog(LOG_ERR, "Could not add SIGINT libevent signal\n"); - break; - } - - if (evsignal_add(ev_sigterm, NULL) != 0) { - syslog(LOG_ERR, "Could not add SIGTERM libevent signal\n"); - break; - } - - if (event_base_dispatch(base) != 0) { - syslog(LOG_ERR, "Could not start libevent dispatching loop\n"); - } - - rv = 0; - } while (0); - - return rv; -} - -/** - * @code signal_callback(fd, event, arg); - * - * @brief signal handler for dhcp6relay. Initiate shutdown when signal is caught - * - * @param fd libevent socket - * @param event event triggered - * @param arg pointer to libevent base - * - * @return none - */ -void signal_callback(evutil_socket_t fd, short event, void *arg) -{ - syslog(LOG_ALERT, "Received signal: '%s'\n", strsignal(fd)); - if ((fd == SIGTERM) || (fd == SIGINT)) { - dhcp6relay_stop(); - } -} - -/** - * @code dhcp6relay_stop(); - * - * @brief stop DHCPv6 Relay libevent loop upon signal - */ -void dhcp6relay_stop() -{ - event_base_loopexit(base, NULL); -} - -/** - * @code loop_relay(std::vector *vlans, swss::DBConnector *db); - * - * @brief main loop: configure sockets, create libevent base, start server listener thread - * - * @param vlans list of vlans retrieved from config_db - * @param db state_db connector - */ -void loop_relay(std::vector *vlans, swss::DBConnector *db) { - std::vector sockets; - base = event_base_new(); - if(base == NULL) { - syslog(LOG_ERR, "libevent: Failed to create base\n"); - } - - for(relay_config &vlan : *vlans) { - relay_config *config = &vlan; - int filter = 0; - int local_sock = 0; - int server_sock = 0; - int index = if_nametoindex(config->interface.c_str()); - config->db = db; - - std::string counterVlan = counter_table; - initialize_counter(config->db, counterVlan.append(config->interface)); - - filter = sock_open(index, ðer_relay_fprog); - prepare_socket(&local_sock, &server_sock, config, index); - - config->local_sock = local_sock; - config->server_sock = server_sock; - - sockets.push_back(filter); - sockets.push_back(local_sock); - sockets.push_back(server_sock); - - prepare_relay_config(config, &local_sock, filter); - - evutil_make_listen_socket_reuseable(filter); - evutil_make_socket_nonblocking(filter); - - evutil_make_listen_socket_reuseable(local_sock); - evutil_make_socket_nonblocking(local_sock); - - listen_event = event_new(base, filter, EV_READ|EV_PERSIST, callback, config); - server_listen_event = event_new(base, local_sock, EV_READ|EV_PERSIST, server_callback, config); - if (listen_event == NULL || server_listen_event == NULL) { - syslog(LOG_ERR, "libevent: Failed to create libevent\n"); - } - - event_add(listen_event, NULL); - event_add(server_listen_event, NULL); - } - - if((signal_init() == 0) && signal_start() == 0) { - shutdown(); - for(std::size_t i = 0; i -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define PACKED __attribute__ ((packed)) - -#define RELAY_PORT 547 -#define CLIENT_PORT 546 -#define HOP_LIMIT 8 //HOP_LIMIT reduced from 32 to 8 as stated in RFC8415 -#define DHCPv6_OPTION_LIMIT 56 // DHCPv6 option code greater than 56 are currently unassigned - -#define lengthof(A) (sizeof (A) / sizeof (A)[0]) - -#define OPTION_RELAY_MSG 9 -#define OPTION_CLIENT_LINKLAYER_ADDR 79 - -/* DHCPv6 message types */ -typedef enum -{ - DHCPv6_MESSAGE_TYPE_UNKNOWN = 0, - DHCPv6_MESSAGE_TYPE_SOLICIT = 1, - DHCPv6_MESSAGE_TYPE_ADVERTISE = 2, - DHCPv6_MESSAGE_TYPE_REQUEST = 3, - DHCPv6_MESSAGE_TYPE_CONFIRM = 4, - DHCPv6_MESSAGE_TYPE_RENEW = 5, - DHCPv6_MESSAGE_TYPE_REBIND = 6, - DHCPv6_MESSAGE_TYPE_REPLY = 7, - DHCPv6_MESSAGE_TYPE_RELEASE = 8, - DHCPv6_MESSAGE_TYPE_DECLINE = 9, - DHCPv6_MESSAGE_TYPE_RECONFIGURE = 10, - DHCPv6_MESSAGE_TYPE_INFORMATION_REQUEST = 11, - DHCPv6_MESSAGE_TYPE_RELAY_FORW = 12, - DHCPv6_MESSAGE_TYPE_RELAY_REPL = 13, - DHCPv6_MESSAGE_TYPE_MALFORMED = 14, - - DHCPv6_MESSAGE_TYPE_COUNT -} dhcp_message_type_t; - -struct relay_config { - int local_sock; - int server_sock; - int filter; - sockaddr_in6 link_address; - swss::DBConnector *db; - std::string interface; - std::vector servers; - std::vector servers_sock; - bool is_option_79; -}; - - -/* DHCPv6 messages and options */ - -struct dhcpv6_msg { - uint8_t msg_type; - uint8_t xid[3]; -}; - -struct PACKED dhcpv6_relay_msg { - uint8_t msg_type; - uint8_t hop_count; - struct in6_addr link_address; - struct in6_addr peer_address; -}; - - -struct dhcpv6_option { - uint16_t option_code; - uint16_t option_length; -}; - -struct linklayer_addr_option { - uint16_t option_code; - uint16_t option_length; - uint16_t link_layer_type; -}; - -/** - * @code sock_open(int ifindex, const struct sock_fprog *fprog); - * - * @brief prepare L2 socket to attach to "udp and port 547" filter - * - * @param ifindex interface index - * @param fprog bpf filter "udp and port 547" - * - * @return socket descriptor - */ -int sock_open(int ifindex, const struct sock_fprog *fprog); - -/** - * @code prepare_socket(int *local_sock, int *server_sock, relay_config *config, int index); - * - * @brief prepare L3 socket for sending - * - * @param local_sock pointer to socket binded to global address for relaying client message to server and listening for server message - * @param server_sock pointer to socket binded to link_local address for relaying server message to client - * @param index scope id of interface - * - * @return none - */ -void prepare_socket(int *local_sock, int *server_sock, relay_config *config, int index); - -/** - * @code prepare_relay_config(relay_config *interface_config, int local_sock, int filter); - * - * @brief prepare for specified relay interface config: server and link address - * - * @param interface_config pointer to relay config to be prepared - * @param local_sock L3 socket used for relaying messages - * @param filter socket attached with filter - * - * @return none - */ -void prepare_relay_config(relay_config *interface_config, int *local_sock, int filter); - -/** - * @code relay_forward(uint8_t *buffer, const struct dhcpv6_msg *msg, uint16_t msg_length); - * - * @brief embed the DHCPv6 message received into DHCPv6 relay forward message - * - * @param buffer pointer to buffer - * @param msg pointer to parsed DHCPv6 message - * @param msg_length length of DHCPv6 message - * - * @return none - */ -void relay_forward(uint8_t *buffer, const struct dhcpv6_msg *msg, uint16_t msg_length); - -/** - * @code relay_client(int sock, const uint8_t *msg, int32_t len, ip6_hdr *ip_hdr, const ether_header *ether_hdr, relay_config *config); - * - * @brief construct relay-forward message - * - * @param sock L3 socket for sending data to servers - * @param msg pointer to dhcpv6 message header position - * @param len size of data received - * @param ip_hdr pointer to IPv6 header - * @param ether_hdr pointer to Ethernet header - * @param config pointer to the relay interface config - * - * @return none - */ -void relay_client(int sock, const uint8_t *msg, int32_t len, const ip6_hdr *ip_hdr, const ether_header *ether_hdr, relay_config *config); - -/** - * @code relay_relay_forw(int sock, const uint8_t *msg, int32_t len, const ip6_hdr *ip_hdr, relay_config *config) - * - * @brief construct a relay-forward message encapsulated relay-forward message - * - * @param sock L3 socket for sending data to servers - * @param msg pointer to dhcpv6 message header position - * @param len size of data received - * @param ip_hdr pointer to IPv6 header - * @param config pointer to the relay interface config - * - * @return none - */ -void relay_relay_forw(int sock, const uint8_t *msg, int32_t len, const ip6_hdr *ip_hdr, relay_config *config); - -/** - * @code relay_relay_reply(int sock, const uint8_t *msg, int32_t len, relay_config *configs); - * - * @brief relay and unwrap a relay-reply message - * - * @param sock L3 socket for sending data to servers - * @param msg pointer to dhcpv6 message header position - * @param len size of data received - * @param config relay interface config - * - * @return none - */ -void relay_relay_reply(int sock, const uint8_t *msg, int32_t len, relay_config *configs); - -/** - * @code loop_relay(std::vector *vlans, swss::DBConnector *db); - * - * @brief main loop: configure sockets, create libevent base, start server listener thread - * - * @param vlans list of vlans retrieved from config_db - * @param db state_db connector - */ -void loop_relay(std::vector *vlans, swss::DBConnector *db); - -/** - * @code signal_init(); - * - * @brief initialize DHCPv6 Relay libevent signals - */ -int signal_init(); - -/** - * @code signal_start(); - * - * @brief start DHCPv6 Relay libevent base and add signals - */ -int signal_start(); - -/** - * @code dhcp6relay_stop(); - * - * @brief stop DHCPv6 Relay libevent loop upon signal - */ -void dhcp6relay_stop(); - -/** - * @code signal_callback(fd, event, arg); - * - * @brief signal handler for dhcp6relay. Initiate shutdown when signal is caught - * - * @param fd libevent socket - * @param event event triggered - * @param arg pointer to libevent base - * - * @return none - */ -void signal_callback(evutil_socket_t fd, short event, void *arg); - -/** - * @code shutdown(); - * - * @brief free signals and terminate threads - */ -void shutdown(); - -/** - * @code void initialize_counter(swss::DBConnector *db, std::string counterVlan); - * - * @brief initialize the counter by each Vlan - * - * @param swss::DBConnector *db state_db connector - * @param counterVlan counter table with interface name - * - * @return none - */ -void initialize_counter(swss::DBConnector *db, std::string counterVlan); - -/** - * @code void update_counter(swss::DBConnector *db, std::string CounterVlan, uint8_t msg_type); - * - * @brief update the counter in state_db with count of each DHCPv6 message type - * - * @param swss::DBConnector *db state_db connector - * @param counterVlan counter table with interface name - * @param msg_type dhcpv6 message type to be updated in counter - * - * @return none - */ -void update_counter(swss::DBConnector *db, std::string counterVlan, uint8_t msg_type); - -/* Helper functions */ - -/** - * @code std::string toString(uint16_t count); - * - * @brief convert uint16_t to string - * - * @param count count of messages in counter - * - * @return count in string - */ -std::string toString(uint16_t count); - -/** - * @code const struct ether_header *parse_ether_frame(const uint8_t *buffer, const uint8_t **out_end); - * - * @brief parse through ethernet frame - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return ether_header end of ethernet header position - */ -const struct ether_header *parse_ether_frame(const uint8_t *buffer, const uint8_t **out_end); - -/** - * @code const struct ip6_hdr *parse_ip6_hdr(const uint8_t *buffer, const uint8_t **out_end); - * - * @brief parse through ipv6 header - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return ip6_hdr end of ipv6 header position - */ -const struct ip6_hdr *parse_ip6_hdr(const uint8_t *buffer, const uint8_t **out_end); - -/** - * @code const struct udphdr *parse_udp(const uint8_t *buffer, const uint8_t **out_end); - * - * @brief parse through udp header - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return udphdr end of udp header position - */ -const struct udphdr *parse_udp(const uint8_t *buffer, const uint8_t **out_end); - -/** - * @code const struct dhcpv6_msg *parse_dhcpv6_hdr(const uint8_t *buffer); - * - * @brief parse through dhcpv6 header - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return dhcpv6_msg end of dhcpv6 header position - */ -const struct dhcpv6_msg *parse_dhcpv6_hdr(const uint8_t *buffer); - -/** - * @code const struct dhcpv6_relay_msg *parse_dhcpv6_relay(const uint8_t *buffer); - * - * @brief parse through dhcpv6 relay message - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return dhcpv6_relay_msg start of dhcpv6 relay message or end of dhcpv6 message type position - */ -const struct dhcpv6_relay_msg *parse_dhcpv6_relay(const uint8_t *buffer); - -/** - * @code const struct dhcpv6_option *parse_dhcpv6_opt(const uint8_t *buffer, const uint8_t **out_end); - * - * @brief parse through dhcpv6 option - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return dhcpv6_option end of dhcpv6 message option - */ -const struct dhcpv6_option *parse_dhcpv6_opt(const uint8_t *buffer, const uint8_t **out_end); - -/** - * @code void send_udp(int sock, uint8_t *buffer, struct sockaddr_in6 target, uint32_t n, relay_config *config, uint8_t msg_type); - * - * @brief send udp packet - * - * @param *buffer message buffer - * @param sockaddr_in6 target target socket - * @param n length of message - * @param relay_config *config pointer to relay_config - * @param uint8_t msg_type message type of dhcpv6 option of relayed message - * - * @return dhcpv6_option end of dhcpv6 message option - */ -void send_udp(int sock, uint8_t *buffer, struct sockaddr_in6 target, uint32_t n, relay_config *config, uint8_t msg_type); - diff --git a/src/dhcp6relay/src/subdir.mk b/src/dhcp6relay/src/subdir.mk deleted file mode 100644 index 1c93d490ec63..000000000000 --- a/src/dhcp6relay/src/subdir.mk +++ /dev/null @@ -1,23 +0,0 @@ -CC := g++ - -C_SRCS += \ -../src/relay.c \ -../src/configInterface.c \ -../src/main.c - -OBJS += \ -./src/relay.o \ -./src/configInterface.o \ -./src/main.o - -C_DEPS += \ -./src/relay.d \ -./src/configInterface.d \ -./src/main.d - -src/%.o: src/%.cpp - @echo 'Building file: $<' - @echo 'Invoking: GCC C++ Compiler' - $(CC) -D__FILENAME__="$(subst src/,,$<)" $(CFLAGS) -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' diff --git a/src/dhcpmon/Makefile b/src/dhcpmon/Makefile index 61cde376730b..4d21f57199f2 100644 --- a/src/dhcpmon/Makefile +++ b/src/dhcpmon/Makefile @@ -2,8 +2,9 @@ RM := rm -rf DHCPMON_TARGET := dhcpmon CP := cp MKDIR := mkdir -CC := gcc +CC := g++ MV := mv +PWD := $(shell pwd) # All of the sources participating in the build are defined here -include src/subdir.mk @@ -23,7 +24,7 @@ all: sonic-dhcpmon # Tool invocations sonic-dhcpmon: $(OBJS) $(USER_OBJS) @echo 'Building target: $@' - @echo 'Invoking: GCC C Linker' + @echo 'Invoking: G++ C Linker' $(CC) -o "$(DHCPMON_TARGET)" $(OBJS) $(USER_OBJS) $(LIBS) @echo 'Finished building target: $@' @echo ' ' diff --git a/src/dhcpmon/objects.mk b/src/dhcpmon/objects.mk index c9b774a53921..dc0d09e5021f 100644 --- a/src/dhcpmon/objects.mk +++ b/src/dhcpmon/objects.mk @@ -1,4 +1,4 @@ USER_OBJS := -LIBS := -levent -lexplain +LIBS := -levent -lexplain -lswsscommon -pthread -lboost_thread -lboost_system -lhiredis diff --git a/src/dhcpmon/src/dhcp_device.c b/src/dhcpmon/src/dhcp_device.cpp similarity index 80% rename from src/dhcpmon/src/dhcp_device.c rename to src/dhcpmon/src/dhcp_device.cpp index f45483f8504c..8ec91b057b64 100644 --- a/src/dhcpmon/src/dhcp_device.c +++ b/src/dhcpmon/src/dhcp_device.cpp @@ -21,6 +21,8 @@ #include #include #include +#include "subscriberstatetable.h" +#include "select.h" #include "dhcp_device.h" @@ -49,34 +51,42 @@ #define OP_JSET (BPF_JMP | BPF_JSET | BPF_K) /** bpf jset */ #define OP_LDXB (BPF_LDX | BPF_B | BPF_MSH) /** bpf ldxb */ +std::shared_ptr mStateDbPtr = std::make_shared ("STATE_DB", 0); +std::shared_ptr mStateDbMuxTablePtr = std::make_shared ( + mStateDbPtr.get(), "HW_MUX_CABLE_TABLE" + ); +swss::DBConnector configDb("CONFIG_DB", 0); + /** Berkeley Packet Filter program for "udp and (port 67 or port 68)". * This program is obtained using the following command tcpdump: - * `tcpdump -dd "udp and (port 67 or port 68)"` + * `tcpdump -dd "inbound and udp and (port 67 or port 68)"` */ static struct sock_filter dhcp_bpf_code[] = { - {.code = OP_LDHA, .jt = 0, .jf = 0, .k = 0x0000000c}, // (000) ldh [12] - {.code = OP_JEQ, .jt = 0, .jf = 7, .k = 0x000086dd}, // (001) jeq #0x86dd jt 2 jf 9 - {.code = OP_LDB, .jt = 0, .jf = 0, .k = 0x00000014}, // (002) ldb [20] - {.code = OP_JEQ, .jt = 0, .jf = 18, .k = 0x00000011}, // (003) jeq #0x11 jt 4 jf 22 - {.code = OP_LDHA, .jt = 0, .jf = 0, .k = 0x00000036}, // (004) ldh [54] - {.code = OP_JEQ, .jt = 15, .jf = 0, .k = 0x00000043}, // (005) jeq #0x43 jt 21 jf 6 - {.code = OP_JEQ, .jt = 14, .jf = 0, .k = 0x00000044}, // (006) jeq #0x44 jt 21 jf 7 - {.code = OP_LDHA, .jt = 0, .jf = 0, .k = 0x00000038}, // (007) ldh [56] - {.code = OP_JEQ, .jt = 12, .jf = 11, .k = 0x00000043}, // (008) jeq #0x43 jt 21 jf 20 - {.code = OP_JEQ, .jt = 0, .jf = 12, .k = 0x00000800}, // (009) jeq #0x800 jt 10 jf 22 - {.code = OP_LDB, .jt = 0, .jf = 0, .k = 0x00000017}, // (010) ldb [23] - {.code = OP_JEQ, .jt = 0, .jf = 10, .k = 0x00000011}, // (011) jeq #0x11 jt 12 jf 22 - {.code = OP_LDHA, .jt = 0, .jf = 0, .k = 0x00000014}, // (012) ldh [20] - {.code = OP_JSET, .jt = 8, .jf = 0, .k = 0x00001fff}, // (013) jset #0x1fff jt 22 jf 14 - {.code = OP_LDXB, .jt = 0, .jf = 0, .k = 0x0000000e}, // (014) ldxb 4*([14]&0xf) - {.code = OP_LDHI, .jt = 0, .jf = 0, .k = 0x0000000e}, // (015) ldh [x + 14] - {.code = OP_JEQ, .jt = 4, .jf = 0, .k = 0x00000043}, // (016) jeq #0x43 jt 21 jf 17 - {.code = OP_JEQ, .jt = 3, .jf = 0, .k = 0x00000044}, // (017) jeq #0x44 jt 21 jf 18 - {.code = OP_LDHI, .jt = 0, .jf = 0, .k = 0x00000010}, // (018) ldh [x + 16] - {.code = OP_JEQ, .jt = 1, .jf = 0, .k = 0x00000043}, // (019) jeq #0x43 jt 21 jf 20 - {.code = OP_JEQ, .jt = 0, .jf = 1, .k = 0x00000044}, // (020) jeq #0x44 jt 21 jf 22 - {.code = OP_RET, .jt = 0, .jf = 0, .k = 0x00040000}, // (021) ret #262144 - {.code = OP_RET, .jt = 0, .jf = 0, .k = 0x00000000}, // (022) ret #0 + {.code = OP_LDHA, .jt = 0, .jf = 0, .k = 0xfffff004}, // (000) ldh #fffff004 + {.code = OP_JEQ, .jt = 22, .jf = 0, .k = 0x00000004}, // (001) jeq #0x04 jt 22 jf 0 + {.code = OP_LDHA, .jt = 0, .jf = 0, .k = 0x0000000c}, // (002) ldh [12] + {.code = OP_JEQ, .jt = 0, .jf = 7, .k = 0x000086dd}, // (003) jeq #0x86dd jt 2 jf 9 + {.code = OP_LDB, .jt = 0, .jf = 0, .k = 0x00000014}, // (004) ldb [20] + {.code = OP_JEQ, .jt = 0, .jf = 18, .k = 0x00000011}, // (005) jeq #0x11 jt 4 jf 22 + {.code = OP_LDHA, .jt = 0, .jf = 0, .k = 0x00000036}, // (006) ldh [54] + {.code = OP_JEQ, .jt = 15, .jf = 0, .k = 0x00000043}, // (007) jeq #0x43 jt 21 jf 6 + {.code = OP_JEQ, .jt = 14, .jf = 0, .k = 0x00000044}, // (008) jeq #0x44 jt 21 jf 7 + {.code = OP_LDHA, .jt = 0, .jf = 0, .k = 0x00000038}, // (009) ldh [56] + {.code = OP_JEQ, .jt = 12, .jf = 11, .k = 0x00000043}, // (010) jeq #0x43 jt 21 jf 20 + {.code = OP_JEQ, .jt = 0, .jf = 12, .k = 0x00000800}, // (011) jeq #0x800 jt 10 jf 22 + {.code = OP_LDB, .jt = 0, .jf = 0, .k = 0x00000017}, // (012) ldb [23] + {.code = OP_JEQ, .jt = 0, .jf = 10, .k = 0x00000011}, // (013) jeq #0x11 jt 12 jf 22 + {.code = OP_LDHA, .jt = 0, .jf = 0, .k = 0x00000014}, // (014) ldh [20] + {.code = OP_JSET, .jt = 8, .jf = 0, .k = 0x00001fff}, // (015) jset #0x1fff jt 22 jf 14 + {.code = OP_LDXB, .jt = 0, .jf = 0, .k = 0x0000000e}, // (016) ldxb 4*([14]&0xf) + {.code = OP_LDHI, .jt = 0, .jf = 0, .k = 0x0000000e}, // (017) ldh [x + 14] + {.code = OP_JEQ, .jt = 4, .jf = 0, .k = 0x00000043}, // (018) jeq #0x43 jt 21 jf 17 + {.code = OP_JEQ, .jt = 3, .jf = 0, .k = 0x00000044}, // (019) jeq #0x44 jt 21 jf 18 + {.code = OP_LDHI, .jt = 0, .jf = 0, .k = 0x00000010}, // (020) ldh [x + 16] + {.code = OP_JEQ, .jt = 1, .jf = 0, .k = 0x00000043}, // (021) jeq #0x43 jt 21 jf 20 + {.code = OP_JEQ, .jt = 0, .jf = 1, .k = 0x00000044}, // (022) jeq #0x44 jt 21 jf 22 + {.code = OP_RET, .jt = 0, .jf = 0, .k = 0x00040000}, // (023) ret #262144 + {.code = OP_RET, .jt = 0, .jf = 0, .k = 0x00000000}, // (024) ret #0 }; /** Filter program socket struct */ @@ -176,7 +186,7 @@ static void read_callback(int fd, short event, void *arg) uint8_t *dhcphdr = context->buffer + DHCP_START_OFFSET; int dhcp_option_offset = DHCP_START_OFFSET + DHCP_OPTIONS_HEADER_SIZE; - if ((buffer_sz > UDP_START_OFFSET + sizeof(struct udphdr) + DHCP_OPTIONS_HEADER_SIZE) && + if (((unsigned)buffer_sz > UDP_START_OFFSET + sizeof(struct udphdr) + DHCP_OPTIONS_HEADER_SIZE) && (ntohs(udp->len) > DHCP_OPTIONS_HEADER_SIZE)) { int dhcp_sz = ntohs(udp->len) < buffer_sz - UDP_START_OFFSET - sizeof(struct udphdr) ? ntohs(udp->len) : buffer_sz - UDP_START_OFFSET - sizeof(struct udphdr); @@ -221,6 +231,87 @@ static void read_callback(int fd, short event, void *arg) } } +/** + * @code read_callback_dual_tor(fd, event, arg); + * + * @brief callback for libevent which is called every time out in order to read queued packet capture when dual tor mode is enabled + * + * @param fd socket to read from + * @param event libevent triggered event + * @param arg user provided argument for callback (interface context) + * + * @return none + */ +static void read_callback_dual_tor(int fd, short event, void *arg) +{ + dhcp_device_context_t *context = (dhcp_device_context_t*) arg; + ssize_t buffer_sz; + struct sockaddr_ll sll; + socklen_t slen = sizeof sll; + + while ((event == EV_READ) && + ((buffer_sz = recvfrom(fd, context->buffer, context->snaplen, MSG_DONTWAIT, (struct sockaddr *)&sll, &slen)) > 0)) + { + std::string member_table = std::string("VLAN_MEMBER|") + context->intf + "|"; + char interfaceName[IF_NAMESIZE]; + char *interface = if_indextoname(sll.sll_ifindex, interfaceName); + std::string state; + std::string intf(interface); + mStateDbMuxTablePtr->hget(intf, "state", state); + if (state != "standby" && configDb.exists(member_table.append(interface))) { + struct ether_header *ethhdr = (struct ether_header*) context->buffer; + struct ip *iphdr = (struct ip*) (context->buffer + IP_START_OFFSET); + struct udphdr *udp = (struct udphdr*) (context->buffer + UDP_START_OFFSET); + uint8_t *dhcphdr = context->buffer + DHCP_START_OFFSET; + int dhcp_option_offset = DHCP_START_OFFSET + DHCP_OPTIONS_HEADER_SIZE; + + if (((unsigned)buffer_sz > UDP_START_OFFSET + sizeof(struct udphdr) + DHCP_OPTIONS_HEADER_SIZE) && + (ntohs(udp->len) > DHCP_OPTIONS_HEADER_SIZE)) + { + int dhcp_sz = ntohs(udp->len) < buffer_sz - UDP_START_OFFSET - sizeof(struct udphdr) ? + ntohs(udp->len) : buffer_sz - UDP_START_OFFSET - sizeof(struct udphdr); + int dhcp_option_sz = dhcp_sz - DHCP_OPTIONS_HEADER_SIZE; + const u_char *dhcp_option = context->buffer + dhcp_option_offset; + dhcp_packet_direction_t dir = (ethhdr->ether_shost[0] == context->mac[0] && + ethhdr->ether_shost[1] == context->mac[1] && + ethhdr->ether_shost[2] == context->mac[2] && + ethhdr->ether_shost[3] == context->mac[3] && + ethhdr->ether_shost[4] == context->mac[4] && + ethhdr->ether_shost[5] == context->mac[5]) ? + DHCP_TX : DHCP_RX; + int offset = 0; + int stop_dhcp_processing = 0; + while ((offset < (dhcp_option_sz + 1)) && dhcp_option[offset] != 255) { + switch (dhcp_option[offset]) + { + case 53: + if (offset < (dhcp_option_sz + 2)) { + handle_dhcp_option_53(context, &dhcp_option[offset], dir, iphdr, dhcphdr); + } + stop_dhcp_processing = 1; // break while loop since we are only interested in Option 53 + break; + default: + break; + } + + if (stop_dhcp_processing == 1) { + break; + } + + if (dhcp_option[offset] == 0) { // DHCP Option Padding + offset++; + } else { + offset += dhcp_option[offset + 1] + 2; + } + } + } else { + syslog(LOG_WARNING, "read_callback(%s): read length (%ld) is too small to capture DHCP options", + context->intf, buffer_sz); + } + } + } +} + /** * @code dhcp_device_is_dhcp_inactive(counters); * @@ -412,7 +503,7 @@ static int init_socket(dhcp_device_context_t *context, const char *intf) struct sockaddr_ll addr; memset(&addr, 0, sizeof(addr)); - addr.sll_ifindex = if_nametoindex(intf); + addr.sll_ifindex = 0; // any interface addr.sll_family = AF_PACKET; addr.sll_protocol = htons(ETH_P_ALL); if (bind(context->sock, (struct sockaddr *) &addr, sizeof(addr))) { @@ -553,6 +644,7 @@ int dhcp_device_start_capture(dhcp_device_context_t *context, in_addr_t giaddr_ip) { int rv = -1; + struct event *ev; do { if (context == NULL) { @@ -579,7 +671,11 @@ int dhcp_device_start_capture(dhcp_device_context_t *context, break; } - struct event *ev = event_new(base, context->sock, EV_READ | EV_PERSIST, read_callback, context); + if (dual_tor_sock) + ev = event_new(base, context->sock, EV_READ | EV_PERSIST, read_callback_dual_tor, context); + else + ev = event_new(base, context->sock, EV_READ | EV_PERSIST, read_callback, context); + if (ev == NULL) { syslog(LOG_ALERT, "event_new: failed to allocate memory for libevent event '%s'\n", strerror(errno)); break; diff --git a/src/dhcpmon/src/dhcp_device.h b/src/dhcpmon/src/dhcp_device.h index aa686f4e2718..a2b2a789fca6 100644 --- a/src/dhcpmon/src/dhcp_device.h +++ b/src/dhcpmon/src/dhcp_device.h @@ -16,6 +16,7 @@ #include #include +extern bool dual_tor_sock; /** * DHCP message types diff --git a/src/dhcpmon/src/dhcp_devman.c b/src/dhcpmon/src/dhcp_devman.cpp similarity index 99% rename from src/dhcpmon/src/dhcp_devman.c rename to src/dhcpmon/src/dhcp_devman.cpp index 65484798dbd6..b215f978a7c4 100644 --- a/src/dhcpmon/src/dhcp_devman.c +++ b/src/dhcpmon/src/dhcp_devman.cpp @@ -110,7 +110,7 @@ void dhcp_devman_shutdown() int dhcp_devman_add_intf(const char *name, char intf_type) { int rv = -1; - struct intf *dev = malloc(sizeof(struct intf)); + struct intf *dev = (struct intf*) malloc(sizeof(struct intf)); if (dev != NULL) { dev->name = name; diff --git a/src/dhcpmon/src/dhcp_mon.c b/src/dhcpmon/src/dhcp_mon.cpp similarity index 100% rename from src/dhcpmon/src/dhcp_mon.c rename to src/dhcpmon/src/dhcp_mon.cpp diff --git a/src/dhcpmon/src/main.c b/src/dhcpmon/src/main.cpp similarity index 97% rename from src/dhcpmon/src/main.c rename to src/dhcpmon/src/main.cpp index 29bc534accf0..aefaea2d01dd 100644 --- a/src/dhcpmon/src/main.c +++ b/src/dhcpmon/src/main.cpp @@ -16,9 +16,12 @@ #include #include #include +#include "subscriberstatetable.h" +#include "select.h" #include "dhcp_mon.h" #include "dhcp_devman.h" +#include "dhcp_device.h" /** dhcpmon_default_snaplen: default snap length of packet being captured */ static const size_t dhcpmon_default_snaplen = 65535; @@ -29,6 +32,8 @@ static const uint32_t dhcpmon_default_health_check_window = 18; * with DHCP relay */ static const uint32_t dhcpmon_default_unhealthy_max_count = 10; +bool dual_tor_sock = false; + /** * @code usage(prog); * @@ -134,6 +139,7 @@ int main(int argc, char **argv) i += 2; break; case 'u': + dual_tor_sock = true; if (dhcp_devman_setup_dual_tor_mode(argv[i + 1]) != 0) { usage(basename(argv[0])); } diff --git a/src/dhcpmon/src/subdir.mk b/src/dhcpmon/src/subdir.mk index 324977aa39f7..dd808aeb7202 100644 --- a/src/dhcpmon/src/subdir.mk +++ b/src/dhcpmon/src/subdir.mk @@ -1,11 +1,11 @@ # Add inputs and outputs from these tool invocations to the build variables -CC := gcc +CC := g++ C_SRCS += \ -../src/dhcp_device.c \ -../src/dhcp_devman.c \ -../src/dhcp_mon.c \ -../src/main.c +../src/dhcp_device.cpp \ +../src/dhcp_devman.cpp \ +../src/dhcp_mon.cpp \ +../src/main.cpp OBJS += \ ./src/dhcp_device.o \ @@ -21,9 +21,9 @@ C_DEPS += \ # Each subdirectory must supply rules for building sources it contributes -src/%.o: ../src/%.c +src/%.o: src/%.cpp @echo 'Building file: $<' @echo 'Invoking: GCC C Compiler' - $(CC) -O3 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<" + $(CC) -O3 -g3 -Wall -I$(PWD)/../sonic-swss-common/common -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<" @echo 'Finished building: $<' @echo ' ' diff --git a/src/dhcprelay b/src/dhcprelay new file mode 160000 index 000000000000..40ad1676e4d0 --- /dev/null +++ b/src/dhcprelay @@ -0,0 +1 @@ +Subproject commit 40ad1676e4d07c3eec2153017997bb04b33a94c8 diff --git a/src/isc-dhcp/patch/0013-Fix-dhcrelay-agent-option-buffer-pointer-logic.patch b/src/isc-dhcp/patch/0013-Fix-dhcrelay-agent-option-buffer-pointer-logic.patch new file mode 100644 index 000000000000..051b58966cae --- /dev/null +++ b/src/isc-dhcp/patch/0013-Fix-dhcrelay-agent-option-buffer-pointer-logic.patch @@ -0,0 +1,53 @@ +From 0a2f9a62bceb90b0d30461add2e25c4ce7a24547 Mon Sep 17 00:00:00 2001 +From: Thomas Markwalder +Date: Fri, 20 Dec 2019 10:11:54 -0500 +Subject: [PATCH] [#71] Fix dhcrelay agent option buffer pointer logic + +relay/dhcrelay.c + strip_relay_agent_options() + strip_relay_agent_options() + - corrected buffer pointer logic + +--- + relay/dhcrelay.c | 18 ++++++++++++++---- + 1 file changed, 14 insertions(+), 4 deletions(-) + +diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c +index 896e1e2e..980dacae 100644 +--- a/relay/dhcrelay.c ++++ b/relay/dhcrelay.c +@@ -1238,8 +1238,13 @@ strip_relay_agent_options(struct interface_info *in, + return (0); + + if (sp != op) { +- memmove(sp, op, op[1] + 2); +- sp += op[1] + 2; ++ size_t mlen = op[1] + 2; ++ memmove(sp, op, mlen); ++ sp += mlen; ++ if (sp > max) { ++ return (0); ++ } ++ + op = nextop; + } else + op = sp = nextop; +@@ -1620,8 +1620,13 @@ add_relay_agent_options(struct interface_info *ip, struct dhcp_packet *packet, + end_pad = NULL; + + if (sp != op) { +- memmove(sp, op, op[1] + 2); +- sp += op[1] + 2; ++ size_t mlen = op[1] + 2; ++ memmove(sp, op, mlen); ++ sp += mlen; ++ if (sp > max) { ++ return (0); ++ } ++ + op = nextop; + } else + op = sp = nextop; +-- +2.17.1 + diff --git a/src/isc-dhcp/patch/series b/src/isc-dhcp/patch/series index 5397aa0c6e06..b9efee0192f5 100644 --- a/src/isc-dhcp/patch/series +++ b/src/isc-dhcp/patch/series @@ -11,3 +11,4 @@ 0010-Bugfix-correctly-set-interface-netmask.patch 0011-dhcp-relay-Prevent-Buffer-Overrun.patch 0012-add-option-si-to-support-using-src-intf-ip-in-relay.patch +0013-Fix-dhcrelay-agent-option-buffer-pointer-logic.patch diff --git a/src/linkmgrd b/src/linkmgrd index a2367d082832..ddbd7926c20a 160000 --- a/src/linkmgrd +++ b/src/linkmgrd @@ -1 +1 @@ -Subproject commit a2367d0828322e093525b9f028fd6d3b0ab0dbbf +Subproject commit ddbd7926c20a007f5c3fb3d8b6758c6664afb0f0 diff --git a/src/sonic-bgpcfgd/bgpcfgd/managers_allow_list.py b/src/sonic-bgpcfgd/bgpcfgd/managers_allow_list.py index 209d12fd2f97..4bdd488fc2eb 100644 --- a/src/sonic-bgpcfgd/bgpcfgd/managers_allow_list.py +++ b/src/sonic-bgpcfgd/bgpcfgd/managers_allow_list.py @@ -14,8 +14,11 @@ class BGPAllowListMgr(Manager): ALLOW_ADDRESS_PL_NAME_TMPL = "ALLOW_ADDRESS_%d_%s" # template for a name for the ALLOW_ADDRESS prefix-list ??? EMPTY_COMMUNITY = "empty" PL_NAME_TMPL = "PL_ALLOW_LIST_DEPLOYMENT_ID_%d_COMMUNITY_%s_V%s" + PL_NAME_TMPL_WITH_NEIGH = "PL_ALLOW_LIST_DEPLOYMENT_ID_%d_NEIGHBOR_%s_COMMUNITY_%s_V%s" COMMUNITY_NAME_TMPL = "COMMUNITY_ALLOW_LIST_DEPLOYMENT_ID_%d_COMMUNITY_%s" + COMMUNITY_NAME_TMPL_WITH_NEIGH = "COMMUNITY_ALLOW_LIST_DEPLOYMENT_ID_%d_NEIGHBOR_%s_COMMUNITY_%s" RM_NAME_TMPL = "ALLOW_LIST_DEPLOYMENT_ID_%d_V%s" + RM_NAME_TMPL_WITH_NEIGH = "ALLOW_LIST_DEPLOYMENT_ID_%d_NEIGHBOR_%s_V%s" ROUTE_MAP_ENTRY_WITH_COMMUNITY_START = 10 ROUTE_MAP_ENTRY_WITH_COMMUNITY_END = 29990 ROUTE_MAP_ENTRY_WITHOUT_COMMUNITY_START = 30000 @@ -38,7 +41,7 @@ def __init__(self, common_objs, db, table): db, table, ) - self.key_re = re.compile(r"^DEPLOYMENT_ID\|\d+\|\S+$|^DEPLOYMENT_ID\|\d+$") + self.key_re = re.compile(r"^DEPLOYMENT_ID\|\d+\|\S+$|^DEPLOYMENT_ID\|\d+$|^DEPLOYMENT_ID\|\d+\|\S+\|NEIGHBOR_TYPE\|\S+$|^DEPLOYMENT_ID\|\d+\|NEIGHBOR_TYPE\|\S+") self.enabled = self.__get_enabled() self.prefix_match_tag = self.__get_routemap_tag() self.__load_constant_lists() @@ -55,8 +58,14 @@ def set_handler(self, key, data): return True if not self.__set_handler_validate(key, data): return True - key = key.replace("DEPLOYMENT_ID|", "") - deployment_id, community_value = key.split('|', 1) if '|' in key else (key, BGPAllowListMgr.EMPTY_COMMUNITY) + if 'NEIGHBOR_TYPE' in key: + keys = key.split('|NEIGHBOR_TYPE|', 1) + deployment_id = keys[0].replace("DEPLOYMENT_ID|", "") + neighbor_type, community_value = keys[1].split('|', 1) if '|' in keys[1] else (keys[1], BGPAllowListMgr.EMPTY_COMMUNITY) + else: + key = key.replace("DEPLOYMENT_ID|", "") + deployment_id, community_value = key.split('|', 1) if '|' in key else (key, BGPAllowListMgr.EMPTY_COMMUNITY) + neighbor_type = '' deployment_id = int(deployment_id) prefixes_v4 = [] prefixes_v6 = [] @@ -65,7 +74,7 @@ def set_handler(self, key, data): if "prefixes_v6" in data: prefixes_v6 = str(data['prefixes_v6']).split(",") default_action_community = self.__get_default_action_community(data) - self.__update_policy(deployment_id, community_value, prefixes_v4, prefixes_v6, default_action_community) + self.__update_policy(deployment_id, community_value, prefixes_v4, prefixes_v6, default_action_community, neighbor_type) return True def __set_handler_validate(self, key, data): @@ -85,13 +94,13 @@ def __set_handler_validate(self, key, data): prefixes_v6 = [] if "prefixes_v4" in data: prefixes_v4 = str(data["prefixes_v4"]).split(",") - if not all(TemplateFabric.is_ipv4(prefix) for prefix in prefixes_v4): + if not all(TemplateFabric.is_ipv4(re.split('ge|le', prefix)[0]) for prefix in prefixes_v4): arguments = "prefixes_v4", str(data["prefixes_v4"]) log_err("BGPAllowListMgr::Received BGP ALLOWED 'SET' message with invalid input[%s]:'%s'" % arguments) return False if "prefixes_v6" in data: prefixes_v6 = str(data["prefixes_v6"]).split(",") - if not all(TemplateFabric.is_ipv6(prefix) for prefix in prefixes_v6): + if not all(TemplateFabric.is_ipv6(re.split('ge|le', prefix)[0]) for prefix in prefixes_v6): arguments = "prefixes_v6", str(data["prefixes_v6"]) log_err("BGPAllowListMgr::Received BGP ALLOWED 'SET' message with invalid input[%s]:'%s'" % arguments) return False @@ -113,10 +122,18 @@ def del_handler(self, key): return if not self.__del_handler_validate(key): return - key = key.replace('DEPLOYMENT_ID|', '') - deployment_id, community = key.split('|', 1) if '|' in key else (key, BGPAllowListMgr.EMPTY_COMMUNITY) + + if 'NEIGHBOR_TYPE' in key: + keys = key.split('|NEIGHBOR_TYPE|', 1) + deployment_id = keys[0].replace("DEPLOYMENT_ID|", "") + neighbor_type, community_value = keys[1].split('|', 1) if '|' in keys[1] else (keys[1], BGPAllowListMgr.EMPTY_COMMUNITY) + else: + key = key.replace("DEPLOYMENT_ID|", "") + deployment_id, community_value = key.split('|', 1) if '|' in key else (key, BGPAllowListMgr.EMPTY_COMMUNITY) + neighbor_type = '' + deployment_id = int(deployment_id) - self.__remove_policy(deployment_id, community) + self.__remove_policy(deployment_id, community_value, neighbor_type) def __del_handler_validate(self, key): """ @@ -129,7 +146,7 @@ def __del_handler_validate(self, key): return False return True - def __update_policy(self, deployment_id, community_value, prefixes_v4, prefixes_v6, default_action): + def __update_policy(self, deployment_id, community_value, prefixes_v4, prefixes_v6, default_action, neighbor_type): """ Update "allow list" policy with parameters :param deployment_id: deployment id which policy will be changed @@ -139,12 +156,13 @@ def __update_policy(self, deployment_id, community_value, prefixes_v4, prefixes_ :param default_action: the default action for the policy. should be either 'permit' or 'deny' """ # update all related entries with the information - info = deployment_id, community_value, str(prefixes_v4), str(prefixes_v6) + info = deployment_id, community_value, str(prefixes_v4), str(prefixes_v6), neighbor_type msg = "BGPAllowListMgr::Updating 'Allow list' policy." msg += " deployment_id '%s'. community: '%s'" msg += " prefix_v4 '%s'. prefix_v6: '%s'" + msg += " neighbor_type %s" log_info(msg % info) - names = self.__generate_names(deployment_id, community_value) + names = self.__generate_names(deployment_id, community_value, neighbor_type) self.cfg_mgr.update() cmds = [] cmds += self.__update_prefix_list(self.V4, names['pl_v4'], prefixes_v4) @@ -156,14 +174,14 @@ def __update_policy(self, deployment_id, community_value, prefixes_v4, prefixes_ cmds += self.__update_default_route_map_entry(names['rm_v6'], default_action) if cmds: self.cfg_mgr.push_list(cmds) - peer_groups = self.__find_peer_group_by_deployment_id(deployment_id) + peer_groups = self.__find_peer_group(deployment_id, neighbor_type) self.cfg_mgr.restart_peer_groups(peer_groups) log_debug("BGPAllowListMgr::__update_policy. The peers configuration scheduled for updates") else: log_debug("BGPAllowListMgr::__update_policy. Nothing to update") log_info("BGPAllowListMgr::Done") - def __remove_policy(self, deployment_id, community_value): + def __remove_policy(self, deployment_id, community_value, neighbor_type): """ Remove "allow list" policy for given deployment_id and community_value :param deployment_id: deployment id which policy will be removed @@ -177,7 +195,7 @@ def __remove_policy(self, deployment_id, community_value): log_info(msg % info) default_action = self.__get_default_action_community() - names = self.__generate_names(deployment_id, community_value) + names = self.__generate_names(deployment_id, community_value, neighbor_type) self.cfg_mgr.update() cmds = [] cmds += self.__remove_allow_route_map_entry(self.V4, names['pl_v4'], names['community'], names['rm_v4']) @@ -189,7 +207,7 @@ def __remove_policy(self, deployment_id, community_value): cmds += self.__update_default_route_map_entry(names['rm_v6'], default_action) if cmds: self.cfg_mgr.push_list(cmds) - peer_groups = self.__find_peer_group_by_deployment_id(deployment_id) + peer_groups = self.__find_peer_group(deployment_id, neighbor_type) self.cfg_mgr.restart_peer_groups(peer_groups) log_debug("BGPAllowListMgr::__remove_policy. 'Allow list' policy was scheduled for removal") else: @@ -197,26 +215,42 @@ def __remove_policy(self, deployment_id, community_value): log_info('BGPAllowListMgr::Done') @staticmethod - def __generate_names(deployment_id, community_value): + def __generate_names(deployment_id, community_value, neighbor_type): """ Generate prefix-list names for a given peer_ip and community value :param deployment_id: deployment_id for which we're going to filter prefixes :param community_value: community, which we want to use to filter prefixes :return: a dictionary with names """ - if community_value == BGPAllowListMgr.EMPTY_COMMUNITY: - community_name = BGPAllowListMgr.EMPTY_COMMUNITY + if not neighbor_type: + if community_value == BGPAllowListMgr.EMPTY_COMMUNITY: + community_name = BGPAllowListMgr.EMPTY_COMMUNITY + else: + community_name = BGPAllowListMgr.COMMUNITY_NAME_TMPL % (deployment_id, community_value) + names = { + "pl_v4": BGPAllowListMgr.PL_NAME_TMPL % (deployment_id, community_value, '4'), + "pl_v6": BGPAllowListMgr.PL_NAME_TMPL % (deployment_id, community_value, '6'), + "rm_v4": BGPAllowListMgr.RM_NAME_TMPL % (deployment_id, '4'), + "rm_v6": BGPAllowListMgr.RM_NAME_TMPL % (deployment_id, '6'), + "community": community_name, + 'neigh_type': neighbor_type, + } + arguments = deployment_id, community_value, str(names) + log_debug("BGPAllowListMgr::__generate_names. deployment_id: %d, community: %s. names: %s" % arguments) else: - community_name = BGPAllowListMgr.COMMUNITY_NAME_TMPL % (deployment_id, community_value) - names = { - "pl_v4": BGPAllowListMgr.PL_NAME_TMPL % (deployment_id, community_value, '4'), - "pl_v6": BGPAllowListMgr.PL_NAME_TMPL % (deployment_id, community_value, '6'), - "rm_v4": BGPAllowListMgr.RM_NAME_TMPL % (deployment_id, '4'), - "rm_v6": BGPAllowListMgr.RM_NAME_TMPL % (deployment_id, '6'), - "community": community_name, - } - arguments = deployment_id, community_value, str(names) - log_debug("BGPAllowListMgr::__generate_names. deployment_id: %d, community: %s. names: %s" % arguments) + if community_value == BGPAllowListMgr.EMPTY_COMMUNITY: + community_name = BGPAllowListMgr.EMPTY_COMMUNITY + else: + community_name = BGPAllowListMgr.COMMUNITY_NAME_TMPL_WITH_NEIGH % (deployment_id, neighbor_type, community_value) + names = { + "pl_v4": BGPAllowListMgr.PL_NAME_TMPL_WITH_NEIGH % (deployment_id, neighbor_type, community_value, '4'), + "pl_v6": BGPAllowListMgr.PL_NAME_TMPL_WITH_NEIGH % (deployment_id, neighbor_type, community_value, '6'), + "rm_v4": BGPAllowListMgr.RM_NAME_TMPL_WITH_NEIGH % (deployment_id, neighbor_type, '4'), + "rm_v6": BGPAllowListMgr.RM_NAME_TMPL_WITH_NEIGH % (deployment_id, neighbor_type, '6'), + "community": community_name, + } + arguments = deployment_id, neighbor_type, community_value, str(names) + log_debug("BGPAllowListMgr::__generate_names. deployment_id: %d, neighbor_type: %s, community: %s. names: %s" % arguments) return names def __update_prefix_list(self, af, pl_name, allow_list): @@ -630,7 +664,7 @@ def __get_routemap_tag(self): return prefix_match_tag @staticmethod - def __get_peer_group_to_restart(deployment_id, pg_2_rm, rm_2_call): + def __get_peer_group_to_restart(deployment_id, pg_2_rm, rm_2_call, neighbor_type): """ Get peer_groups which are assigned to deployment_id :deployment_id: deployment_id number @@ -639,14 +673,17 @@ def __get_peer_group_to_restart(deployment_id, pg_2_rm, rm_2_call): :rm_2_call: a dictionary: key - name of a route-map, value - name of a route-map call defined for the route-map """ ret = set() - target_allow_list_prefix = 'ALLOW_LIST_DEPLOYMENT_ID_%d_V' % deployment_id + if not neighbor_type: + target_allow_list_prefix = 'ALLOW_LIST_DEPLOYMENT_ID_%d_V' % deployment_id + else: + target_allow_list_prefix = 'ALLOW_LIST_DEPLOYMENT_ID_%d_NEIGHBOR_%s_V' % (deployment_id, neighbor_type) for peer_group, route_map in pg_2_rm.items(): if route_map in rm_2_call: if rm_2_call[route_map].startswith(target_allow_list_prefix): ret.add(peer_group) return list(ret) - def __find_peer_group_by_deployment_id(self, deployment_id): + def __find_peer_group(self, deployment_id, neighbor_type): """ Deduce peer-group names which are connected to devices with requested deployment_id :param deployment_id: deployment_id number @@ -656,7 +693,7 @@ def __find_peer_group_by_deployment_id(self, deployment_id): peer_groups = self.__extract_peer_group_names() pg_2_rm = self.__get_peer_group_to_route_map(peer_groups) rm_2_call = self.__get_route_map_calls(set(pg_2_rm.values())) - ret = self.__get_peer_group_to_restart(deployment_id, pg_2_rm, rm_2_call) + ret = self.__get_peer_group_to_restart(deployment_id, pg_2_rm, rm_2_call, neighbor_type) return list(ret) def __get_enabled(self): @@ -706,11 +743,14 @@ def __to_prefix_list(self, af, allow_list): res = [] prefix_mask_default = 32 if af == self.V4 else 128 for prefix in allow_list: - prefix_mask = int(prefix.split("/")[1]) - if prefix_mask == prefix_mask_default: + if 'le' in prefix or 'ge' in prefix: res.append("permit %s" % prefix) else: - res.append("permit %s le %d" % (prefix, prefix_mask_default)) + prefix_mask = int(prefix.split("/")[1]) + if prefix_mask == prefix_mask_default: + res.append("permit %s" % prefix) + else: + res.append("permit %s le %d" % (prefix, prefix_mask_default)) return res def __af_to_family(self, af): diff --git a/src/sonic-bgpcfgd/tests/test_allow_list.py b/src/sonic-bgpcfgd/tests/test_allow_list.py index e77c692ee593..c5bec039c3e4 100644 --- a/src/sonic-bgpcfgd/tests/test_allow_list.py +++ b/src/sonic-bgpcfgd/tests/test_allow_list.py @@ -866,6 +866,131 @@ def test_set_handler_no_community_update_prefixes_remove(): ] ) +def test_set_handler_with_neighbor_type(): + set_del_test( + "SET", + ("DEPLOYMENT_ID|5|NEIGHBOR_TYPE|OpticalLonghaulTerminal", { + "prefixes_v4": "10.62.64.0/22 ge 30,"\ + "10.1.44.0/23 ge 30,"\ + "10.17.92.0/23 ge 30,"\ + "10.73.92.0/23 ge 30,"\ + "10.26.170.0/24 ge 30,"\ + "10.26.171.0/24 ge 30,"\ + "10.26.255.0/24 ge 30", + "prefixes_v6": "fc01:20::/64", + }), + [ + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V4 seq 10 deny 0.0.0.0/0 le 17', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V4 seq 20 permit 20.20.30.0/24 le 32', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V4 seq 30 permit 40.50.0.0/16 le 32', + 'ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V6 seq 10 deny ::/0 le 59', + 'ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V6 seq 20 deny ::/0 ge 65', + 'ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V6 seq 30 permit fc01:20::/64 le 128', + 'ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V6 seq 40 permit fc01:30::/64 le 128', + 'route-map ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_V4 permit 30000', + ' match ip address prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V4', + 'route-map ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_V6 permit 30000', + ' match ipv6 address prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V6', + 'route-map ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_V4 permit 65535', + ' set community 123:123 additive', + 'route-map ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_V6 permit 65535', + ' set community 123:123 additive', + "" + ], + [ + 'no ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V4', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V4 seq 10 deny 0.0.0.0/0 le 17', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V4 seq 20 permit 10.62.64.0/22 ge 30', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V4 seq 30 permit 10.1.44.0/23 ge 30', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V4 seq 40 permit 10.17.92.0/23 ge 30', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V4 seq 50 permit 10.73.92.0/23 ge 30', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V4 seq 60 permit 10.26.170.0/24 ge 30', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V4 seq 70 permit 10.26.171.0/24 ge 30', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V4 seq 80 permit 10.26.255.0/24 ge 30', + 'no ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V6', + 'ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V6 seq 10 deny ::/0 le 59', + 'ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V6 seq 20 deny ::/0 ge 65', + 'ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V6 seq 30 permit fc01:20::/64 le 128', + ] + ) + +def test_set_handler_with_neighbor_type_and_community(): + set_del_test( + "SET", + ("DEPLOYMENT_ID|5|NEIGHBOR_TYPE|OpticalLonghaulTerminal|1010:2020", { + "prefixes_v4": "10.62.64.0/22 ge 30,"\ + "10.1.44.0/23 ge 30,"\ + "10.17.92.0/23 ge 30,"\ + "10.73.92.0/23 ge 30,"\ + "10.26.170.0/24 ge 30,"\ + "10.26.171.0/24 ge 30,"\ + "10.26.255.0/24 ge 30", + "prefixes_v6": "fc01:20::/64", + }), + [ + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V4 seq 10 deny 0.0.0.0/0 le 17', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V4 seq 20 permit 20.20.30.0/24 le 32', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V4 seq 30 permit 40.50.0.0/16 le 32', + 'ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V6 seq 10 deny ::/0 le 59', + 'ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V6 seq 20 deny ::/0 ge 65', + 'ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V6 seq 30 permit fc01:20::/64 le 128', + 'ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V6 seq 40 permit fc01:30::/64 le 128', + 'bgp community-list standard COMMUNITY_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020 permit 1010:2020', + 'route-map ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_V4 permit 10', + ' match ip address prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V4', + ' match community COMMUNITY_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020', + 'route-map ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_V6 permit 10', + ' match ipv6 address prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V6', + ' match community COMMUNITY_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020', + 'route-map ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_V4 permit 65535', + ' set community 123:123 additive', + 'route-map ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_V6 permit 65535', + ' set community 123:123 additive', + "" + ], + [ + 'no ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V4', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V4 seq 10 deny 0.0.0.0/0 le 17', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V4 seq 20 permit 10.62.64.0/22 ge 30', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V4 seq 30 permit 10.1.44.0/23 ge 30', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V4 seq 40 permit 10.17.92.0/23 ge 30', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V4 seq 50 permit 10.73.92.0/23 ge 30', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V4 seq 60 permit 10.26.170.0/24 ge 30', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V4 seq 70 permit 10.26.171.0/24 ge 30', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V4 seq 80 permit 10.26.255.0/24 ge 30', + 'no ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V6', + 'ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V6 seq 10 deny ::/0 le 59', + 'ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V6 seq 20 deny ::/0 ge 65', + 'ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V6 seq 30 permit fc01:20::/64 le 128', + ] + ) + +def test_del_handler_with_neighbor_type_community_no_data(): + set_del_test( + "DEL", + ("DEPLOYMENT_ID|5|NEIGHBOR_TYPE|OpticalLonghaulTerminal|1010:2020",), + [ + 'route-map ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_V4 permit 65535', + ' set community 123:123 additive', + 'route-map ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_V6 permit 65535', + ' set community 123:123 additive' + ], + [] + ) + +def test_del_handler_with_neighbor_type_no_data(): + set_del_test( + "DEL", + ("DEPLOYMENT_ID|5|NEIGHBOR_TYPE|OpticalLonghaulTerminal",), + [ + 'route-map ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_V4 permit 65535', + ' set community 123:123 additive', + 'route-map ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_V6 permit 65535', + ' set community 123:123 additive' + ], + [] + ) + @patch.dict("sys.modules", swsscommon=swsscommon_module_mock) def test___set_handler_validate(): from bgpcfgd.managers_allow_list import BGPAllowListMgr @@ -894,7 +1019,7 @@ def test___set_handler_validate(): }) @patch.dict("sys.modules", swsscommon=swsscommon_module_mock) -def test___find_peer_group_by_deployment_id(): +def test___find_peer_group(): from bgpcfgd.managers_allow_list import BGPAllowListMgr cfg_mgr = MagicMock() cfg_mgr.update.return_value = None @@ -984,7 +1109,7 @@ def test___find_peer_group_by_deployment_id(): 'constants': global_constants, } mgr = BGPAllowListMgr(common_objs, "CONFIG_DB", "BGP_ALLOWED_PREFIXES") - values = mgr._BGPAllowListMgr__find_peer_group_by_deployment_id(0) + values = mgr._BGPAllowListMgr__find_peer_group(0, '') assert set(values) == {'PEER_V4_INT', 'PEER_V6_INT', 'PEER_V6', 'PEER_V4'} @patch.dict("sys.modules", swsscommon=swsscommon_module_mock) diff --git a/src/sonic-build-hooks/scripts/post_run_buildinfo b/src/sonic-build-hooks/scripts/post_run_buildinfo index e0d84d35bb08..97f47f7efcf1 100755 --- a/src/sonic-build-hooks/scripts/post_run_buildinfo +++ b/src/sonic-build-hooks/scripts/post_run_buildinfo @@ -11,3 +11,6 @@ rm -rf $BUILD_VERSION_PATH/* # Disable the build hooks symlink_build_hooks -d set_reproducible_mirrors -d + +# Remove the version deb preference +rm -f $VERSION_DEB_PREFERENCE diff --git a/src/sonic-config-engine/tests/sample_output/py2/docker-dhcp-relay-no-ip-helper.supervisord.conf b/src/sonic-config-engine/tests/sample_output/py2/docker-dhcp-relay-no-ip-helper.supervisord.conf new file mode 100644 index 000000000000..c36dbe22533b --- /dev/null +++ b/src/sonic-config-engine/tests/sample_output/py2/docker-dhcp-relay-no-ip-helper.supervisord.conf @@ -0,0 +1,80 @@ +[supervisord] +logfile_maxbytes=1MB +logfile_backups=2 +nodaemon=true + +[eventlistener:dependent-startup] +command=python3 -m supervisord_dependent_startup +autostart=true +autorestart=unexpected +startretries=0 +exitcodes=0,3 +events=PROCESS_STATE +buffer_size=1024 + +[eventlistener:supervisor-proc-exit-listener] +command=/usr/bin/supervisor-proc-exit-listener --container-name dhcp_relay +events=PROCESS_STATE_EXITED,PROCESS_STATE_RUNNING +autostart=true +autorestart=unexpected +buffer_size=1024 + +[program:rsyslogd] +command=/usr/sbin/rsyslogd -n -iNONE +priority=1 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog +dependent_startup=true + +[program:start] +command=/usr/bin/start.sh +priority=2 +autostart=false +autorestart=false +startsecs=0 +stdout_logfile=syslog +stderr_logfile=syslog +dependent_startup=true +dependent_startup_wait_for=rsyslogd:running + +[group:dhcp-relay] +programs=isc-dhcpv4-relay-Vlan1000,dhcp6relay + + +[program:isc-dhcpv4-relay-Vlan1000] +command=/usr/sbin/dhcrelay -d -m discard -a %%h:%%p %%P --name-alias-map-file /tmp/port-name-alias-map.txt -id Vlan1000 -iu Vlan2000 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 -iu PortChannel01 192.0.0.1 192.0.0.2 +priority=3 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog +dependent_startup=true +dependent_startup_wait_for=start:exited + + +[program:dhcp6relay] +command=/usr/sbin/dhcp6relay +priority=3 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog +dependent_startup=true +dependent_startup_wait_for=start:exited + +[group:dhcpmon] +programs=dhcpmon-Vlan1000 + +[program:dhcpmon-Vlan1000] +command=/usr/sbin/dhcpmon -id Vlan1000 -iu Vlan2000 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 -iu PortChannel01 -im eth0 +priority=4 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog +dependent_startup=true +dependent_startup_wait_for=isc-dhcpv4-relay-Vlan1000:running + + diff --git a/src/sonic-config-engine/tests/sample_output/py2/docker-dhcp-relay.supervisord.conf b/src/sonic-config-engine/tests/sample_output/py2/docker-dhcp-relay.supervisord.conf index 407ac2c80bc9..9d4a9d22de47 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/docker-dhcp-relay.supervisord.conf +++ b/src/sonic-config-engine/tests/sample_output/py2/docker-dhcp-relay.supervisord.conf @@ -40,7 +40,8 @@ dependent_startup=true dependent_startup_wait_for=rsyslogd:running [group:dhcp-relay] -programs=isc-dhcpv4-relay-Vlan1000,dhcp6relay +programs=isc-dhcpv4-relay-Vlan1000,isc-dhcpv4-relay-Vlan2000,dhcp6relay + [program:isc-dhcpv4-relay-Vlan1000] command=/usr/sbin/dhcrelay -d -m discard -a %%h:%%p %%P --name-alias-map-file /tmp/port-name-alias-map.txt -id Vlan1000 -iu Vlan2000 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 -iu PortChannel01 192.0.0.1 192.0.0.2 @@ -52,9 +53,19 @@ stderr_logfile=syslog dependent_startup=true dependent_startup_wait_for=start:exited +[program:isc-dhcpv4-relay-Vlan2000] +command=/usr/sbin/dhcrelay -d -m discard -a %%h:%%p %%P --name-alias-map-file /tmp/port-name-alias-map.txt -id Vlan2000 -iu Vlan1000 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 -iu PortChannel01 192.0.0.3 192.0.0.4 +priority=3 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog +dependent_startup=true +dependent_startup_wait_for=start:exited + + [program:dhcp6relay] command=/usr/sbin/dhcp6relay - priority=3 autostart=false autorestart=false @@ -63,9 +74,8 @@ stderr_logfile=syslog dependent_startup=true dependent_startup_wait_for=start:exited - [group:dhcpmon] -programs=dhcpmon-Vlan1000 +programs=dhcpmon-Vlan1000,dhcpmon-Vlan2000 [program:dhcpmon-Vlan1000] command=/usr/sbin/dhcpmon -id Vlan1000 -iu Vlan2000 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 -iu PortChannel01 -im eth0 @@ -75,6 +85,16 @@ autorestart=false stdout_logfile=syslog stderr_logfile=syslog dependent_startup=true -dependent_startup_wait_for=isc-dhcpv4-relay-Vlan1000:running dhcp6relay:running +dependent_startup_wait_for=isc-dhcpv4-relay-Vlan1000:running + +[program:dhcpmon-Vlan2000] +command=/usr/sbin/dhcpmon -id Vlan2000 -iu Vlan1000 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 -iu PortChannel01 -im eth0 +priority=4 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog +dependent_startup=true +dependent_startup_wait_for=isc-dhcpv4-relay-Vlan2000:running diff --git a/src/sonic-config-engine/tests/sample_output/py3/buffer-arista7260-t1.json b/src/sonic-config-engine/tests/sample_output/py3/buffer-arista7260-t1.json index 5ae6e6205a2d..ecaa1a88db48 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/buffer-arista7260-t1.json +++ b/src/sonic-config-engine/tests/sample_output/py3/buffer-arista7260-t1.json @@ -112,21 +112,9 @@ "Ethernet0|0": { "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" }, - "Ethernet0|2": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, - "Ethernet0|6": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, "Ethernet4|0": { "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" }, - "Ethernet4|2": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, - "Ethernet4|6": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, "Ethernet144|0": { "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" }, @@ -136,21 +124,9 @@ "Ethernet16|0": { "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" }, - "Ethernet16|2": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, - "Ethernet16|6": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, "Ethernet20|0": { "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" }, - "Ethernet20|2": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, - "Ethernet20|6": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, "Ethernet152|0": { "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" }, @@ -160,21 +136,9 @@ "Ethernet64|0": { "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" }, - "Ethernet64|2": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, - "Ethernet64|6": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, "Ethernet68|0": { "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" }, - "Ethernet68|2": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, - "Ethernet68|6": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, "Ethernet168|0": { "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" }, @@ -184,21 +148,9 @@ "Ethernet80|0": { "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" }, - "Ethernet80|2": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, - "Ethernet80|6": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, "Ethernet84|0": { "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" }, - "Ethernet84|2": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, - "Ethernet84|6": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, "Ethernet180|0": { "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" }, diff --git a/src/sonic-config-engine/tests/sample_output/py3/buffers-mellanox4600c-t1-dynamic.json b/src/sonic-config-engine/tests/sample_output/py3/buffers-mellanox4600c-t1-dynamic.json index 38b865b81a9a..21ab1aac0aeb 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/buffers-mellanox4600c-t1-dynamic.json +++ b/src/sonic-config-engine/tests/sample_output/py3/buffers-mellanox4600c-t1-dynamic.json @@ -997,28 +997,28 @@ "Ethernet84|0-2": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet0|5-6": { + "Ethernet0|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet4|5-6": { + "Ethernet4|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet16|5-6": { + "Ethernet16|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet20|5-6": { + "Ethernet20|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet64|5-6": { + "Ethernet64|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet68|5-6": { + "Ethernet68|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet80|5-6": { + "Ethernet80|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet84|5-6": { + "Ethernet84|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, "Ethernet136|0-1": { @@ -1538,112 +1538,112 @@ "Ethernet236|0-2": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet8|5-6": { + "Ethernet8|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet12|5-6": { + "Ethernet12|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet24|5-6": { + "Ethernet24|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet28|5-6": { + "Ethernet28|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet32|5-6": { + "Ethernet32|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet36|5-6": { + "Ethernet36|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet40|5-6": { + "Ethernet40|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet44|5-6": { + "Ethernet44|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet48|5-6": { + "Ethernet48|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet52|5-6": { + "Ethernet52|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet56|5-6": { + "Ethernet56|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet60|5-6": { + "Ethernet60|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet72|5-6": { + "Ethernet72|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet76|5-6": { + "Ethernet76|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet88|5-6": { + "Ethernet88|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet92|5-6": { + "Ethernet92|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet96|5-6": { + "Ethernet96|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet100|5-6": { + "Ethernet100|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet104|5-6": { + "Ethernet104|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet108|5-6": { + "Ethernet108|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet112|5-6": { + "Ethernet112|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet116|5-6": { + "Ethernet116|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet120|5-6": { + "Ethernet120|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet124|5-6": { + "Ethernet124|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet128|5-6": { + "Ethernet128|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet132|5-6": { + "Ethernet132|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet140|5-6": { + "Ethernet140|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet160|5-6": { + "Ethernet160|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet164|5-6": { + "Ethernet164|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet172|5-6": { + "Ethernet172|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet192|5-6": { + "Ethernet192|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet196|5-6": { + "Ethernet196|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet204|5-6": { + "Ethernet204|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet224|5-6": { + "Ethernet224|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet228|5-6": { + "Ethernet228|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet236|5-6": { + "Ethernet236|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" } } diff --git a/src/sonic-config-engine/tests/sample_output/py3/buffers-mellanox4600c-t1.json b/src/sonic-config-engine/tests/sample_output/py3/buffers-mellanox4600c-t1.json index fd9d75f31313..adef78b44e2a 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/buffers-mellanox4600c-t1.json +++ b/src/sonic-config-engine/tests/sample_output/py3/buffers-mellanox4600c-t1.json @@ -773,28 +773,28 @@ "Ethernet84|0-2": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet0|5-6": { + "Ethernet0|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet4|5-6": { + "Ethernet4|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet16|5-6": { + "Ethernet16|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet20|5-6": { + "Ethernet20|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet64|5-6": { + "Ethernet64|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet68|5-6": { + "Ethernet68|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet80|5-6": { + "Ethernet80|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet84|5-6": { + "Ethernet84|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, "Ethernet136|0-1": { @@ -1314,112 +1314,112 @@ "Ethernet236|0-2": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet8|5-6": { + "Ethernet8|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet12|5-6": { + "Ethernet12|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet24|5-6": { + "Ethernet24|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet28|5-6": { + "Ethernet28|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet32|5-6": { + "Ethernet32|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet36|5-6": { + "Ethernet36|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet40|5-6": { + "Ethernet40|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet44|5-6": { + "Ethernet44|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet48|5-6": { + "Ethernet48|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet52|5-6": { + "Ethernet52|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet56|5-6": { + "Ethernet56|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet60|5-6": { + "Ethernet60|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet72|5-6": { + "Ethernet72|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet76|5-6": { + "Ethernet76|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet88|5-6": { + "Ethernet88|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet92|5-6": { + "Ethernet92|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet96|5-6": { + "Ethernet96|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet100|5-6": { + "Ethernet100|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet104|5-6": { + "Ethernet104|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet108|5-6": { + "Ethernet108|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet112|5-6": { + "Ethernet112|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet116|5-6": { + "Ethernet116|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet120|5-6": { + "Ethernet120|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet124|5-6": { + "Ethernet124|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet128|5-6": { + "Ethernet128|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet132|5-6": { + "Ethernet132|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet140|5-6": { + "Ethernet140|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet160|5-6": { + "Ethernet160|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet164|5-6": { + "Ethernet164|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet172|5-6": { + "Ethernet172|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet192|5-6": { + "Ethernet192|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet196|5-6": { + "Ethernet196|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet204|5-6": { + "Ethernet204|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet224|5-6": { + "Ethernet224|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet228|5-6": { + "Ethernet228|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet236|5-6": { + "Ethernet236|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" } } diff --git a/src/sonic-config-engine/tests/sample_output/py3/docker-dhcp-relay-no-ip-helper.supervisord.conf b/src/sonic-config-engine/tests/sample_output/py3/docker-dhcp-relay-no-ip-helper.supervisord.conf new file mode 100644 index 000000000000..35ad0c48b82f --- /dev/null +++ b/src/sonic-config-engine/tests/sample_output/py3/docker-dhcp-relay-no-ip-helper.supervisord.conf @@ -0,0 +1,80 @@ +[supervisord] +logfile_maxbytes=1MB +logfile_backups=2 +nodaemon=true + +[eventlistener:dependent-startup] +command=python3 -m supervisord_dependent_startup +autostart=true +autorestart=unexpected +startretries=0 +exitcodes=0,3 +events=PROCESS_STATE +buffer_size=1024 + +[eventlistener:supervisor-proc-exit-listener] +command=/usr/bin/supervisor-proc-exit-listener --container-name dhcp_relay +events=PROCESS_STATE_EXITED,PROCESS_STATE_RUNNING +autostart=true +autorestart=unexpected +buffer_size=1024 + +[program:rsyslogd] +command=/usr/sbin/rsyslogd -n -iNONE +priority=1 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog +dependent_startup=true + +[program:start] +command=/usr/bin/start.sh +priority=2 +autostart=false +autorestart=false +startsecs=0 +stdout_logfile=syslog +stderr_logfile=syslog +dependent_startup=true +dependent_startup_wait_for=rsyslogd:running + +[group:dhcp-relay] +programs=isc-dhcpv4-relay-Vlan1000,dhcp6relay + + +[program:isc-dhcpv4-relay-Vlan1000] +command=/usr/sbin/dhcrelay -d -m discard -a %%h:%%p %%P --name-alias-map-file /tmp/port-name-alias-map.txt -id Vlan1000 -iu Vlan2000 -iu PortChannel01 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 192.0.0.1 192.0.0.2 +priority=3 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog +dependent_startup=true +dependent_startup_wait_for=start:exited + + +[program:dhcp6relay] +command=/usr/sbin/dhcp6relay +priority=3 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog +dependent_startup=true +dependent_startup_wait_for=start:exited + +[group:dhcpmon] +programs=dhcpmon-Vlan1000 + +[program:dhcpmon-Vlan1000] +command=/usr/sbin/dhcpmon -id Vlan1000 -iu Vlan2000 -iu PortChannel01 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 -im eth0 +priority=4 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog +dependent_startup=true +dependent_startup_wait_for=isc-dhcpv4-relay-Vlan1000:running + + diff --git a/src/sonic-config-engine/tests/sample_output/py3/docker-dhcp-relay.supervisord.conf b/src/sonic-config-engine/tests/sample_output/py3/docker-dhcp-relay.supervisord.conf index 5456409738e6..7ea29dfcd635 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/docker-dhcp-relay.supervisord.conf +++ b/src/sonic-config-engine/tests/sample_output/py3/docker-dhcp-relay.supervisord.conf @@ -40,7 +40,8 @@ dependent_startup=true dependent_startup_wait_for=rsyslogd:running [group:dhcp-relay] -programs=isc-dhcpv4-relay-Vlan1000,dhcp6relay +programs=isc-dhcpv4-relay-Vlan1000,isc-dhcpv4-relay-Vlan2000,dhcp6relay + [program:isc-dhcpv4-relay-Vlan1000] command=/usr/sbin/dhcrelay -d -m discard -a %%h:%%p %%P --name-alias-map-file /tmp/port-name-alias-map.txt -id Vlan1000 -iu Vlan2000 -iu PortChannel01 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 192.0.0.1 192.0.0.2 @@ -52,9 +53,19 @@ stderr_logfile=syslog dependent_startup=true dependent_startup_wait_for=start:exited +[program:isc-dhcpv4-relay-Vlan2000] +command=/usr/sbin/dhcrelay -d -m discard -a %%h:%%p %%P --name-alias-map-file /tmp/port-name-alias-map.txt -id Vlan2000 -iu Vlan1000 -iu PortChannel01 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 192.0.0.3 192.0.0.4 +priority=3 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog +dependent_startup=true +dependent_startup_wait_for=start:exited + + [program:dhcp6relay] command=/usr/sbin/dhcp6relay - priority=3 autostart=false autorestart=false @@ -63,9 +74,8 @@ stderr_logfile=syslog dependent_startup=true dependent_startup_wait_for=start:exited - [group:dhcpmon] -programs=dhcpmon-Vlan1000 +programs=dhcpmon-Vlan1000,dhcpmon-Vlan2000 [program:dhcpmon-Vlan1000] command=/usr/sbin/dhcpmon -id Vlan1000 -iu Vlan2000 -iu PortChannel01 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 -im eth0 @@ -75,6 +85,16 @@ autorestart=false stdout_logfile=syslog stderr_logfile=syslog dependent_startup=true -dependent_startup_wait_for=isc-dhcpv4-relay-Vlan1000:running dhcp6relay:running +dependent_startup_wait_for=isc-dhcpv4-relay-Vlan1000:running + +[program:dhcpmon-Vlan2000] +command=/usr/sbin/dhcpmon -id Vlan2000 -iu Vlan1000 -iu PortChannel01 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 -im eth0 +priority=4 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog +dependent_startup=true +dependent_startup_wait_for=isc-dhcpv4-relay-Vlan2000:running diff --git a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7050cx3-dualtor.json b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7050cx3-dualtor.json index 4e524e2bf7d1..05c15034ca70 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7050cx3-dualtor.json +++ b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7050cx3-dualtor.json @@ -43,7 +43,7 @@ "3": "3", "4": "4", "5": "5", - "6": "6", + "6": "1", "7": "7", "8": "1" }, diff --git a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-dualtor.json b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-dualtor.json index b7ddd361965c..6edfa8b0e9c4 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-dualtor.json +++ b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-dualtor.json @@ -43,7 +43,7 @@ "3": "3", "4": "4", "5": "5", - "6": "6", + "6": "1", "7": "7", "8": "1" }, diff --git a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-t1.json b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-t1.json index 7196d22c2f2d..34f745f19624 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-t1.json +++ b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-t1.json @@ -89,6 +89,72 @@ "61": "1", "62": "1", "63": "1" + }, + "AZURE_UPLINK": { + "0" : "1", + "1" : "1", + "2" : "1", + "3" : "3", + "4" : "4", + "5" : "1", + "6" : "1", + "7" : "1", + "8" : "0", + "9" : "1", + "10": "1", + "11": "1", + "12": "1", + "13": "1", + "14": "1", + "15": "1", + "16": "1", + "17": "1", + "18": "1", + "19": "1", + "20": "1", + "21": "1", + "22": "1", + "23": "1", + "24": "1", + "25": "1", + "26": "1", + "27": "1", + "28": "1", + "29": "1", + "30": "1", + "31": "1", + "32": "1", + "33": "1", + "34": "1", + "35": "1", + "36": "1", + "37": "1", + "38": "1", + "39": "1", + "40": "1", + "41": "1", + "42": "1", + "43": "1", + "44": "1", + "45": "1", + "46": "5", + "47": "1", + "48": "7", + "49": "1", + "50": "1", + "51": "1", + "52": "1", + "53": "1", + "54": "1", + "55": "1", + "56": "1", + "57": "1", + "58": "1", + "59": "1", + "60": "1", + "61": "1", + "62": "1", + "63": "1" } }, "TC_TO_PRIORITY_GROUP_MAP": { @@ -118,7 +184,7 @@ "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]" }, "Ethernet0": { - "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE_UPLINK]", "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", @@ -126,7 +192,7 @@ "pfcwd_sw_enable" : "3,4" }, "Ethernet4": { - "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE_UPLINK]", "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", @@ -134,7 +200,7 @@ "pfcwd_sw_enable" : "3,4" }, "Ethernet16": { - "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE_UPLINK]", "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", @@ -142,7 +208,7 @@ "pfcwd_sw_enable" : "3,4" }, "Ethernet20": { - "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE_UPLINK]", "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", @@ -150,7 +216,7 @@ "pfcwd_sw_enable" : "3,4" }, "Ethernet64": { - "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE_UPLINK]", "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", @@ -158,7 +224,7 @@ "pfcwd_sw_enable" : "3,4" }, "Ethernet68": { - "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE_UPLINK]", "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", @@ -166,7 +232,7 @@ "pfcwd_sw_enable" : "3,4" }, "Ethernet80": { - "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE_UPLINK]", "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", @@ -174,7 +240,7 @@ "pfcwd_sw_enable" : "3,4" }, "Ethernet84": { - "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE_UPLINK]", "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", diff --git a/src/sonic-config-engine/tests/t0-sample-graph.xml b/src/sonic-config-engine/tests/t0-sample-graph.xml index c06cc708c1ce..88d325b09d1b 100644 --- a/src/sonic-config-engine/tests/t0-sample-graph.xml +++ b/src/sonic-config-engine/tests/t0-sample-graph.xml @@ -270,7 +270,8 @@ 0.0.0.0/0 - + 192.0.0.3;192.0.0.4 + fc02:2000::3;fc02:2000::4 2000 2000 192.168.200.0/27 diff --git a/src/sonic-config-engine/tests/t0-sample-no-ip-helper-graph.xml b/src/sonic-config-engine/tests/t0-sample-no-ip-helper-graph.xml new file mode 100644 index 000000000000..b02304a49e14 --- /dev/null +++ b/src/sonic-config-engine/tests/t0-sample-no-ip-helper-graph.xml @@ -0,0 +1,938 @@ + + + + + + switch-t0 + 10.1.0.32 + BGPMonitor + 10.20.30.40 + 30 + 10 + 3 + + + false + switch-t0 + 10.0.0.56 + ARISTA01T1 + 10.0.0.57 + 1 + 180 + 60 + + + switch-t0 + FC00::71 + ARISTA01T1 + FC00::72 + 1 + 180 + 60 + + + false + switch-t0 + 10.0.0.58 + ARISTA02T1 + 10.0.0.59 + 1 + 180 + 60 + + + switch-t0 + FC00::75 + ARISTA02T1 + FC00::76 + 1 + 180 + 60 + + + false + switch-t0 + 10.0.0.60 + ARISTA03T1 + 10.0.0.61 + 1 + 180 + 60 + + + switch-t0 + FC00::79 + ARISTA03T1 + FC00::7A + 1 + 180 + 60 + + + false + switch-t0 + 10.0.0.62 + ARISTA04T1 + 10.0.0.63 + 1 + 180 + 60 + + + switch-t0 + FC00::7D + ARISTA04T1 + FC00::7E + 1 + 180 + 60 + + + + + 1 + + BGPMonitor + + + BGPPeer +
10.1.0.32
+ + + +
+
+ +
+ + 65100 + switch-t0 + + +
10.0.0.57
+ + + +
+ +
10.0.0.59
+ + + +
+ +
10.0.0.61
+ + + +
+ +
10.0.0.63
+ + + +
+
+ +
+ + 64600 + ARISTA01T1 + + + + 64600 + ARISTA02T1 + + + + 64600 + ARISTA03T1 + + + + 64600 + ARISTA04T1 + + +
+
+ + + + + + HostIP + Loopback0 + + 10.1.0.32/32 + + 10.1.0.32/32 + + + HostIP1 + Loopback0 + + FC00:1::32/128 + + FC00:1::32/128 + + + LoopbackIP1 + Loopback1 + + 10.10.0.99/32 + + 10.10.0.99/32 + + + LoopbackIP2 + Loopback2 + + 10.21.0.64/32 + + 10.21.0.64/32 + + + LoopbackIP3 + Loopback3 + + 10.21.64.2/32 + + 10.21.64.2/32 + + + + + HostIP + eth0 + + 10.0.0.100/24 + + 10.0.0.100/24 + + + HostIP + eth0 + + 2603:10e2:0:2902::8/64 + + 2603:10e2:0:2902::8/64 + + + + + + + switch-t0 + + + PortChannel01 + fortyGigE0/112 + + + + PortChannel02 + fortyGigE0/116 + + + + PortChannel03 + fortyGigE0/120 + + + + PortChannel04 + fortyGigE0/124 + + + + + + Vlan1000 + fortyGigE0/4;fortyGigE0/8;fortyGigE0/12;fortyGigE0/16;fortyGigE0/20;fortyGigE0/24;fortyGigE0/28;fortyGigE0/32;fortyGigE0/36;fortyGigE0/40;fortyGigE0/44;fortyGigE0/48;fortyGigE0/52;fortyGigE0/56;fortyGigE0/60;fortyGigE0/64;fortyGigE0/68;fortyGigE0/72;fortyGigE0/76;fortyGigE0/80;fortyGigE0/84;fortyGigE0/88;fortyGigE0/92;fortyGigE0/96 + False + 0.0.0.0/0 + + + 192.0.0.1;192.0.0.2 + fc02:2000::1;fc02:2000::2 + 1000 + 1000 + 192.168.0.0/27 + + + + + Vlan2000 + fortyGigE0/112;fortyGigE0/116;fortyGigE0/120 + False + 0.0.0.0/0 + + + + + 2000 + 2000 + 192.168.200.0/27 + + + + + Vlan99 + fortyGigE0/100 + False + 0.0.0.0/0 + + UserDefinedL2Vlan + 192.0.0.1;192.0.0.2 + 99 + 99 + + + + + + Vlan98 + fortyGigE0/100;PortChannel01;PortChannel03 + False + 0.0.0.0/0 + + UserDefinedL2Vlan + 192.0.0.1;192.0.0.2 + 98 + 98 + + + + + + + + + PortChannel01 + 10.0.0.56/31 + + + + PortChannel01 + FC00::71/126 + + + + PortChannel02 + 10.0.0.58/31 + + + + PortChannel02 + FC00::75/126 + + + + PortChannel03 + 10.0.0.60/31 + + + + PortChannel03 + FC00::79/126 + + + + PortChannel04 + 10.0.0.62/31 + + + + PortChannel04 + FC00::7D/126 + + + + Vlan1000 + 192.168.0.1/27 + + + + Vlan2000 + 192.168.200.1/27 + + + + + + ERSPAN + everflow + Everflow + + + ERSPANv6 + everflowV6 + Everflow + + + EGRESS_ERSPAN + everflow_egress + Everflow + + + PortChannel01;PortChannel02;PortChannel03;PortChannel04 + DataAclIngress + DataPlane + + + PortChannel01;PortChannel02;Vlan98 + DataAclEgress + DataPlane + + + SNMP + SNMP_ACL + SNMP + + + NTP + NTP_ACL + NTP + + + SSH + SSH_ACL + SSH + + + SSH + ROUTER-PROTECT + SSH + + + SNMP + ROUTER-PROTECT + SNMP + + + NTP + NTP_ACL + + + + + + + + + + DeviceInterfaceLink + ARISTA01T1 + Ethernet1/1 + switch-t0 + fortyGigE0/112 + + + DeviceInterfaceLink + ARISTA02T1 + Ethernet1/1 + switch-t0 + fortyGigE0/116 + + + DeviceInterfaceLink + ARISTA03T1 + Ethernet1/1 + switch-t0 + fortyGigE0/120 + + + DeviceInterfaceLink + ARISTA04T1 + Ethernet1/1 + switch-t0 + fortyGigE0/124 + 100000 + + + DeviceInterfaceLink + 100000 + switch-t0 + fortyGigE0/4 + true + ARISTA05T1 + Ethernet1/33 + true + + + DeviceInterfaceLink + Servers0 + eth0 + switch-t0 + fortyGigE0/4 + + + DeviceInterfaceLink + Servers100 + eth0 + switch-t0 + fortyGigE0/100 + + + + + switch-t0 + Force10-S6000 + + + ARISTA01T1 + Arista + + + ARISTA02T1 + Arista + + + ARISTA03T1 + Arista + + + ARISTA04T1 + Arista + + + + + + + + DeviceInterface + + true + 1 + Ethernet0 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet8 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet12 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet16 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet20 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet24 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet28 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet32 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet36 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet40 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet44 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet48 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet52 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet56 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet60 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet64 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet68 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet72 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet76 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet80 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet84 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet88 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet92 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet96 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet100 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet104 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet108 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet112 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet116 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet120 + + false + 0 + 0 + 40000 + + + Force10-S6000 + + + + + + + switch-t0 + + + ErspanDestinationIpv4 + + 2.2.2.2 + + + + + + + + + + + + + AutoNegotiation + + True + + + FECDisabled + + True + + + ARISTA05T1:Ethernet1/33;switch-t0:fortyGigE0/4 + + + + + + AutoNegotiation + + False + + + FECDisabled + + True + + + ARISTA06T1:Ethernet1/34;switch-t0:fortyGigE0/8 + + + + + + + switch-t0 + + + DeploymentId + + 1 + + + + + + + switch-t0 + Force10-S6000 +
diff --git a/src/sonic-config-engine/tests/test_j2files.py b/src/sonic-config-engine/tests/test_j2files.py index 0bc849656575..d6a214809c69 100644 --- a/src/sonic-config-engine/tests/test_j2files.py +++ b/src/sonic-config-engine/tests/test_j2files.py @@ -24,6 +24,7 @@ def setUp(self): self.multi_asic_minigraph = os.path.join(self.test_dir, 'multi_npu_data', 'sample-minigraph.xml') self.multi_asic_port_config = os.path.join(self.test_dir, 'multi_npu_data', 'sample_port_config-0.ini') self.radv_test_minigraph = os.path.join(self.test_dir, 'radv-test-sample-graph.xml') + self.no_ip_helper_minigraph = os.path.join(self.test_dir, 't0-sample-no-ip-helper-graph.xml') self.output_file = os.path.join(self.test_dir, 'output') os.environ["CFGGEN_UNIT_TESTING"] = "2" @@ -107,6 +108,12 @@ def test_dhcp_relay(self): self.run_script(argument) self.assertTrue(utils.cmp(os.path.join(self.test_dir, 'sample_output', utils.PYvX_DIR, 'docker-dhcp-relay.supervisord.conf'), self.output_file)) + # Test generation of docker-dhcp-relay.supervisord.conf when a vlan is missing ip/ipv6 helpers + template_path = os.path.join(self.test_dir, '..', '..', '..', 'dockers', 'docker-dhcp-relay', 'docker-dhcp-relay.supervisord.conf.j2') + argument = '-m ' + self.no_ip_helper_minigraph + ' -p ' + self.t0_port_config + ' -t ' + template_path + ' > ' + self.output_file + self.run_script(argument) + self.assertTrue(utils.cmp(os.path.join(self.test_dir, 'sample_output', utils.PYvX_DIR, 'docker-dhcp-relay-no-ip-helper.supervisord.conf'), self.output_file)) + def test_radv(self): # Test generation of radvd.conf with multiple ipv6 prefixes template_path = os.path.join(self.test_dir, '..', '..', '..', 'dockers', 'docker-router-advertiser', 'radvd.conf.j2') diff --git a/src/sonic-ctrmgrd/ctrmgr/ctrmgrd.py b/src/sonic-ctrmgrd/ctrmgr/ctrmgrd.py index 3941a05a738a..2defb6e45387 100755 --- a/src/sonic-ctrmgrd/ctrmgr/ctrmgrd.py +++ b/src/sonic-ctrmgrd/ctrmgr/ctrmgrd.py @@ -104,10 +104,12 @@ def log_debug(m): def log_error(m): + msg = "{}: {}".format(inspect.stack()[1][3], m) syslog.syslog(syslog.LOG_ERR, msg) def log_info(m): + msg = "{}: {}".format(inspect.stack()[1][3], m) syslog.syslog(syslog.LOG_INFO, msg) diff --git a/src/sonic-ctrmgrd/ctrmgr/kube_commands.py b/src/sonic-ctrmgrd/ctrmgr/kube_commands.py index 9a6ea9ed8dff..3adea36ef12c 100755 --- a/src/sonic-ctrmgrd/ctrmgr/kube_commands.py +++ b/src/sonic-ctrmgrd/ctrmgr/kube_commands.py @@ -13,10 +13,14 @@ import syslog import tempfile import urllib.request +import base64 from urllib.parse import urlparse import yaml +import requests from sonic_py_common import device_info +from jinja2 import Template +from swsscommon import swsscommon KUBE_ADMIN_CONF = "/etc/sonic/kube_admin.conf" KUBELET_YAML = "/var/lib/kubelet/config.yaml" @@ -24,6 +28,9 @@ LOCK_FILE = "/var/lock/kube_join.lock" FLANNEL_CONF_FILE = "/usr/share/sonic/templates/kube_cni.10-flannel.conflist" CNI_DIR = "/etc/cni/net.d" +K8S_CA_URL = "https://{}:{}/api/v1/namespaces/default/configmaps/kube-root-ca.crt" +AME_CRT = "/etc/sonic/credentials/restapiserver.crt" +AME_KEY = "/etc/sonic/credentials/restapiserver.key" def log_debug(m): msg = "{}: {}".format(inspect.stack()[1][3], m) @@ -77,8 +84,7 @@ def _run_command(cmd, timeout=5): def kube_read_labels(): """ Read current labels on node and return as dict. """ - KUBECTL_GET_CMD = "kubectl --kubeconfig {} get nodes --show-labels |\ - grep {} | tr -s ' ' | cut -f6 -d' '" + KUBECTL_GET_CMD = "kubectl --kubeconfig {} get nodes {} --show-labels |tr -s ' ' | cut -f6 -d' '" labels = {} ret, out, _ = _run_command(KUBECTL_GET_CMD.format( @@ -211,6 +217,68 @@ def _download_file(server, port, insecure): log_debug("{} downloaded".format(KUBE_ADMIN_CONF)) +def _gen_cli_kubeconf(server, port, insecure): + """generate identity which can help authenticate and + authorization to k8s cluster + """ + client_kubeconfig_template = """ +apiVersion: v1 +clusters: +- cluster: + certificate-authority-data: {{ k8s_ca }} + server: https://{{ vip }}:{{ port }} + name: kubernetes +contexts: +- context: + cluster: kubernetes + user: user + name: user@kubernetes +current-context: user@kubernetes +kind: Config +preferences: {} +users: +- name: user + user: + client-certificate-data: {{ ame_crt }} + client-key-data: {{ ame_key }} + """ + if insecure: + r = requests.get(K8S_CA_URL.format(server, port), cert=(AME_CRT, AME_KEY), verify=False) + else: + r = requests.get(K8S_CA_URL.format(server, port), cert=(AME_CRT, AME_KEY)) + if not r.ok: + raise requests.RequestException("Something wrong with AME cert or something wrong about sonic role in k8s cluster") + k8s_ca = r.json()["data"]["ca.crt"] + k8s_ca_b64 = base64.b64encode(k8s_ca.encode("utf-8")).decode("utf-8") + ame_crt_raw = open(AME_CRT, "rb") + ame_crt_b64 = base64.b64encode(ame_crt_raw.read()).decode("utf-8") + ame_key_raw = open(AME_KEY, "rb") + ame_key_b64 = base64.b64encode(ame_key_raw.read()).decode("utf-8") + client_kubeconfig_template_j2 = Template(client_kubeconfig_template) + client_kubeconfig = client_kubeconfig_template_j2.render( + k8s_ca=k8s_ca_b64, vip=server, port=port, ame_crt=ame_crt_b64, ame_key=ame_key_b64) + (h, fname) = tempfile.mkstemp(suffix="_kube_join") + os.write(h, client_kubeconfig.encode("utf-8")) + os.close(h) + log_debug("Downloaded = {}".format(fname)) + + shutil.copyfile(fname, KUBE_ADMIN_CONF) + + log_debug("{} downloaded".format(KUBE_ADMIN_CONF)) + + +def _get_local_ipv6(): + try: + config_db = swsscommon.DBConnector("CONFIG_DB", 0) + mgmt_ip_data = swsscommon.Table(config_db, 'MGMT_INTERFACE') + for key in mgmt_ip_data.getKeys(): + if key.find(":") >= 0: + return key.split("|")[1].split("/")[0] + raise IOError("IPV6 not find from MGMT_INTERFACE table") + except Exception as e: + raise IOError(str(e)) + + def _troubleshoot_tips(): """ log troubleshoot tips which could be handy, when in trouble with join @@ -264,12 +332,14 @@ def _do_reset(pending_join = False): def _do_join(server, port, insecure): - KUBEADM_JOIN_CMD = "kubeadm join --discovery-file {} --node-name {}" + KUBEADM_JOIN_CMD = "kubeadm join --discovery-file {} --node-name {} --apiserver-advertise-address {}" err = "" out = "" ret = 0 try: - _download_file(server, port, insecure) + local_ipv6 = _get_local_ipv6() + #_download_file(server, port, insecure) + _gen_cli_kubeconf(server, port, insecure) _do_reset(True) _run_command("modprobe br_netfilter") # Copy flannel.conf @@ -279,11 +349,11 @@ def _do_join(server, port, insecure): if ret == 0: (ret, out, err) = _run_command(KUBEADM_JOIN_CMD.format( - KUBE_ADMIN_CONF, get_device_name()), timeout=60) + KUBE_ADMIN_CONF, get_device_name(), local_ipv6), timeout=60) log_debug("ret = {}".format(ret)) except IOError as e: - err = "Download failed: {}".format(str(e)) + err = "Join failed: {}".format(str(e)) ret = -1 out = "" diff --git a/src/sonic-ctrmgrd/tests/common_test.py b/src/sonic-ctrmgrd/tests/common_test.py index 6e9763962bde..9283e3ad258e 100755 --- a/src/sonic-ctrmgrd/tests/common_test.py +++ b/src/sonic-ctrmgrd/tests/common_test.py @@ -9,6 +9,7 @@ CONFIG_DB_NO = 4 STATE_DB_NO = 6 FEATURE_TABLE = "FEATURE" +MGMT_INTERFACE_TABLE = "MGMT_INTERFACE" KUBE_LABEL_TABLE = "KUBE_LABELS" KUBE_LABEL_SET_KEY = "SET" @@ -41,6 +42,7 @@ IMAGE_TAG = "image_tag" FAIL_LOCK = "fail_lock" DO_JOIN = "do_join" +REQ = "req" # subproc key words @@ -643,8 +645,27 @@ def mock_subproc_side_effect(cmd, shell=False, stdout=None, stderr=None): return mock_proc(cmd, index) -def set_kube_mock(mock_subproc): +class mock_reqget: + def __init__(self): + self.ok = True + + def json(self): + return current_test_data.get(REQ, "") + + +def mock_reqget_side_effect(url, cert, verify=True): + return mock_reqget() + + +def set_kube_mock(mock_subproc, mock_table=None, mock_conn=None, mock_reqget=None): mock_subproc.side_effect = mock_subproc_side_effect + if mock_table != None: + mock_table.side_effect = table_side_effect + if mock_conn != None: + mock_conn.side_effect = conn_side_effect + if mock_reqget != None: + mock_reqget.side_effect = mock_reqget_side_effect + def create_remote_ctr_config_json(): str_conf = '\ diff --git a/src/sonic-ctrmgrd/tests/kube_commands_test.py b/src/sonic-ctrmgrd/tests/kube_commands_test.py index 637802ab1d9f..d8e0939efb85 100755 --- a/src/sonic-ctrmgrd/tests/kube_commands_test.py +++ b/src/sonic-ctrmgrd/tests/kube_commands_test.py @@ -15,6 +15,8 @@ KUBE_ADMIN_CONF = "/tmp/kube_admin.conf" FLANNEL_CONF_FILE = "/tmp/flannel.conf" CNI_DIR = "/tmp/cni/net.d" +AME_CRT = "/tmp/restapiserver.crt" +AME_KEY = "/tmp/restapiserver.key" # kube_commands test cases # NOTE: Ensure state-db entry is complete in PRE as we need to @@ -25,8 +27,7 @@ common_test.DESCR: "read labels", common_test.RETVAL: 0, common_test.PROC_CMD: ["\ -kubectl --kubeconfig {} get nodes --show-labels |\ - grep none | tr -s ' ' | cut -f6 -d' '".format(KUBE_ADMIN_CONF)], +kubectl --kubeconfig {} get nodes none --show-labels |tr -s ' ' | cut -f6 -d' '".format(KUBE_ADMIN_CONF)], common_test.PROC_OUT: ["foo=bar,hello=world"], common_test.POST: { "foo": "bar", @@ -39,8 +40,7 @@ common_test.TRIGGER_THROW: True, common_test.RETVAL: -1, common_test.PROC_CMD: ["\ -kubectl --kubeconfig {} get nodes --show-labels |\ - grep none | tr -s ' ' | cut -f6 -d' '".format(KUBE_ADMIN_CONF)], +kubectl --kubeconfig {} get nodes none --show-labels |tr -s ' ' | cut -f6 -d' '".format(KUBE_ADMIN_CONF)], common_test.POST: { }, common_test.PROC_KILLED: 1 @@ -49,8 +49,7 @@ common_test.DESCR: "read labels fail", common_test.RETVAL: -1, common_test.PROC_CMD: ["\ -kubectl --kubeconfig {} get nodes --show-labels |\ - grep none | tr -s ' ' | cut -f6 -d' '".format(KUBE_ADMIN_CONF)], +kubectl --kubeconfig {} get nodes none --show-labels |tr -s ' ' | cut -f6 -d' '".format(KUBE_ADMIN_CONF)], common_test.PROC_OUT: [""], common_test.PROC_ERR: ["command failed"], common_test.POST: { @@ -65,8 +64,7 @@ common_test.RETVAL: 0, common_test.ARGS: { "foo": "bar", "hello": "World!", "test": "ok" }, common_test.PROC_CMD: [ -"kubectl --kubeconfig {} get nodes --show-labels |\ - grep none | tr -s ' ' | cut -f6 -d' '".format(KUBE_ADMIN_CONF), +"kubectl --kubeconfig {} get nodes none --show-labels |tr -s ' ' | cut -f6 -d' '".format(KUBE_ADMIN_CONF), "kubectl --kubeconfig {} label --overwrite nodes none hello-".format( KUBE_ADMIN_CONF), "kubectl --kubeconfig {} label --overwrite nodes none hello=World! test=ok".format( @@ -79,8 +77,7 @@ common_test.RETVAL: 0, common_test.ARGS: { "foo": "bar", "hello": "world" }, common_test.PROC_CMD: [ -"kubectl --kubeconfig {} get nodes --show-labels |\ - grep none | tr -s ' ' | cut -f6 -d' '".format(KUBE_ADMIN_CONF) +"kubectl --kubeconfig {} get nodes none --show-labels |tr -s ' ' | cut -f6 -d' '".format(KUBE_ADMIN_CONF) ], common_test.PROC_OUT: ["foo=bar,hello=world"] }, @@ -90,8 +87,7 @@ common_test.ARGS: { "any": "thing" }, common_test.RETVAL: -1, common_test.PROC_CMD: [ -"kubectl --kubeconfig {} get nodes --show-labels |\ - grep none | tr -s ' ' | cut -f6 -d' '".format(KUBE_ADMIN_CONF) +"kubectl --kubeconfig {} get nodes none --show-labels |tr -s ' ' | cut -f6 -d' '".format(KUBE_ADMIN_CONF) ], common_test.PROC_ERR: ["read failed"] } @@ -114,10 +110,22 @@ "mkdir -p {}".format(CNI_DIR), "cp {} {}".format(FLANNEL_CONF_FILE, CNI_DIR), "systemctl start kubelet", - "kubeadm join --discovery-file {} --node-name none".format( + "kubeadm join --discovery-file {} --node-name none --apiserver-advertise-address FC00:2::32".format( KUBE_ADMIN_CONF) ], - common_test.PROC_RUN: [True, True] + common_test.PROC_RUN: [True, True], + common_test.PRE: { + common_test.CONFIG_DB_NO: { + common_test.MGMT_INTERFACE_TABLE: { + "eth0|FC00:2::32/64": { + "gwaddr": "fc00:2::1" + } + } + } + }, + common_test.REQ: { + "data": {"ca.crt": "test"} + } }, 1: { common_test.DESCR: "Regular secure join", @@ -135,10 +143,22 @@ "mkdir -p {}".format(CNI_DIR), "cp {} {}".format(FLANNEL_CONF_FILE, CNI_DIR), "systemctl start kubelet", - "kubeadm join --discovery-file {} --node-name none".format( + "kubeadm join --discovery-file {} --node-name none --apiserver-advertise-address FC00:2::32".format( KUBE_ADMIN_CONF) ], - common_test.PROC_RUN: [True, True] + common_test.PROC_RUN: [True, True], + common_test.PRE: { + common_test.CONFIG_DB_NO: { + common_test.MGMT_INTERFACE_TABLE: { + "eth0|FC00:2::32/64": { + "gwaddr": "fc00:2::1" + } + } + } + }, + common_test.REQ: { + "data": {"ca.crt": "test"} + } }, 2: { common_test.DESCR: "Skip join as already connected", @@ -228,11 +248,17 @@ def init(self): s.close() with open(FLANNEL_CONF_FILE, "w") as s: s.close() + with open(AME_CRT, "w") as s: + s.close() + with open(AME_KEY, "w") as s: + s.close() kube_commands.KUBELET_YAML = kubelet_yaml kube_commands.CNI_DIR = CNI_DIR kube_commands.FLANNEL_CONF_FILE = FLANNEL_CONF_FILE kube_commands.SERVER_ADMIN_URL = "file://{}".format(self.admin_conf_file) kube_commands.KUBE_ADMIN_CONF = KUBE_ADMIN_CONF + kube_commands.AME_CRT = AME_CRT + kube_commands.AME_KEY = AME_KEY @patch("kube_commands.subprocess.Popen") @@ -295,11 +321,13 @@ def test_write_labels(self, mock_subproc): json.dumps(labels, indent=4))) assert False - + @patch("kube_commands.requests.get") + @patch("kube_commands.swsscommon.DBConnector") + @patch("kube_commands.swsscommon.Table") @patch("kube_commands.subprocess.Popen") - def test_join(self, mock_subproc): + def test_join(self, mock_subproc, mock_table, mock_conn, mock_reqget): self.init() - common_test.set_kube_mock(mock_subproc) + common_test.set_kube_mock(mock_subproc, mock_table, mock_conn, mock_reqget) for (i, ct_data) in join_test_data.items(): lock_file = "" diff --git a/src/sonic-frr/patch/0009-ignore-route-from-default-table.patch b/src/sonic-frr/patch/0009-ignore-route-from-default-table.patch new file mode 100644 index 000000000000..850c2a6dbeaa --- /dev/null +++ b/src/sonic-frr/patch/0009-ignore-route-from-default-table.patch @@ -0,0 +1,32 @@ +From 96dadc6719dafdd7d58e715f59e0d1a8edc3d58f Mon Sep 17 00:00:00 2001 +From: Arvindsrinivasan Lakshmi Narasimhan +Date: Wed, 7 Sep 2022 23:59:03 +0000 +Subject: [PATCH] ignore route from default table + +Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan +--- + zebra/zebra_fpm_netlink.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/zebra/zebra_fpm_netlink.c b/zebra/zebra_fpm_netlink.c +index 60ea7f97e..c6a2edf03 100644 +--- a/zebra/zebra_fpm_netlink.c ++++ b/zebra/zebra_fpm_netlink.c +@@ -284,6 +284,14 @@ static int netlink_route_info_fill(struct netlink_route_info *ri, int cmd, + { + struct nexthop *nexthop; + ++ struct rib_table_info *table_info = ++ rib_table_info(rib_dest_table(dest)); ++ ++ if (table_info->table_id == RT_TABLE_DEFAULT) { ++ zfpm_debug("%s: Discard default table route", __func__); ++ return 0; ++ } ++ + memset(ri, 0, sizeof(*ri)); + + ri->prefix = rib_dest_prefix(dest); +-- +2.25.1 + diff --git a/src/sonic-frr/patch/series b/src/sonic-frr/patch/series index 69dd5991a7cb..34a323782c8e 100644 --- a/src/sonic-frr/patch/series +++ b/src/sonic-frr/patch/series @@ -5,3 +5,4 @@ 0005-nexthops-compare-vrf-only-if-ip-type.patch 0007-frr-remove-frr-log-outchannel-to-var-log-frr.log.patch 0008-Add-support-of-bgp-l3vni-evpn.patch +0009-ignore-route-from-default-table.patch \ No newline at end of file diff --git a/src/sonic-host-services/scripts/caclmgrd b/src/sonic-host-services/scripts/caclmgrd index 4b9649280e3d..5faf6423107d 100755 --- a/src/sonic-host-services/scripts/caclmgrd +++ b/src/sonic-host-services/scripts/caclmgrd @@ -80,6 +80,10 @@ class ControlPlaneAclManager(daemon_base.DaemonBase): "dst_ports": ["22"], "multi_asic_ns_to_host_fwd":True }, + "EXTERNAL_CLIENT": { + "ip_protocols": ["tcp"], + "multi_asic_ns_to_host_fwd":True + }, "ANY": { "ip_protocols": ["any"], "dst_ports": ["0"], @@ -538,7 +542,10 @@ class ControlPlaneAclManager(daemon_base.DaemonBase): # Obtain default IP protocol(s) and destination port(s) for this service ip_protocols = self.ACL_SERVICES[acl_service]["ip_protocols"] - dst_ports = self.ACL_SERVICES[acl_service]["dst_ports"] + if "dst_ports" in self.ACL_SERVICES[acl_service]: + dst_ports = self.ACL_SERVICES[acl_service]["dst_ports"] + else: + dst_ports = [] acl_rules = {} @@ -564,6 +571,19 @@ class ControlPlaneAclManager(daemon_base.DaemonBase): elif self.is_rule_ipv4(rule_props): table_ip_version = 4 + # Read DST_PORT info from Config DB, insert it back to ACL_SERVICES + if acl_service == 'EXTERNAL_CLIENT' and "L4_DST_PORT" in rule_props: + dst_ports = [rule_props["L4_DST_PORT"]] + self.ACL_SERVICES[acl_service]["dst_ports"] = dst_ports + elif acl_service == 'EXTERNAL_CLIENT' and "L4_DST_PORT_RANGE" in rule_props: + dst_ports = [] + port_ranges = rule_props["L4_DST_PORT_RANGE"].split("-") + port_start = int(port_ranges[0]) + port_end = int(port_ranges[1]) + for port in range(port_start, port_end + 1): + dst_ports.append(port) + self.ACL_SERVICES[acl_service]["dst_ports"] = dst_ports + if (self.is_rule_ipv6(rule_props) and (table_ip_version == 4)): self.log_error("CtrlPlane ACL table {} is a IPv4 based table and rule {} is a IPV6 rule! Ignoring rule." .format(table_name, rule_id)) @@ -579,6 +599,12 @@ class ControlPlaneAclManager(daemon_base.DaemonBase): self.log_warning("Unable to determine if ACL table '{}' contains IPv4 or IPv6 rules. Skipping table..." .format(table_name)) continue + # If no destination port found for this ACL table, + # log a message and skip processing this table. + if len(dst_ports) == 0: + self.log_warning("Required destination port not found for ACL table '{}'. Skipping table..." + .format(table_name)) + continue ipv4_src_ip_set = set() ipv6_src_ip_set = set() # For each ACL rule in this table (in descending order of priority) diff --git a/src/sonic-host-services/scripts/determine-reboot-cause b/src/sonic-host-services/scripts/determine-reboot-cause index 1408ad0e2952..754541edb604 100755 --- a/src/sonic-host-services/scripts/determine-reboot-cause +++ b/src/sonic-host-services/scripts/determine-reboot-cause @@ -122,7 +122,12 @@ def find_hardware_reboot_cause(): else: sonic_logger.log_info("No reboot cause found from platform api") - hardware_reboot_cause = "{} ({})".format(hardware_reboot_cause_major, hardware_reboot_cause_minor) + hardware_reboot_cause_minor_str = "" + if hardware_reboot_cause_minor: + hardware_reboot_cause_minor_str = " ({})".format(hardware_reboot_cause_minor) + + hardware_reboot_cause = hardware_reboot_cause_major + hardware_reboot_cause_minor_str + return hardware_reboot_cause @@ -158,6 +163,50 @@ def get_reboot_cause_dict(previous_reboot_cause, comment, gen_time): return reboot_cause_dict +def determine_reboot_cause(): + # This variable is kept for future-use purpose. When proc_cmd_line/vendor/software provides + # any additional_reboot_info it will be stored as a "comment" in REBOOT_CAUSE_HISTORY_FILE + additional_reboot_info = "N/A" + + # 1. Check if the previous reboot was warm/fast reboot by testing whether there is "fast|fastfast|warm" in /proc/cmdline + proc_cmdline_reboot_cause = find_proc_cmdline_reboot_cause() + + # 2. Check if the previous reboot was caused by hardware + # If yes, the hardware reboot cause will be treated as the reboot cause + hardware_reboot_cause = find_hardware_reboot_cause() + + # 3. If there is a REBOOT_CAUSE_FILE, it will contain any software-related + # reboot info. We will use it as the previous cause. + software_reboot_cause = find_software_reboot_cause() + + # The main decision logic of the reboot cause: + # If there is a valid hardware reboot cause indicated by platform API, + # check the software reboot cause to add additional rebot cause. + # If there is a reboot cause indicated by /proc/cmdline, and/or warmreboot/fastreboot/softreboot + # the software_reboot_cause which is the content of /hosts/reboot-cause/reboot-cause.txt + # will be treated as the additional reboot cause + # Elif there is a cmdline reboot cause, + # the software_reboot_cause will be treated as the reboot cause if it's not unknown + # otherwise, the cmdline_reboot_cause will be treated as the reboot cause if it's not none + # Else the software_reboot_cause will be treated as the reboot cause + if REBOOT_CAUSE_NON_HARDWARE not in hardware_reboot_cause: + previous_reboot_cause = hardware_reboot_cause + # Check if any software reboot was issued before this hardware reboot happened + if REBOOT_CAUSE_UNKNOWN not in software_reboot_cause: + additional_reboot_info = software_reboot_cause + elif proc_cmdline_reboot_cause is not None: + additional_reboot_info = proc_cmdline_reboot_cause + elif proc_cmdline_reboot_cause is not None: + if REBOOT_CAUSE_UNKNOWN not in software_reboot_cause: + # Get the reboot cause from REBOOT_CAUSE_FILE + previous_reboot_cause = software_reboot_cause + else: + previous_reboot_cause = proc_cmdline_reboot_cause + else: + previous_reboot_cause = software_reboot_cause + + return previous_reboot_cause, additional_reboot_info + def main(): # Configure logger to log all messages INFO level and higher @@ -177,22 +226,7 @@ def main(): if os.path.exists(PREVIOUS_REBOOT_CAUSE_FILE): os.remove(PREVIOUS_REBOOT_CAUSE_FILE) - # This variable is kept for future-use purpose. When proc_cmd_line/vendor/software provides - # any additional_reboot_info it will be stored as a "comment" in REBOOT_CAUSE_HISTORY_FILE - additional_reboot_info = "N/A" - - # Check if the previous reboot was warm/fast reboot by testing whether there is "fast|fastfast|warm" in /proc/cmdline - proc_cmdline_reboot_cause = find_proc_cmdline_reboot_cause() - - # If /proc/cmdline does not indicate reboot cause, check if the previous reboot was caused by hardware - if proc_cmdline_reboot_cause is None: - previous_reboot_cause = find_hardware_reboot_cause() - if previous_reboot_cause.startswith(REBOOT_CAUSE_NON_HARDWARE): - # If the reboot cause is non-hardware, get the reboot cause from REBOOT_CAUSE_FILE - previous_reboot_cause = find_software_reboot_cause() - else: - # Get the reboot cause from REBOOT_CAUSE_FILE - previous_reboot_cause = find_software_reboot_cause() + previous_reboot_cause, additional_reboot_info = determine_reboot_cause() # Current time reboot_cause_gen_time = str(datetime.datetime.now().strftime('%Y_%m_%d_%H_%M_%S')) diff --git a/src/sonic-host-services/tests/caclmgrd/cacl_external_client_acl_test.py b/src/sonic-host-services/tests/caclmgrd/cacl_external_client_acl_test.py new file mode 100644 index 000000000000..ef1aa62fe82d --- /dev/null +++ b/src/sonic-host-services/tests/caclmgrd/cacl_external_client_acl_test.py @@ -0,0 +1,44 @@ +import os +import sys + +from swsscommon import swsscommon +from parameterized import parameterized +from sonic_py_common.general import load_module_from_source +from unittest import TestCase, mock +from pyfakefs.fake_filesystem_unittest import patchfs + +from .test_external_client_acl_vectors import EXTERNAL_CLIENT_ACL_TEST_VECTOR +from tests.common.mock_configdb import MockConfigDb + + +DBCONFIG_PATH = '/var/run/redis/sonic-db/database_config.json' + + +class TestCaclmgrdExternalClientAcl(TestCase): + """ + Test caclmgrd EXTERNAL_CLIENT_ACL + """ + def setUp(self): + swsscommon.ConfigDBConnector = MockConfigDb + test_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + modules_path = os.path.dirname(test_path) + scripts_path = os.path.join(modules_path, "scripts") + sys.path.insert(0, modules_path) + caclmgrd_path = os.path.join(scripts_path, 'caclmgrd') + self.caclmgrd = load_module_from_source('caclmgrd', caclmgrd_path) + + @parameterized.expand(EXTERNAL_CLIENT_ACL_TEST_VECTOR) + @patchfs + def test_caclmgrd_external_client_acl(self, test_name, test_data, fs): + if not os.path.exists(DBCONFIG_PATH): + fs.create_file(DBCONFIG_PATH) # fake database_config.json + + MockConfigDb.set_config_db(test_data["config_db"]) + self.caclmgrd.ControlPlaneAclManager.get_namespace_mgmt_ip = mock.MagicMock() + self.caclmgrd.ControlPlaneAclManager.get_namespace_mgmt_ipv6 = mock.MagicMock() + self.caclmgrd.ControlPlaneAclManager.generate_block_ip2me_traffic_iptables_commands = mock.MagicMock(return_value=[]) + self.caclmgrd.ControlPlaneAclManager.get_chain_list = mock.MagicMock(return_value=["INPUT", "FORWARD", "OUTPUT"]) + caclmgrd_daemon = self.caclmgrd.ControlPlaneAclManager("caclmgrd") + + iptables_rules_ret, _ = caclmgrd_daemon.get_acl_rules_and_translate_to_iptables_commands('') + self.assertEqual(set(test_data["return"]).issubset(set(iptables_rules_ret)), True) diff --git a/src/sonic-host-services/tests/caclmgrd/test_external_client_acl_vectors.py b/src/sonic-host-services/tests/caclmgrd/test_external_client_acl_vectors.py new file mode 100644 index 000000000000..d55e6b8e6ce4 --- /dev/null +++ b/src/sonic-host-services/tests/caclmgrd/test_external_client_acl_vectors.py @@ -0,0 +1,167 @@ +from unittest.mock import call + +""" + caclmgrd test external_client_acl vector +""" +EXTERNAL_CLIENT_ACL_TEST_VECTOR = [ + [ + "Test single IPv4 dst port + src ip for EXTERNAL_CLIENT_ACL", + { + "config_db": { + "ACL_TABLE": { + "EXTERNAL_CLIENT_ACL": { + "stage": "INGRESS", + "type": "CTRLPLANE", + "services": [ + "EXTERNAL_CLIENT" + ] + } + }, + "ACL_RULE": { + "EXTERNAL_CLIENT_ACL|DEFAULT_RULE": { + "ETHER_TYPE": "2048", + "PACKET_ACTION": "DROP", + "PRIORITY": "1" + }, + "EXTERNAL_CLIENT_ACL|RULE_1": { + "L4_DST_PORT": "8081", + "PACKET_ACTION": "ACCEPT", + "PRIORITY": "9998", + "SRC_IP": "20.0.0.55/32" + }, + }, + "DEVICE_METADATA": { + "localhost": { + } + }, + "FEATURE": {}, + }, + "return": [ + "iptables -A INPUT -p tcp -s 20.0.0.55/32 --dport 8081 -j ACCEPT", + "iptables -A INPUT -p tcp --dport 8081 -j DROP" + ], + } + ], + [ + "Test IPv4 dst port range + src ip forEXTERNAL_CLIENT_ACL", + { + "config_db": { + "ACL_TABLE": { + "EXTERNAL_CLIENT_ACL": { + "stage": "INGRESS", + "type": "CTRLPLANE", + "services": [ + "EXTERNAL_CLIENT" + ] + } + }, + "ACL_RULE": { + "EXTERNAL_CLIENT_ACL|DEFAULT_RULE": { + "ETHER_TYPE": "2048", + "PACKET_ACTION": "DROP", + "PRIORITY": "1" + }, + "EXTERNAL_CLIENT_ACL|RULE_1": { + "L4_DST_PORT_RANGE": "8081-8083", + "PACKET_ACTION": "ACCEPT", + "PRIORITY": "9998", + "SRC_IP": "20.0.0.55/32" + }, + }, + "DEVICE_METADATA": { + "localhost": { + } + }, + "FEATURE": {}, + }, + "return": [ + "iptables -A INPUT -p tcp -s 20.0.0.55/32 --dport 8081 -j ACCEPT", + "iptables -A INPUT -p tcp -s 20.0.0.55/32 --dport 8082 -j ACCEPT", + "iptables -A INPUT -p tcp -s 20.0.0.55/32 --dport 8083 -j ACCEPT", + "iptables -A INPUT -p tcp --dport 8081 -j DROP", + "iptables -A INPUT -p tcp --dport 8082 -j DROP", + "iptables -A INPUT -p tcp --dport 8083 -j DROP", + ], + } + ], + [ + "Test IPv6 single dst port range + src ip forEXTERNAL_CLIENT_ACL", + { + "config_db": { + "ACL_TABLE": { + "EXTERNAL_CLIENT_ACL": { + "stage": "INGRESS", + "type": "CTRLPLANE", + "services": [ + "EXTERNAL_CLIENT" + ] + } + }, + "ACL_RULE": { + "EXTERNAL_CLIENT_ACL|DEFAULT_RULE": { + "ETHER_TYPE": "2048", + "PACKET_ACTION": "DROP", + "PRIORITY": "1" + }, + "EXTERNAL_CLIENT_ACL|RULE_1": { + "L4_DST_PORT": "8081", + "PACKET_ACTION": "ACCEPT", + "PRIORITY": "9998", + "SRC_IP": "2001::2/128" + }, + }, + "DEVICE_METADATA": { + "localhost": { + } + }, + "FEATURE": {}, + }, + "return": [ + "iptables -A INPUT -p tcp -s 2001::2/128 --dport 8081 -j ACCEPT", + "iptables -A INPUT -p tcp --dport 8081 -j DROP" + ], + } + ], + [ + "Test IPv6 dst port range + src ip forEXTERNAL_CLIENT_ACL", + { + "config_db": { + "ACL_TABLE": { + "EXTERNAL_CLIENT_ACL": { + "stage": "INGRESS", + "type": "CTRLPLANE", + "services": [ + "EXTERNAL_CLIENT" + ] + } + }, + "ACL_RULE": { + "EXTERNAL_CLIENT_ACL|DEFAULT_RULE": { + "ETHER_TYPE": "2048", + "PACKET_ACTION": "DROP", + "PRIORITY": "1" + }, + "EXTERNAL_CLIENT_ACL|RULE_1": { + "L4_DST_PORT_RANGE": "8081-8083", + "PACKET_ACTION": "ACCEPT", + "PRIORITY": "9998", + "SRC_IP": "2001::2/128" + }, + }, + "DEVICE_METADATA": { + "localhost": { + } + }, + "FEATURE": {}, + }, + "return": [ + "iptables -A INPUT -p tcp -s 2001::2/128 --dport 8081 -j ACCEPT", + "iptables -A INPUT -p tcp -s 2001::2/128 --dport 8082 -j ACCEPT", + "iptables -A INPUT -p tcp -s 2001::2/128 --dport 8083 -j ACCEPT", + "iptables -A INPUT -p tcp --dport 8081 -j DROP", + "iptables -A INPUT -p tcp --dport 8082 -j DROP", + "iptables -A INPUT -p tcp --dport 8083 -j DROP", + ], + } + ] +] diff --git a/src/sonic-host-services/tests/common/mock_configdb.py b/src/sonic-host-services/tests/common/mock_configdb.py index ce955ea86d05..9b618254f9b4 100644 --- a/src/sonic-host-services/tests/common/mock_configdb.py +++ b/src/sonic-host-services/tests/common/mock_configdb.py @@ -42,7 +42,10 @@ def set_entry(self, key, field, data): MockConfigDb.CONFIG_DB[key][field] = data def get_table(self, table_name): - return MockConfigDb.CONFIG_DB[table_name] + data = {} + for k, v in MockConfigDb.CONFIG_DB[table_name].items(): + data[self.deserialize_key(k)] = v + return data class MockSelect(): diff --git a/src/sonic-host-services/tests/determine-reboot-cause_test.py b/src/sonic-host-services/tests/determine-reboot-cause_test.py index 7d22a512f8ee..b4c07af4683b 100644 --- a/src/sonic-host-services/tests/determine-reboot-cause_test.py +++ b/src/sonic-host-services/tests/determine-reboot-cause_test.py @@ -54,11 +54,16 @@ GEN_TIME_KERNEL_PANIC = "2021_3_28_13_48_49" +REBOOT_CAUSE_UNKNOWN = "Unknown" +REBOOT_CAUSE_NON_HARDWARE = "Non-Hardware" +EXPECTED_NON_HARDWARE_REBOOT_CAUSE = {REBOOT_CAUSE_NON_HARDWARE, "N/A"} +REBOOT_CAUSE_HARDWARE_OTHER = "Hardware - Other" +EXPECTED_HARDWARE_REBOOT_CAUSE = {REBOOT_CAUSE_HARDWARE_OTHER, ""} + EXPECTED_PARSE_WARMFAST_REBOOT_FROM_PROC_CMDLINE = "warm-reboot" EXPECTED_FIND_SOFTWARE_REBOOT_CAUSE_USER = "User issued 'warm-reboot' command [User: admin, Time: Mon Nov 2 22:37:45 UTC 2020]" EXPECTED_FIND_FIRSTBOOT_VERSION = " (First boot of SONiC version 20191130.52)" EXPECTED_FIND_SOFTWARE_REBOOT_CAUSE_FIRSTBOOT = "Unknown (First boot of SONiC version 20191130.52)" -EXPECTED_HARDWARE_REBOOT_CAUSE = {"warm-reboot", ""} EXPECTED_WATCHDOG_REBOOT_CAUSE_DICT = {'comment': '', 'gen_time': '2020_10_22_03_15_08', 'cause': 'Watchdog', 'user': 'N/A', 'time': 'N/A'} EXPECTED_USER_REBOOT_CAUSE_DICT = {'comment': '', 'gen_time': '2020_10_22_03_14_07', 'cause': 'reboot', 'user': 'admin', 'time': 'Thu Oct 22 03:11:08 UTC 2020'} @@ -104,7 +109,12 @@ def test_find_proc_cmdline_reboot_cause(self): def test_find_hardware_reboot_cause(self): with mock.patch("determine_reboot_cause.get_reboot_cause_from_platform", return_value=("Powerloss", None)): result = determine_reboot_cause.find_hardware_reboot_cause() - assert result == "Powerloss (None)" + assert result == "Powerloss" + + def test_find_hardware_reboot_cause_with_minor(self): + with mock.patch("determine_reboot_cause.get_reboot_cause_from_platform", return_value=("Powerloss", "under-voltage")): + result = determine_reboot_cause.find_hardware_reboot_cause() + assert result == "Powerloss (under-voltage)" def test_get_reboot_cause_dict_watchdog(self): reboot_cause_dict = determine_reboot_cause.get_reboot_cause_dict(REBOOT_CAUSE_WATCHDOG, "", GEN_TIME_WATCHDOG) @@ -117,3 +127,52 @@ def test_get_reboot_cause_dict_user(self): def test_get_reboot_cause_dict_kernel_panic(self): reboot_cause_dict = determine_reboot_cause.get_reboot_cause_dict(REBOOT_CAUSE_KERNEL_PANIC, "", GEN_TIME_KERNEL_PANIC) assert reboot_cause_dict == EXPECTED_KERNEL_PANIC_REBOOT_CAUSE_DICT + + def test_determine_reboot_cause_hardware(self): + with mock.patch("determine_reboot_cause.find_proc_cmdline_reboot_cause", return_value=None): + with mock.patch("determine_reboot_cause.find_software_reboot_cause", return_value=REBOOT_CAUSE_UNKNOWN): + with mock.patch("determine_reboot_cause.find_hardware_reboot_cause", return_value=EXPECTED_HARDWARE_REBOOT_CAUSE): + previous_reboot_cause, additional_reboot_info = determine_reboot_cause.determine_reboot_cause() + assert previous_reboot_cause == EXPECTED_HARDWARE_REBOOT_CAUSE + assert additional_reboot_info == "N/A" + + def test_determine_reboot_cause_software(self): + with mock.patch("determine_reboot_cause.find_proc_cmdline_reboot_cause", return_value=None): + with mock.patch("determine_reboot_cause.find_software_reboot_cause", return_value=EXPECTED_FIND_SOFTWARE_REBOOT_CAUSE_USER): + with mock.patch("determine_reboot_cause.find_hardware_reboot_cause", return_value=EXPECTED_NON_HARDWARE_REBOOT_CAUSE): + previous_reboot_cause, additional_info = determine_reboot_cause.determine_reboot_cause() + assert previous_reboot_cause == EXPECTED_FIND_SOFTWARE_REBOOT_CAUSE_USER + assert additional_info == "N/A" + + def test_determine_reboot_cause_cmdline_software(self): + with mock.patch("determine_reboot_cause.find_proc_cmdline_reboot_cause", return_value=EXPECTED_PARSE_WARMFAST_REBOOT_FROM_PROC_CMDLINE): + with mock.patch("determine_reboot_cause.find_software_reboot_cause", return_value=EXPECTED_FIND_SOFTWARE_REBOOT_CAUSE_USER): + with mock.patch("determine_reboot_cause.find_hardware_reboot_cause", return_value=EXPECTED_NON_HARDWARE_REBOOT_CAUSE): + previous_reboot_cause, additional_info = determine_reboot_cause.determine_reboot_cause() + assert previous_reboot_cause == EXPECTED_FIND_SOFTWARE_REBOOT_CAUSE_USER + assert additional_info == "N/A" + + def test_determine_reboot_cause_cmdline_no_software(self): + with mock.patch("determine_reboot_cause.find_proc_cmdline_reboot_cause", return_value=EXPECTED_PARSE_WARMFAST_REBOOT_FROM_PROC_CMDLINE): + with mock.patch("determine_reboot_cause.find_software_reboot_cause", return_value=REBOOT_CAUSE_UNKNOWN): + with mock.patch("determine_reboot_cause.find_hardware_reboot_cause", return_value=EXPECTED_NON_HARDWARE_REBOOT_CAUSE): + previous_reboot_cause, additional_info = determine_reboot_cause.determine_reboot_cause() + assert previous_reboot_cause == EXPECTED_PARSE_WARMFAST_REBOOT_FROM_PROC_CMDLINE + assert additional_info == "N/A" + + def test_determine_reboot_cause_cmdline_hardware(self): + with mock.patch("determine_reboot_cause.find_proc_cmdline_reboot_cause", return_value=EXPECTED_PARSE_WARMFAST_REBOOT_FROM_PROC_CMDLINE): + with mock.patch("determine_reboot_cause.find_software_reboot_cause", return_value=REBOOT_CAUSE_UNKNOWN): + with mock.patch("determine_reboot_cause.find_hardware_reboot_cause", return_value=EXPECTED_HARDWARE_REBOOT_CAUSE): + previous_reboot_cause, additional_info = determine_reboot_cause.determine_reboot_cause() + assert previous_reboot_cause == EXPECTED_HARDWARE_REBOOT_CAUSE + assert additional_info == EXPECTED_PARSE_WARMFAST_REBOOT_FROM_PROC_CMDLINE + + def test_determine_reboot_cause_software_hardware(self): + with mock.patch("determine_reboot_cause.find_proc_cmdline_reboot_cause", return_value=EXPECTED_PARSE_WARMFAST_REBOOT_FROM_PROC_CMDLINE): + with mock.patch("determine_reboot_cause.find_software_reboot_cause", return_value=EXPECTED_FIND_SOFTWARE_REBOOT_CAUSE_USER): + with mock.patch("determine_reboot_cause.find_hardware_reboot_cause", return_value=EXPECTED_HARDWARE_REBOOT_CAUSE): + previous_reboot_cause, additional_info = determine_reboot_cause.determine_reboot_cause() + assert previous_reboot_cause == EXPECTED_HARDWARE_REBOOT_CAUSE + assert additional_info == EXPECTED_FIND_SOFTWARE_REBOOT_CAUSE_USER + diff --git a/src/sonic-linux-kernel b/src/sonic-linux-kernel index bc4ae910d657..815cb3495443 160000 --- a/src/sonic-linux-kernel +++ b/src/sonic-linux-kernel @@ -1 +1 @@ -Subproject commit bc4ae910d657602a5f954dd53d2eafb3be8ebb81 +Subproject commit 815cb349544338a16d2f7740aee87db13bb8bc1a diff --git a/src/sonic-mgmt-framework b/src/sonic-mgmt-framework index 3c3384cec8d1..bd79561c70aa 160000 --- a/src/sonic-mgmt-framework +++ b/src/sonic-mgmt-framework @@ -1 +1 @@ -Subproject commit 3c3384cec8d15e493e6889bff6361a5a280a8811 +Subproject commit bd79561c70aa3da2267c8c767a899833f432dd0f diff --git a/src/sonic-platform-common b/src/sonic-platform-common index ac255158d072..5c9010074dc8 160000 --- a/src/sonic-platform-common +++ b/src/sonic-platform-common @@ -1 +1 @@ -Subproject commit ac255158d07257614af4eae37edff9abd70b13e1 +Subproject commit 5c9010074dc8d9284242b1fe31146926b06f5c89 diff --git a/src/sonic-platform-daemons b/src/sonic-platform-daemons index 6a315aee78bb..99d252849da2 160000 --- a/src/sonic-platform-daemons +++ b/src/sonic-platform-daemons @@ -1 +1 @@ -Subproject commit 6a315aee78bbca9fd74abdae7b3c4cc53b98f14f +Subproject commit 99d252849da23d8188567bc32d5a31c28310c0d8 diff --git a/src/sonic-restapi b/src/sonic-restapi index 55683f2abb8e..dac446feb2be 160000 --- a/src/sonic-restapi +++ b/src/sonic-restapi @@ -1 +1 @@ -Subproject commit 55683f2abb8e7be0e80b0e81128314c90006303c +Subproject commit dac446feb2be3aa348f633a4d2e3c64993d7483a diff --git a/src/sonic-sairedis b/src/sonic-sairedis index bd4b1b5117a6..2f92b4493ebf 160000 --- a/src/sonic-sairedis +++ b/src/sonic-sairedis @@ -1 +1 @@ -Subproject commit bd4b1b5117a67a22efbf103094b091e0bb8742df +Subproject commit 2f92b4493ebf8929dbec3a58d6b400a20cd1b554 diff --git a/src/sonic-snmpagent b/src/sonic-snmpagent index c75440bb93ec..13ddb0e933b2 160000 --- a/src/sonic-snmpagent +++ b/src/sonic-snmpagent @@ -1 +1 @@ -Subproject commit c75440bb93ecea3d1a8d5299257e6acdf86adc52 +Subproject commit 13ddb0e933b2f71db7f9cbada3472fee7ca2a869 diff --git a/src/sonic-swss b/src/sonic-swss index e84a90140a81..499b7a7b37cb 160000 --- a/src/sonic-swss +++ b/src/sonic-swss @@ -1 +1 @@ -Subproject commit e84a90140a81ae76c76730218c2b24df7f577f1f +Subproject commit 499b7a7b37cbfbf0f20878b334a1cbea83b76aa7 diff --git a/src/sonic-swss-common b/src/sonic-swss-common index fb89310e616c..30aa38c167c3 160000 --- a/src/sonic-swss-common +++ b/src/sonic-swss-common @@ -1 +1 @@ -Subproject commit fb89310e616ce4a5331aa024a080d70423131131 +Subproject commit 30aa38c167c34b727e31db6b0e317647e7ff47b7 diff --git a/src/sonic-telemetry b/src/sonic-telemetry index c6063887bc4a..9897246795ed 160000 --- a/src/sonic-telemetry +++ b/src/sonic-telemetry @@ -1 +1 @@ -Subproject commit c6063887bc4a67ed3e40979b47f1b8e5caab6271 +Subproject commit 9897246795ed3ba3fde26a49ff64ff1d03b8dcc9 diff --git a/src/sonic-utilities b/src/sonic-utilities index ecca18ffb4fb..b21e2ceb08ac 160000 --- a/src/sonic-utilities +++ b/src/sonic-utilities @@ -1 +1 @@ -Subproject commit ecca18ffb4fbf7e9041984585d5e0c026c1e3422 +Subproject commit b21e2ceb08ac89d08167e1e4cde4f2401091473c diff --git a/src/systemd-sonic-generator/systemd-sonic-generator.c b/src/systemd-sonic-generator/systemd-sonic-generator.c index 1052e2db622a..1eab976f42ac 100644 --- a/src/systemd-sonic-generator/systemd-sonic-generator.c +++ b/src/systemd-sonic-generator/systemd-sonic-generator.c @@ -99,6 +99,7 @@ static int get_install_targets_from_line(char* target_string, char* install_type ***/ char* token; char* target; + char* saveptr; char final_target[PATH_MAX]; int num_targets = 0; @@ -113,8 +114,8 @@ static int get_install_targets_from_line(char* target_string, char* install_type strip_trailing_newline(target); if (strstr(target, "%") != NULL) { - char* prefix = strtok(target, "."); - char* suffix = strtok(NULL, "."); + char* prefix = strtok_r(target, ".", &saveptr); + char* suffix = strtok_r(NULL, ".", &saveptr); int prefix_len = strlen(prefix); strncpy(final_target, prefix, prefix_len - 2); @@ -501,6 +502,7 @@ static int get_num_of_asic() { char *line = NULL; char* token; char* platform; + char* saveptr; size_t len = 0; ssize_t nread; bool ans; @@ -518,8 +520,8 @@ static int get_num_of_asic() { while ((nread = getline(&line, &len, fp)) != -1) { if ((strstr(line, "onie_platform") != NULL) || (strstr(line, "aboot_platform") != NULL)) { - token = strtok(line, "="); - platform = strtok(NULL, "="); + token = strtok_r(line, "=", &saveptr); + platform = strtok_r(NULL, "=", &saveptr); strip_trailing_newline(platform); break; } @@ -532,8 +534,8 @@ static int get_num_of_asic() { if (fp != NULL) { while ((nread = getline(&line, &len, fp)) != -1) { if (strstr(line, "NUM_ASIC") != NULL) { - token = strtok(line, "="); - str_num_asic = strtok(NULL, "="); + token = strtok_r(line, "=", &saveptr); + str_num_asic = strtok_r(NULL, "=", &saveptr); strip_trailing_newline(str_num_asic); if (str_num_asic != NULL){ sscanf(str_num_asic, "%d",&num_asic); @@ -557,6 +559,7 @@ int main(int argc, char **argv) { char* unit_instance; char* prefix; char* suffix; + char* saveptr; int num_unit_files; int num_targets; int r; @@ -577,8 +580,8 @@ int main(int argc, char **argv) { for (int i = 0; i < num_unit_files; i++) { unit_instance = strdup(unit_files[i]); if ((num_asics == 1) && strstr(unit_instance, "@") != NULL) { - prefix = strtok(unit_instance, "@"); - suffix = strtok(NULL, "@"); + prefix = strtok_r(unit_instance, "@", &saveptr); + suffix = strtok_r(NULL, "@", &saveptr); strcpy(unit_instance, prefix); strcat(unit_instance, suffix); diff --git a/src/thrift_0_13_0/Makefile b/src/thrift_0_13_0/Makefile index 3bdb7c2a145c..38a7d939d045 100644 --- a/src/thrift_0_13_0/Makefile +++ b/src/thrift_0_13_0/Makefile @@ -26,6 +26,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : patch -p1 < ../patch/0001-Remove-unneeded-packages.patch patch -p1 < ../patch/0002-Remove-minimist-packages.patch patch -p1 < ../patch/0003-Remove-underscore-packages.patch + patch -p1 < ../patch/0002-cve-2017-1000487.patch DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -d -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $(SONIC_DPKG_ADMINDIR) popd diff --git a/src/thrift_0_13_0/patch/0002-cve-2017-1000487.patch b/src/thrift_0_13_0/patch/0002-cve-2017-1000487.patch new file mode 120000 index 000000000000..ef6607064039 --- /dev/null +++ b/src/thrift_0_13_0/patch/0002-cve-2017-1000487.patch @@ -0,0 +1 @@ +../../thrift/patch/0002-cve-2017-1000487.patch \ No newline at end of file