From fa9fe6d222c33624b4c013f323b7882cc5ac10f9 Mon Sep 17 00:00:00 2001 From: peter_yu Date: Mon, 17 Apr 2023 09:58:01 +0000 Subject: [PATCH] [ZTP] Do dhcp discovery regardless profile status Why I did it After sonic-ztp: [ZTP] Use config db instead of ZTP configuration profile this is required for dhcp discovery How I did it Do dhcp discovery regardless profile status How I verified it 1. Modify etc/default/ztp to use USE_DEFAULT_CONFIG="no" 2. Config breakout for port and enable link up. 3. config save 4. 'ztp run' to start ZTP. 5. breakout port should be 'Link up detected' and ZTP should start to downloading provisioning data from the port. --- files/image_config/interfaces/interfaces.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/image_config/interfaces/interfaces.j2 b/files/image_config/interfaces/interfaces.j2 index b8626bfb1a..674093da97 100644 --- a/files/image_config/interfaces/interfaces.j2 +++ b/files/image_config/interfaces/interfaces.j2 @@ -31,7 +31,7 @@ iface lo inet loopback {% block mgmt_interface %} # The management network interface -{% if (ZTP_DHCP_DISABLED is not defined) and (ZTP is defined) and (ZTP['mode'] is defined and ZTP['mode']['profile'] == 'active') %} +{% if (ZTP_DHCP_DISABLED is not defined) and (ZTP is defined) and (ZTP['mode'] is defined) %} auto eth0