From 118f14dc65f1ef638929f9342f1853f21a4453ae Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Fri, 16 Jun 2023 23:30:40 +0800 Subject: [PATCH 1/8] [submodule] Update submodule linkmgrd to the latest HEAD automatically (#15503) src/linkmgrd * 9aebd5a - (HEAD -> 202205, origin/202205) Re-handle pre-init mux config notification after state machine init (#202) (10 hours ago) [Longxiang Lyu] --- src/linkmgrd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/linkmgrd b/src/linkmgrd index c0f7c506b361..9aebd5add193 160000 --- a/src/linkmgrd +++ b/src/linkmgrd @@ -1 +1 @@ -Subproject commit c0f7c506b36168d13b6c250444394e9b2f748e9d +Subproject commit 9aebd5add1936f6f7f3fbf9b7f03fc21bc3ab0ee From 6cd8ae36fa373798af3aa8faca08ab21df58852f Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Fri, 16 Jun 2023 23:32:22 +0800 Subject: [PATCH 2/8] [submodule] Update submodule sonic-platform-daemons to the latest HEAD automatically (#15505) src/sonic-platform-daemons * 78db08e - (HEAD -> 202205, origin/202205) Separate periodic v/s fixed EEPROM reads between threads and optimize xcvrd boot-up time (#360) (5 hours ago) [mihirpat1] * 1a672b0 - [ycable] change logging level for stop main loop to NOTICE from ERR (#376) (9 hours ago) [vdahiya12] --- src/sonic-platform-daemons | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-platform-daemons b/src/sonic-platform-daemons index 1d04977a61e6..78db08e7c93d 160000 --- a/src/sonic-platform-daemons +++ b/src/sonic-platform-daemons @@ -1 +1 @@ -Subproject commit 1d04977a61e6551899c171142521bf7537632d56 +Subproject commit 78db08e7c93dbd03aa3dded7d8cbc35a892b76a2 From 2286895073f23aa0e8e63fa47a160be76ed23d38 Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Fri, 16 Jun 2023 23:32:47 +0800 Subject: [PATCH 3/8] [submodule] Update submodule sonic-sairedis to the latest HEAD automatically (#15506) src/sonic-sairedis * ec81223 - (HEAD -> 202205, origin/202205) [syncd] Add pre match logic for acl entry (#1240) (10 hours ago) [Kamil Cudnik] * 2966e58 - Fix pipeline issue caused by urllib3 v2 (10 hours ago) [Liu Shilong] --- src/sonic-sairedis | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-sairedis b/src/sonic-sairedis index 7f6abdd8045a..ec81223a4bad 160000 --- a/src/sonic-sairedis +++ b/src/sonic-sairedis @@ -1 +1 @@ -Subproject commit 7f6abdd8045afae2de6a86c332aed680a71adecc +Subproject commit ec81223a4bad1336ecfebf93ef859d9feafd445f From 4a38fb5681723db461c7db150adf655b7ad1748f Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Fri, 16 Jun 2023 23:33:15 +0800 Subject: [PATCH 4/8] [submodule] Update submodule sonic-swss to the latest HEAD automatically (#15508) src/sonic-swss * 444e3be - (HEAD -> 202205, origin/202205) [subinterface]: Fix admin state handling. (#2806) (10 hours ago) [Nazarii Hnydyn] * 9690c5a - [portsorch]: Enhancing SWSS OA logs to capture host_tx_ready change events (#2822) (10 hours ago) [mihirpat1] --- src/sonic-swss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-swss b/src/sonic-swss index 6a193e089f68..444e3bea84c0 160000 --- a/src/sonic-swss +++ b/src/sonic-swss @@ -1 +1 @@ -Subproject commit 6a193e089f68ebb84651fd64b1511ea4032d9d59 +Subproject commit 444e3bea84c04c6457f164f2d0e29d65b2d5a317 From b0f2cb3be2d21e0f26c6f0a28478535d8aaa4cd7 Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Fri, 16 Jun 2023 23:33:40 +0800 Subject: [PATCH 5/8] [submodule] Update submodule sonic-utilities to the latest HEAD automatically (#15510) src/sonic-utilities * 43c85ef5 - (HEAD -> 202205, origin/202205) [dhcp-relay] Fix dhcp6relay counter issue (#2866) (10 hours ago) [Yaqiang Zhu] * e0333b5c - Revert "[config]config reload should generate sysinfo if missing (#2778)" (#2865) (10 hours ago) [jingwenxie] * e7eac6bf - [config] Generate sysinfo in single asic (#2856) (10 hours ago) [jingwenxie] * e42291bb - [config] Generate sysinfo as needed when override config (#2836) (10 hours ago) [jingwenxie] --- src/sonic-utilities | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-utilities b/src/sonic-utilities index 24d0d1cbd1a0..43c85ef54ddd 160000 --- a/src/sonic-utilities +++ b/src/sonic-utilities @@ -1 +1 @@ -Subproject commit 24d0d1cbd1a000ecf240464eb52c27296ace16ba +Subproject commit 43c85ef54ddd38366fa807d894546132ec9466cd From b4dcd1bcb4167977bb34c8f3ec6087a0862a3681 Mon Sep 17 00:00:00 2001 From: Prince Sunny Date: Fri, 16 Jun 2023 08:35:15 -0700 Subject: [PATCH 6/8] Create default Vxlan and Vnet configs (#13409) (#15497) * Create default Vxlan and Vnet configs for ToRs with Appliance Resource type --- src/sonic-config-engine/minigraph.py | 25 ++++++++++++++++++- .../tests/t0-sample-deployment-id.xml | 5 ++++ src/sonic-config-engine/tests/test_cfggen.py | 16 ++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) diff --git a/src/sonic-config-engine/minigraph.py b/src/sonic-config-engine/minigraph.py index 9a7902928e76..0b059c27b19a 100644 --- a/src/sonic-config-engine/minigraph.py +++ b/src/sonic-config-engine/minigraph.py @@ -1255,6 +1255,28 @@ def parse_spine_chassis_fe(results, vni, lo_intfs, phyport_intfs, pc_intfs, pc_m # Enslave the port channel interface to a Vnet pc_intfs[pc_intf] = {'vnet_name': chassis_vnet} +def parse_default_vxlan_decap(results, vni, lo_intfs): + vnet ='Vnet-default' + vxlan_tunnel = 'tunnel_v4' + + # Vxlan tunnel information + lo_addr = '0.0.0.0' + for lo in lo_intfs: + lo_network = ipaddress.ip_network(UNICODE_TYPE(lo[1]), False) + if lo_network.version == 4: + lo_addr = str(lo_network.network_address) + break + results['VXLAN_TUNNEL'] = {vxlan_tunnel: { + 'src_ip': lo_addr + }} + + # Vnet information + results['VNET'] = {vnet: { + 'vxlan_tunnel': vxlan_tunnel, + 'scope': "default", + 'vni': vni + }} + ############################################################################### # # Post-processing functions @@ -1605,9 +1627,10 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw for key in voq_inband_intfs: results['VOQ_INBAND_INTERFACE'][key] = voq_inband_intfs[key] - if resource_type is not None: results['DEVICE_METADATA']['localhost']['resource_type'] = resource_type + if 'Appliance' in resource_type: + parse_default_vxlan_decap(results, vni_default, lo_intfs) if downstream_subrole is not None: results['DEVICE_METADATA']['localhost']['downstream_subrole'] = downstream_subrole diff --git a/src/sonic-config-engine/tests/t0-sample-deployment-id.xml b/src/sonic-config-engine/tests/t0-sample-deployment-id.xml index 30517dfee19f..28c26af921c7 100644 --- a/src/sonic-config-engine/tests/t0-sample-deployment-id.xml +++ b/src/sonic-config-engine/tests/t0-sample-deployment-id.xml @@ -731,6 +731,11 @@ 2.2.2.2 + + ResourceType + + HaAppliance + diff --git a/src/sonic-config-engine/tests/test_cfggen.py b/src/sonic-config-engine/tests/test_cfggen.py index b302855cef3c..634ab15da229 100644 --- a/src/sonic-config-engine/tests/test_cfggen.py +++ b/src/sonic-config-engine/tests/test_cfggen.py @@ -494,6 +494,22 @@ def test_minigraph_port_rs(self): utils.to_dict("{'lanes': '101,102,103,104', 'fec': 'rs', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/124', 'admin_status': 'up', 'speed': '100000', 'description': 'ARISTA04T1:Ethernet1/1'}") ) + def test_minigraph_default_vxlan(self): + argument = '-m "' + self.sample_graph_deployment_id + '" -p "' + self.port_config + '" -v "VXLAN_TUNNEL"' + output = self.run_script(argument) + self.assertEqual( + utils.to_dict(output.strip()), + utils.to_dict("{'tunnel_v4': {'src_ip': '10.1.0.32'}}") + ) + + def test_minigraph_default_vnet(self): + argument = '-m "' + self.sample_graph_deployment_id + '" -p "' + self.port_config + '" -v "VNET"' + output = self.run_script(argument) + self.assertEqual( + utils.to_dict(output.strip()), + utils.to_dict("{'Vnet-default': {'vxlan_tunnel': 'tunnel_v4', 'scope': 'default', 'vni': 8000}}") + ) + def test_minigraph_bgp(self): argument = '-m "' + self.sample_graph_bgp_speaker + '" -p "' + self.port_config + '" -v "BGP_NEIGHBOR[\'10.0.0.59\']"' output = self.run_script(argument) From 2d436cc59db9908ae590068bd6a002542891a603 Mon Sep 17 00:00:00 2001 From: siqbal1986 Date: Fri, 16 Jun 2023 08:36:18 -0700 Subject: [PATCH 7/8] 202205 cast for https://github.com/sonic-net/sonic-buildimage/pull/14992 (#15499) Why I did it CP of orignal PR #14992 which failed automatic CP. Work item tracking Microsoft ADO (number only):21695894 --- files/scripts/swss.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/scripts/swss.sh b/files/scripts/swss.sh index fb9177ef0dff..ee6f770219cb 100755 --- a/files/scripts/swss.sh +++ b/files/scripts/swss.sh @@ -175,7 +175,7 @@ start() { $SONIC_DB_CLI GB_ASIC_DB FLUSHDB $SONIC_DB_CLI GB_COUNTERS_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*', 'MACSEC_PORT_TABLE*', 'MACSEC_INGRESS_SA_TABLE*', 'MACSEC_EGRESS_SA_TABLE*', 'MACSEC_INGRESS_SC_TABLE*', 'MACSEC_EGRESS_SC_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*', 'MACSEC_PORT_TABLE*', 'MACSEC_INGRESS_SA_TABLE*', 'MACSEC_EGRESS_SA_TABLE*', 'MACSEC_INGRESS_SC_TABLE*', 'MACSEC_EGRESS_SC_TABLE*', 'VNET_ROUTE*', 'VNET_MONITOR_TABLE*', 'BFD_SESSION_TABLE*'" $SONIC_DB_CLI APPL_STATE_DB FLUSHDB rm -rf /tmp/cache fi From d5d674e89d6749c8e6eb38f2c0c47e0a70817a6d Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Sat, 17 Jun 2023 09:18:08 +0800 Subject: [PATCH 8/8] Revert "Fix for fast/cold-boot: call db_migrator only after old config is loaded (#14933)" (#15464) (#15517) --- files/build_templates/docker_image_ctl.j2 | 16 ++++------------ files/image_config/config-setup/config-setup | 13 ------------- 2 files changed, 4 insertions(+), 25 deletions(-) diff --git a/files/build_templates/docker_image_ctl.j2 b/files/build_templates/docker_image_ctl.j2 index ab13a03ca35a..6879aeb703f7 100644 --- a/files/build_templates/docker_image_ctl.j2 +++ b/files/build_templates/docker_image_ctl.j2 @@ -246,18 +246,10 @@ function postStartAction() $SONIC_DB_CLI CONFIG_DB SET "CONFIG_DB_INITIALIZED" "1" fi - if [ -e /tmp/pending_config_migration ]; then - # this is first boot to a new image, config-setup execution is pending. - # For fast/cold reboot case, DB contains nothing at this point - # Call db_migrator after config-setup loads the config (from old config or minigraph) - echo "Delaying db_migrator until config migration is over" - else - # this is not a first time boot to a new image. Datbase container starts w/ old pre-existing config - if [[ -x /usr/local/bin/db_migrator.py ]]; then - # Migrate the DB to the latest schema version if needed - if [ -z "$DEV" ]; then - /usr/local/bin/db_migrator.py -o migrate - fi + if [[ -x /usr/local/bin/db_migrator.py ]]; then + # Migrate the DB to the latest schema version if needed + if [ -z "$DEV" ]; then + /usr/local/bin/db_migrator.py -o migrate fi fi # Add redis UDS to the redis group and give read/write access to the group diff --git a/files/image_config/config-setup/config-setup b/files/image_config/config-setup/config-setup index 28a3a4373a42..0f5a248b05f8 100755 --- a/files/image_config/config-setup/config-setup +++ b/files/image_config/config-setup/config-setup @@ -304,16 +304,6 @@ check_all_config_db_present() return 0 } -# DB schema is subject to change between two images -# Perform DB schema migration after loading backup config from previous image -do_db_migration() -{ - if [[ -x /usr/local/bin/db_migrator.py ]]; then - # Migrate the DB to the latest schema version if needed - /usr/local/bin/db_migrator.py -o migrate - fi -} - # Perform configuration migration from backup copy. # - This step is performed when a new image is installed and SONiC switch boots into it do_config_migration() @@ -336,19 +326,16 @@ do_config_migration() if [ x"${WARM_BOOT}" == x"true" ]; then echo "Warm reboot detected..." disable_updategraph - do_db_migration rm -f /tmp/pending_config_migration exit 0 elif check_all_config_db_present; then echo "Use config_db.json from old system..." reload_configdb - do_db_migration # Disable updategraph disable_updategraph elif [ -r ${MINGRAPH_FILE} ]; then echo "Use minigraph.xml from old system..." reload_minigraph - do_db_migration # Disable updategraph disable_updategraph else