diff --git a/Makefile.work b/Makefile.work index 18ff536f50..bece7e56cb 100644 --- a/Makefile.work +++ b/Makefile.work @@ -5,8 +5,6 @@ # # * PLATFORM: Specific platform we wish to build images for. # * BUILD_NUMBER: Desired version-number to pass to the building-system. -# * ENABLE_DHCP_GRAPH_SERVICE: Enables get-graph service to fetch minigraph files -# through http. # * ENABLE_ZTP: Enables zero touch provisioning. # * SHUTDOWN_BGP_ON_START: Sets admin-down state for all bgp peerings after restart. # * INCLUDE_KUBERNETES: Allows including Kubernetes @@ -523,7 +521,6 @@ SONIC_BUILD_INSTRUCTION := $(MAKE) \ BUILD_TIMESTAMP=$(BUILD_TIMESTAMP) \ SONIC_IMAGE_VERSION=$(SONIC_IMAGE_VERSION) \ SLAVE_TAG=$(SLAVE_TAG) \ - ENABLE_DHCP_GRAPH_SERVICE=$(ENABLE_DHCP_GRAPH_SERVICE) \ ENABLE_ZTP=$(ENABLE_ZTP) \ INCLUDE_PDE=$(INCLUDE_PDE) \ SHUTDOWN_BGP_ON_START=$(SHUTDOWN_BGP_ON_START) \ diff --git a/files/build_templates/dhcp_relay.service.j2 b/files/build_templates/dhcp_relay.service.j2 index 55a0ab0a4a..d87186e4dc 100644 --- a/files/build_templates/dhcp_relay.service.j2 +++ b/files/build_templates/dhcp_relay.service.j2 @@ -1,7 +1,7 @@ [Unit] Description=DHCP relay container -Requires=updategraph.service -After=updategraph.service swss.service syncd.service teamd.service +Requires=config-setup.service +After=config-setup.service swss.service syncd.service teamd.service BindsTo=sonic.target After=sonic.target Before=ntp-config.service diff --git a/files/build_templates/eventd.service.j2 b/files/build_templates/eventd.service.j2 index 0ad7f52ee8..95e2805f7c 100644 --- a/files/build_templates/eventd.service.j2 +++ b/files/build_templates/eventd.service.j2 @@ -1,7 +1,7 @@ [Unit] Description=EVENTD container -Requires=updategraph.service -After=updategraph.service +Requires=config-setup.service +After=config-setup.service BindsTo=sonic.target After=sonic.target StartLimitIntervalSec=1200 diff --git a/files/build_templates/iccpd.service.j2 b/files/build_templates/iccpd.service.j2 index d78407a87b..d62662d50f 100644 --- a/files/build_templates/iccpd.service.j2 +++ b/files/build_templates/iccpd.service.j2 @@ -1,7 +1,7 @@ [Unit] Description=ICCPD container -Requires=updategraph.service swss.service -After=updategraph.service swss.service +Requires=config-setup.service swss.service +After=config-setup.service swss.service BindsTo=sonic.target After=sonic.target diff --git a/files/build_templates/mux.service.j2 b/files/build_templates/mux.service.j2 index dbb65ac9eb..6e54f137e0 100644 --- a/files/build_templates/mux.service.j2 +++ b/files/build_templates/mux.service.j2 @@ -1,6 +1,6 @@ [Unit] Description=MUX Cable Container -Requires=database.service updategraph.service swss.service +Requires=database.service config-setup.service swss.service After=swss.service interfaces-config.service BindsTo=sonic.target After=sonic.target diff --git a/files/build_templates/nat.service.j2 b/files/build_templates/nat.service.j2 index d0ec4a2837..095bcd40cf 100644 --- a/files/build_templates/nat.service.j2 +++ b/files/build_templates/nat.service.j2 @@ -1,7 +1,7 @@ [Unit] Description=NAT container -Requires=updategraph.service -After=updategraph.service swss.service syncd.service +Requires=config-setup.service +After=config-setup.service swss.service syncd.service BindsTo=sonic.target After=sonic.target Before=ntp-config.service diff --git a/files/build_templates/pde.service.j2 b/files/build_templates/pde.service.j2 index f053b57ad5..61c0b63393 100644 --- a/files/build_templates/pde.service.j2 +++ b/files/build_templates/pde.service.j2 @@ -5,7 +5,7 @@ Requires=opennsl-modules.service ConditionPathExists=!/usr/bin/swss.sh {% endif %} -After=updategraph.service +After=config-setup.service {% if sonic_asic_platform == 'broadcom' %} After=opennsl-modules.service {% endif %} diff --git a/files/build_templates/per_namespace/bgp.service.j2 b/files/build_templates/per_namespace/bgp.service.j2 index e9c1a92310..52d7d10846 100644 --- a/files/build_templates/per_namespace/bgp.service.j2 +++ b/files/build_templates/per_namespace/bgp.service.j2 @@ -2,8 +2,8 @@ Description=BGP container Requires=database{% if multi_instance == 'true' %}@%i{% endif %}.service After=database{% if multi_instance == 'true' %}@%i{% endif %}.service -Requires=updategraph.service -After=updategraph.service +Requires=config-setup.service +After=config-setup.service BindsTo=sonic.target After=sonic.target Before=ntp-config.service diff --git a/files/build_templates/per_namespace/gbsyncd.service.j2 b/files/build_templates/per_namespace/gbsyncd.service.j2 index 90a92b7e85..7a6de8c7d1 100644 --- a/files/build_templates/per_namespace/gbsyncd.service.j2 +++ b/files/build_templates/per_namespace/gbsyncd.service.j2 @@ -1,8 +1,8 @@ [Unit] Description={{docker_container_name}} service -Requires=database{% if multi_instance == 'true' %}@%i{% endif %}.service updategraph.service +Requires=database{% if multi_instance == 'true' %}@%i{% endif %}.service config-setup.service ConditionPathExists=!/usr/share/sonic/hwsku/gearbox_config.json -After=database{% if multi_instance == 'true' %}@%i{% endif %}.service updategraph.service +After=database{% if multi_instance == 'true' %}@%i{% endif %}.service config-setup.service After=interfaces-config.service After=swss{% if multi_instance == 'true' %}@%i{% endif %}.service BindsTo=sonic.target diff --git a/files/build_templates/per_namespace/lldp.service.j2 b/files/build_templates/per_namespace/lldp.service.j2 index d23abc0a12..95d938472e 100644 --- a/files/build_templates/per_namespace/lldp.service.j2 +++ b/files/build_templates/per_namespace/lldp.service.j2 @@ -4,8 +4,8 @@ Requires=database{% if multi_instance == 'true' %}@%i{% endif %}.service After=database{% if multi_instance == 'true' %}@%i{% endif %}.service After=swss{% if multi_instance == 'true' %}@%i{% endif %}.service After=syncd{% if multi_instance == 'true' %}@%i{% endif %}.service -Requires=updategraph.service -After=updategraph.service +Requires=config-setup.service +After=config-setup.service BindsTo=sonic.target After=sonic.target BindsTo=sonic.target diff --git a/files/build_templates/per_namespace/swss.service.j2 b/files/build_templates/per_namespace/swss.service.j2 index 58bca6a219..b0560aabc5 100644 --- a/files/build_templates/per_namespace/swss.service.j2 +++ b/files/build_templates/per_namespace/swss.service.j2 @@ -9,8 +9,8 @@ After=topology.service {% if sonic_asic_platform == 'broadcom' %} Requires=opennsl-modules.service {% endif %} -Requires=updategraph.service -After=updategraph.service +Requires=config-setup.service +After=config-setup.service BindsTo=sonic.target After=sonic.target Before=ntp-config.service diff --git a/files/build_templates/per_namespace/syncd.service.j2 b/files/build_templates/per_namespace/syncd.service.j2 index 1fb803390a..842eaebc75 100644 --- a/files/build_templates/per_namespace/syncd.service.j2 +++ b/files/build_templates/per_namespace/syncd.service.j2 @@ -14,8 +14,8 @@ After=opennsl-modules.service Requires=nps-modules.service After=nps-modules.service {% endif %} -Requires=updategraph.service -After=updategraph.service +Requires=config-setup.service +After=config-setup.service BindsTo=sonic.target After=sonic.target Before=ntp-config.service diff --git a/files/build_templates/per_namespace/teamd.service.j2 b/files/build_templates/per_namespace/teamd.service.j2 index 212209e37e..ddf6691eae 100644 --- a/files/build_templates/per_namespace/teamd.service.j2 +++ b/files/build_templates/per_namespace/teamd.service.j2 @@ -5,8 +5,8 @@ After=swss{% if multi_instance == 'true' %}@%i{% endif %}.service Requires=topology.service After=topology.service {% endif %} -Requires=updategraph.service -After=updategraph.service +Requires=config-setup.service +After=config-setup.service BindsTo=sonic.target After=sonic.target Before=ntp-config.service diff --git a/files/build_templates/pmon.service.j2 b/files/build_templates/pmon.service.j2 index 2e7ebca1c7..b2cd75ac70 100644 --- a/files/build_templates/pmon.service.j2 +++ b/files/build_templates/pmon.service.j2 @@ -1,7 +1,7 @@ [Unit] Description=Platform monitor container -Requires=database.service updategraph.service -After=database.service updategraph.service +Requires=database.service config-setup.service +After=database.service config-setup.service {% if sonic_asic_platform == 'mellanox' %} After=syncd.service {% endif %} diff --git a/files/build_templates/radv.service.j2 b/files/build_templates/radv.service.j2 index 0c1352f9e4..4c414a83c3 100644 --- a/files/build_templates/radv.service.j2 +++ b/files/build_templates/radv.service.j2 @@ -1,7 +1,7 @@ [Unit] Description=Router advertiser container -Requires=updategraph.service -After=updategraph.service swss.service syncd.service +Requires=config-setup.service +After=config-setup.service swss.service syncd.service Before=ntp-config.service BindsTo=sonic.target After=sonic.target diff --git a/files/build_templates/restapi.service.j2 b/files/build_templates/restapi.service.j2 index d44f5f1ba1..c82510238a 100644 --- a/files/build_templates/restapi.service.j2 +++ b/files/build_templates/restapi.service.j2 @@ -1,7 +1,7 @@ [Unit] Description=RestAPI container -Requires=updategraph.service -After=updategraph.service +Requires=config-setup.service +After=config-setup.service BindsTo=sonic.target After=sonic.target Before=ntp-config.service diff --git a/files/build_templates/snmp.service.j2 b/files/build_templates/snmp.service.j2 index 503d54eed3..db3ac1907f 100644 --- a/files/build_templates/snmp.service.j2 +++ b/files/build_templates/snmp.service.j2 @@ -1,8 +1,8 @@ [Unit] Description=SNMP container -Requires=updategraph.service +Requires=config-setup.service Requisite=swss.service -After=updategraph.service swss.service syncd.service interfaces-config.service +After=config-setup.service swss.service syncd.service interfaces-config.service BindsTo=sonic.target After=sonic.target Before=ntp-config.service diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index 167bdaaa4d..a1e102759e 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -610,18 +610,6 @@ sudo cp $IMAGE_CONFIGS/config-topology/config-topology.service $FILESYSTEM_ROOT_ echo "config-topology.service" | sudo tee -a $GENERATED_SERVICE_FILE sudo cp $IMAGE_CONFIGS/config-topology/config-topology.sh $FILESYSTEM_ROOT/usr/bin -# Copy updategraph script and service file -j2 files/build_templates/updategraph.service.j2 | sudo tee $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM/updategraph.service -sudo cp $IMAGE_CONFIGS/updategraph/updategraph $FILESYSTEM_ROOT/usr/bin/ -echo "updategraph.service" | sudo tee -a $GENERATED_SERVICE_FILE -{% if enable_dhcp_graph_service == "y" %} -sudo bash -c "echo enabled=true > $FILESYSTEM_ROOT/etc/sonic/updategraph.conf" -sudo bash -c "echo src=dhcp >> $FILESYSTEM_ROOT/etc/sonic/updategraph.conf" -sudo bash -c "echo dhcp_as_static=true >> $FILESYSTEM_ROOT/etc/sonic/updategraph.conf" -{% else %} -sudo bash -c "echo enabled=false > $FILESYSTEM_ROOT/etc/sonic/updategraph.conf" -{% endif %} - # Generate initial SONiC configuration file j2 files/build_templates/init_cfg.json.j2 | sudo tee $FILESYSTEM_ROOT/etc/sonic/init_cfg.json diff --git a/files/build_templates/tacacs-config.service b/files/build_templates/tacacs-config.service index 27e0e6891e..e9a205065d 100644 --- a/files/build_templates/tacacs-config.service +++ b/files/build_templates/tacacs-config.service @@ -1,7 +1,7 @@ [Unit] Description=TACACS application -Requires=updategraph.service -After=updategraph.service +Requires=config-setup.service +After=config-setup.service BindsTo=sonic.target After=sonic.target diff --git a/files/build_templates/tacacs-config.timer b/files/build_templates/tacacs-config.timer index f8380cbab1..0726f3ccdb 100644 --- a/files/build_templates/tacacs-config.timer +++ b/files/build_templates/tacacs-config.timer @@ -1,7 +1,7 @@ [Unit] Description=Delays tacacs apply until SONiC has started PartOf=tacacs-config.service -After=updategraph.service +After=config-setup.service [Timer] OnUnitActiveSec=0 sec diff --git a/files/build_templates/updategraph.service.j2 b/files/build_templates/updategraph.service.j2 deleted file mode 100644 index 0e05cbf147..0000000000 --- a/files/build_templates/updategraph.service.j2 +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=Update minigraph and set configuration based on minigraph -After=config-setup.service -Requires=config-setup.service - -[Service] -Type=oneshot -ExecStart=/usr/bin/updategraph -RemainAfterExit=yes - -[Install] -WantedBy=multi-user.target diff --git a/files/image_config/config-setup/config-setup b/files/image_config/config-setup/config-setup index 3369b0ec86..21d56217c3 100755 --- a/files/image_config/config-setup/config-setup +++ b/files/image_config/config-setup/config-setup @@ -25,7 +25,6 @@ ########################################################################### # Initialize constants -UPDATEGRAPH_CONF=/etc/sonic/updategraph.conf INIT_CFG_JSON=/etc/sonic/init_cfg.json CONFIG_DB_JSON=/etc/sonic/config_db.json CONFIG_DB_PATH=/etc/sonic/ @@ -180,24 +179,6 @@ check_system_warm_boot() fi } -# Check if updategraph service is administratively enabled -updategraph_is_enabled() -{ - rv=1 - if [ -e ${UPDATEGRAPH_CONF} ]; then - updategraph_mode=$(grep enabled ${UPDATEGRAPH_CONF} | head -n 1 | cut -f2 -d=) - [ "${updategraph_mode}" = "true" ] && rv=0 - fi - return $rv -} - -# Disable updategraph admininistratively -disable_updategraph() -{ - sed -i "/enabled=/d" ${UPDATEGRAPH_CONF} - echo "enabled=false" >> ${UPDATEGRAPH_CONF} -} - # Check if Zero Touch Provisioning is available and is administratively enabled ztp_is_enabled() { @@ -273,18 +254,14 @@ generate_config() # Create SONiC configuration for first time bootup # - If ZTP is enabled, ZTP configuraion is created -# - If ZTP is disabled and updategraph is disabled, factory default configuration +# - If ZTP is disabled, factory default configuration # is created -# - If updategraph is enabled and ZTP is disabled, updategraph initializes -# configuration do_config_initialization() { - if ! updategraph_is_enabled ; then - if ! ztp_is_enabled ; then - echo "No configuration detected, generating factory default configuration..." - generate_config factory ${CONFIG_DB_JSON} - reload_configdb ${CONFIG_DB_JSON} - fi + if ! ztp_is_enabled ; then + echo "No configuration detected, generating factory default configuration..." + generate_config factory ${CONFIG_DB_JSON} + reload_configdb ${CONFIG_DB_JSON} fi if ztp_is_enabled ; then @@ -376,7 +353,6 @@ 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 @@ -384,14 +360,10 @@ do_config_migration() 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 echo "Didn't found neither config_db.json nor minigraph.xml ..." fi diff --git a/files/image_config/copp/copp-config.service b/files/image_config/copp/copp-config.service index bd15de80bc..e93e2908b3 100644 --- a/files/image_config/copp/copp-config.service +++ b/files/image_config/copp/copp-config.service @@ -1,7 +1,7 @@ [Unit] Description=Update CoPP configuration -Requires=updategraph.service -After=updategraph.service +Requires=config-setup.service +After=config-setup.service BindsTo=sonic.target After=sonic.target diff --git a/files/image_config/hostname/hostname-config.service b/files/image_config/hostname/hostname-config.service index c82c2d0bf5..99bbe7e0ef 100644 --- a/files/image_config/hostname/hostname-config.service +++ b/files/image_config/hostname/hostname-config.service @@ -1,7 +1,7 @@ [Unit] Description=Update hostname based on configdb -Requires=updategraph.service -After=updategraph.service +Requires=config-setup.service +After=config-setup.service BindsTo=sonic.target After=sonic.target diff --git a/files/image_config/interfaces/interfaces-config.service b/files/image_config/interfaces/interfaces-config.service index a3f7157646..46b6f5dfbf 100644 --- a/files/image_config/interfaces/interfaces-config.service +++ b/files/image_config/interfaces/interfaces-config.service @@ -1,7 +1,7 @@ [Unit] Description=Update interfaces configuration -Requires=updategraph.service -After=updategraph.service +Requires=config-setup.service +After=config-setup.service BindsTo=sonic.target After=sonic.target diff --git a/files/image_config/logrotate/logrotate-config.service b/files/image_config/logrotate/logrotate-config.service index 0b89f9d857..2e1486eedd 100644 --- a/files/image_config/logrotate/logrotate-config.service +++ b/files/image_config/logrotate/logrotate-config.service @@ -1,7 +1,7 @@ [Unit] Description=Update logrotate configuration -Requires=updategraph.service -After=updategraph.service +Requires=config-setup.service +After=config-setup.service [Service] Type=oneshot diff --git a/files/image_config/ntp/ntp-config.service b/files/image_config/ntp/ntp-config.service index 5639b04520..97ee960bda 100644 --- a/files/image_config/ntp/ntp-config.service +++ b/files/image_config/ntp/ntp-config.service @@ -1,7 +1,7 @@ [Unit] Description=Update NTP configuration -Requires=updategraph.service -After=updategraph.service +Requires=config-setup.service +After=config-setup.service BindsTo=sonic.target After=sonic.target Before=ntp.service diff --git a/files/image_config/platform/rc.local b/files/image_config/platform/rc.local index 5cdefa8877..c8fb1213c6 100755 --- a/files/image_config/platform/rc.local +++ b/files/image_config/platform/rc.local @@ -254,7 +254,7 @@ if [ -f $FIRST_BOOT_FILE ]; then fi # Try to take old configuration saved during installation - # and create a flag in /tmp/ to let updategraph service know + # and create a flag in /tmp/ if [ -d /host/old_config ]; then mv -f /host/old_config /etc/sonic/ rm -rf /etc/sonic/old_config/old_config @@ -275,7 +275,6 @@ if [ -f $FIRST_BOOT_FILE ]; then [ -f /host/migration/snmp.yml ] && mv /host/migration/snmp.yml /etc/sonic/old_config/ [ -f /host/migration/golden_config_db.json ] && mv /host/migration/golden_config_db.json /etc/sonic/old_config/ touch /tmp/pending_config_migration - [ -f /etc/sonic/updategraph.conf ] && sed -i -e "s/enabled=false/enabled=true/g" /etc/sonic/updategraph.conf else touch /tmp/pending_config_initialization fi diff --git a/files/image_config/resolv-config/resolv-config.service b/files/image_config/resolv-config/resolv-config.service index 18a261dcf5..fa69330ab1 100644 --- a/files/image_config/resolv-config/resolv-config.service +++ b/files/image_config/resolv-config/resolv-config.service @@ -1,7 +1,7 @@ [Unit] Description=Update DNS configuration -Requires=updategraph.service -After=updategraph.service +Requires=config-setup.service +After=config-setup.service BindsTo=sonic.target After=sonic.target StartLimitIntervalSec=0 diff --git a/files/image_config/rsyslog/rsyslog-config.service b/files/image_config/rsyslog/rsyslog-config.service index 4290766da2..c3db881b8e 100644 --- a/files/image_config/rsyslog/rsyslog-config.service +++ b/files/image_config/rsyslog/rsyslog-config.service @@ -1,7 +1,7 @@ [Unit] Description=Update rsyslog configuration -Requires=updategraph.service -After=updategraph.service +Requires=config-setup.service +After=config-setup.service BindsTo=sonic.target After=sonic.target After=interfaces-config.service diff --git a/files/image_config/secureboot/allowlist_paths.conf b/files/image_config/secureboot/allowlist_paths.conf index 53ade25155..d63c3de724 100644 --- a/files/image_config/secureboot/allowlist_paths.conf +++ b/files/image_config/secureboot/allowlist_paths.conf @@ -28,7 +28,6 @@ etc/sonic/old_config/.* etc/sonic/port_config.json etc/sonic/snmp.yml etc/sonic/sonic-environment -etc/sonic/updategraph.conf etc/ssh/ssh_host_rsa_key.pub etc/ssh/ssh_host_rsa_key etc/subgid diff --git a/files/image_config/system-health/system-health.service b/files/image_config/system-health/system-health.service index 3de6a51584..b8d375bdad 100644 --- a/files/image_config/system-health/system-health.service +++ b/files/image_config/system-health/system-health.service @@ -1,7 +1,7 @@ [Unit] Description=SONiC system health monitor -Requires=database.service updategraph.service -After=database.service updategraph.service +Requires=database.service config-setup.service +After=database.service config-setup.service [Service] ExecStart=/usr/local/bin/healthd diff --git a/files/image_config/updategraph/updategraph b/files/image_config/updategraph/updategraph deleted file mode 100755 index 905831ae75..0000000000 --- a/files/image_config/updategraph/updategraph +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash - -# read SONiC immutable variables -[ -f /etc/sonic/sonic-environment ] && . /etc/sonic/sonic-environment - -if [ ! -f /etc/sonic/updategraph.conf ]; then - echo "No updategraph.conf found, generating a default one." - echo "enabled=false" >/etc/sonic/updategraph.conf -fi - -. /etc/sonic/updategraph.conf - -if [ "$enabled" = "reload_only" ]; then - echo "reload_only will not be supported in file updategraph.conf" - exit 1 -fi - -if [ "$enabled" != "true" ]; then - echo "Disabled in updategraph.conf. Skipping graph update." - exit 0 -fi - -# If ZTP package is available and enabled, use ZTP to download and load the graph. -if [ -e /usr/bin/ztp ] && [ "$(ztp status -c)" != "0:DISABLED" ]; then - echo "ZTP is available and enabled. Skipping graph update." - exit 0 -fi - -# "`cat /tmp/dhcp_graph_url`" is always "N/A" -echo "No graph_url option in DHCP response. Skipping graph update and generating an empty configuration." -PLATFORM=${PLATFORM:-`sonic-cfggen -H -v DEVICE_METADATA.localhost.platform`} -if [ -f /etc/sonic/minigraph.xml ]; then - sonic-cfggen -H -m /etc/sonic/minigraph.xml --preset empty > /tmp/device_meta.json -else - PRESET=(`head -n 1 /usr/share/sonic/device/$PLATFORM/default_sku`) - sonic-cfggen -H -k ${PRESET[0]} --preset empty > /tmp/device_meta.json -fi -if [ -f /etc/sonic/init_cfg.json ]; then - sonic-cfggen -j /tmp/device_meta.json -j /etc/sonic/init_cfg.json --print-data > /etc/sonic/config_db.json -else - cp -f /tmp/device_meta.json /etc/sonic/config_db.json -fi -sonic-db-cli CONFIG_DB FLUSHDB -sonic-cfggen -j /etc/sonic/config_db.json --write-to-db -sonic-db-cli CONFIG_DB SET "CONFIG_DB_INITIALIZED" "1" -if [ "$dhcp_as_static" = "true" ]; then - sed -i "/enabled=/d" /etc/sonic/updategraph.conf - echo "enabled=false" >> /etc/sonic/updategraph.conf -fi -exit 0 - diff --git a/rules/config b/rules/config index 4628313dc1..e52eeae4c4 100644 --- a/rules/config +++ b/rules/config @@ -48,12 +48,6 @@ DEFAULT_USERNAME = admin # DEFAULT_PASSWORD - default password for installer build DEFAULT_PASSWORD = YourPaSsWoRd -# ENABLE_DHCP_GRAPH_SERVICE - specify the source of minigraph to generate configuration file. -# If set to y SONiC will get the minigraph from graph service. Graph service URL need to be -# passed through DHCP option 225. -# If not set (default behavior) the default minigraph built into the image will be used. -# ENABLE_DHCP_GRAPH_SERVICE = y - # ENABLE_ZTP - installs Zero Touch Provisioning support. # ENABLE_ZTP = y diff --git a/rules/docker-dhcp-relay.mk b/rules/docker-dhcp-relay.mk index 6f1b23ab80..13915a49e4 100644 --- a/rules/docker-dhcp-relay.mk +++ b/rules/docker-dhcp-relay.mk @@ -23,7 +23,7 @@ $(DOCKER_DHCP_RELAY)_VERSION = 1.0.0 $(DOCKER_DHCP_RELAY)_PACKAGE_NAME = dhcp-relay $(DOCKER_DHCP_RELAY)_PACKAGE_DEPENDS = database^1.0.0 -$(DOCKER_DHCP_RELAY)_SERVICE_REQUIRES = updategraph +$(DOCKER_DHCP_RELAY)_SERVICE_REQUIRES = config-setup $(DOCKER_DHCP_RELAY)_SERVICE_AFTER = swss syncd teamd $(DOCKER_DHCP_RELAY)_SERVICE_BEFORE = ntp-config $(DOCKER_DHCP_RELAY)_SERVICE_DEPENDENT_OF = swss diff --git a/rules/docker-dhcp-server.mk b/rules/docker-dhcp-server.mk index bfcf88327b..94ec1bf0a3 100644 --- a/rules/docker-dhcp-server.mk +++ b/rules/docker-dhcp-server.mk @@ -38,7 +38,7 @@ $(DOCKER_DHCP_SERVER)_CONTAINER_NAME = dhcp_server $(DOCKER_DHCP_SERVER)_VERSION = 1.0.0 $(DOCKER_DHCP_SERVER)_PACKAGE_NAME = dhcp-server -$(DOCKER_MACSEC)_SERVICE_REQUIRES = updategraph +$(DOCKER_MACSEC)_SERVICE_REQUIRES = config-setup $(DOCKER_MACSEC)_SERVICE_AFTER = swss syncd $(DOCKER_DHCP_SERVER)_CONTAINER_PRIVILEGED = false diff --git a/rules/docker-eventd.mk b/rules/docker-eventd.mk index ef926a064d..49ac4f4683 100644 --- a/rules/docker-eventd.mk +++ b/rules/docker-eventd.mk @@ -21,9 +21,6 @@ $(DOCKER_EVENTD)_INSTALL_DEBS = $(PYTHON3_SWSSCOMMON) $(DOCKER_EVENTD)_VERSION = 1.0.0 $(DOCKER_EVENTD)_PACKAGE_NAME = eventd -$(DOCKER_DHCP)_SERVICE_REQUIRES = updategraph -$(DOCKER_DHCP)_SERVICE_AFTER = database - SONIC_DOCKER_IMAGES += $(DOCKER_EVENTD) ifeq ($(INCLUDE_SYSTEM_EVENTD), y) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_EVENTD) diff --git a/rules/docker-macsec.mk b/rules/docker-macsec.mk index c36518aafe..df52eccdf7 100644 --- a/rules/docker-macsec.mk +++ b/rules/docker-macsec.mk @@ -44,7 +44,7 @@ $(DOCKER_MACSEC)_CONTAINER_VOLUMES += /etc/sonic:/etc/sonic:ro $(DOCKER_MACSEC)_CONTAINER_VOLUMES += /etc/timezone:/etc/timezone:ro $(DOCKER_MACSEC)_CONTAINER_VOLUMES += /host/warmboot:/var/warmboot -$(DOCKER_MACSEC)_SERVICE_REQUIRES = updategraph +$(DOCKER_MACSEC)_SERVICE_REQUIRES = config-setup $(DOCKER_MACSEC)_SERVICE_AFTER = swss syncd $(DOCKER_MACSEC)_CLI_CONFIG_PLUGIN = /cli/config/plugins/macsec.py diff --git a/slave.mk b/slave.mk index 32e88c2b67..73088e945b 100644 --- a/slave.mk +++ b/slave.mk @@ -397,7 +397,6 @@ $(info "SECURE_UPGRADE_SIGNING_CERT" : "$(SECURE_UPGRADE_SIGNING_CERT)") $(info "SECURE_UPGRADE_PROD_SIGNING_TOOL": "$(SECURE_UPGRADE_PROD_SIGNING_TOOL)") $(info "SECURE_UPGRADE_PROD_TOOL_ARGS" : "$(SECURE_UPGRADE_PROD_TOOL_ARGS)") $(info "ONIE_IMAGE_PART_SIZE" : "$(ONIE_IMAGE_PART_SIZE)") -$(info "ENABLE_DHCP_GRAPH_SERVICE" : "$(ENABLE_DHCP_GRAPH_SERVICE)") $(info "SHUTDOWN_BGP_ON_START" : "$(SHUTDOWN_BGP_ON_START)") $(info "ENABLE_PFCWD_ON_START" : "$(ENABLE_PFCWD_ON_START)") $(info "SONIC_BUFFER_MODEL" : "$(SONIC_BUFFER_MODEL)") @@ -1412,7 +1411,6 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \ export sonicadmin_user="$(USERNAME)" export sonic_asic_platform="$(patsubst %-$(CONFIGURED_ARCH),%,$(CONFIGURED_PLATFORM))" export enable_organization_extensions="$(ENABLE_ORGANIZATION_EXTENSIONS)" - export enable_dhcp_graph_service="$(ENABLE_DHCP_GRAPH_SERVICE)" export enable_ztp="$(ENABLE_ZTP)" export include_teamd="$(INCLUDE_TEAMD)" export include_router_advertiser="$(INCLUDE_ROUTER_ADVERTISER)"