Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,9 @@ sources.list.*

# Generated mirror configs
apt-retries-count

# Python venv
venv/**

src/protobuf/**
fsroot-vs/**
8 changes: 7 additions & 1 deletion dockers/docker-database/database_config.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,13 @@
"id" : 14,
"separator": ":",
"instance" : "redis"
}
},
"DYNAMIC_DB" : {
"id" : 21,
"separator": "|",
"instance" : "redis"
}

{% if DATABASE_TYPE is defined and DATABASE_TYPE == "dpudb" %}
,
"DPU_APPL_DB" : {
Expand Down
4 changes: 3 additions & 1 deletion dockers/docker-orchagent/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ RUN apt-get update && \
pciutils \
# Needed for installing netifaces Python package
build-essential \
python3-dev
python3-dev \
# Used for scheduledconfigmgrd
cron

{% if ( CONFIGURED_ARCH == "armhf" or CONFIGURED_ARCH == "arm64" ) %}
# Fix for gcc/python/iputils-ping not found in arm docker
Expand Down
3 changes: 3 additions & 0 deletions dockers/docker-orchagent/critical_processes.j2
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@ program:nbrmgrd
program:vxlanmgrd
program:coppmgrd
program:tunnelmgrd
program:timerangemgrd
program:scheduledconfigmgrd
program:cron
{%- endif %}
45 changes: 45 additions & 0 deletions dockers/docker-orchagent/supervisord.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -340,3 +340,48 @@ dependent_startup_wait_for=swssconfig:exited
environment=ASAN_OPTIONS="log_path=/var/log/asan/fdbsyncd-asan.log{{ asan_extra_options }}"
{% endif %}
{%- endif %}

{% if is_fabric_asic == 0 %}
[program:timerangemgrd]
command=/usr/bin/timerangemgrd
priority=18
autostart=false
autorestart=false
stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=swssconfig:exited
{% if ENABLE_ASAN == "y" %}
environment=ASAN_OPTIONS="log_path=/var/log/asan/timerangemgrd-asan.log{{ asan_extra_options }}"
{% endif %}
{%- endif %}

{% if is_fabric_asic == 0 %}
[program:scheduledconfigmgrd]
command=/usr/bin/scheduledconfigmgrd
priority=18
autostart=false
autorestart=false
stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=swssconfig:exited
{% if ENABLE_ASAN == "y" %}
environment=ASAN_OPTIONS="log_path=/var/log/asan/scheduledconfigmgrd-asan.log{{ asan_extra_options }}"
{% endif %}
{%- endif %}

{% if is_fabric_asic == 0 %}
[program:cron]
command=/usr/sbin/cron -f -L 15
priority=18
autostart=false
autorestart=false
stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=swssconfig:exited
{% if ENABLE_ASAN == "y" %}
environment=ASAN_OPTIONS="log_path=/var/log/asan/cron-asan.log{{ asan_extra_options }}"
{% endif %}
{%- endif %}
7 changes: 6 additions & 1 deletion platform/vs/docker-sonic-vs/database_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,12 @@
"id" : 14,
"separator": ":",
"instance" : "redis"
}
},
"DYNAMIC_DB" : {
"id" : 21,
"separator": "|",
"instance" : "redis"
}
},
"VERSION" : "1.0"
}
6 changes: 6 additions & 0 deletions platform/vs/docker-sonic-vs/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,12 @@ supervisorctl start tunnelmgrd

supervisorctl start fabricmgrd

supervisorctl start timerangemgrd

supervisorctl start scheduledconfigmgrd

supervisorctl start cron

# Start arp_update when VLAN exists
VLAN=`sonic-cfggen -d -v 'VLAN.keys() | join(" ") if VLAN'`
if [ "$VLAN" != "" ]; then
Expand Down
34 changes: 34 additions & 0 deletions platform/vs/docker-sonic-vs/supervisord.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -405,3 +405,37 @@ stderr_syslog=true
{% if ENABLE_ASAN == "y" %}
environment=ASAN_OPTIONS="log_path=/var/log/asan/fabricmgrd-asan.log{{ asan_extra_options }}"
{% endif %}

[program:timerangemgrd]
command=/usr/bin/timerangemgrd
priority=27
autostart=false
autorestart=false
stdout_logfile=syslog
stderr_logfile=syslog
{% if ENABLE_ASAN == "y" %}
environment=ASAN_OPTIONS="log_path=/var/log/asan/timerangemgrd-asan.log{{ asan_extra_options }}"
{% endif %}

[program:scheduledconfigmgrd]
command=/usr/bin/scheduledconfigmgrd
priority=27
autostart=false
autorestart=false
stdout_logfile=syslog
stderr_logfile=syslog
{% if ENABLE_ASAN == "y" %}
environment=ASAN_OPTIONS="log_path=/var/log/asan/scheduledconfigmgrd-asan.log{{ asan_extra_options }}"
{% endif %}


[program:cron]
command=/usr/sbin/cron -f -L 15
priority=27
autostart=false
autorestart=false
stdout_logfile=syslog
stderr_logfile=syslog
{% if ENABLE_ASAN == "y" %}
environment=ASAN_OPTIONS="log_path=/var/log/asan/cron-asan.log{{ asan_extra_options }}"
{% endif %}
6 changes: 3 additions & 3 deletions rules/config
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# SONIC_CONFIG_BUILD_JOBS - set number of jobs for parallel build.
# Corresponding -j argument will be passed to make command inside docker
# container.
SONIC_CONFIG_BUILD_JOBS = 1
SONIC_CONFIG_BUILD_JOBS = 12

# SONIC_CONFIG_MAKE_JOBS - set number of parallel make jobs per package.
# Corresponding -j argument will be passed to make/dpkg commands that build separate packages
Expand Down Expand Up @@ -49,7 +49,7 @@ SMARTSWITCH ?= 0
DEFAULT_USERNAME = admin

# DEFAULT_PASSWORD - default password for installer build
DEFAULT_PASSWORD = YourPaSsWoRd
DEFAULT_PASSWORD = Marv12\#$

# ENABLE_ZTP - installs Zero Touch Provisioning support.
# ENABLE_ZTP = y
Expand Down Expand Up @@ -153,7 +153,7 @@ INCLUDE_RESTAPI ?= n
INCLUDE_NAT = y

# INCLUDE_DHCP_RELAY - build and install dhcp-relay package
INCLUDE_DHCP_RELAY = y
INCLUDE_DHCP_RELAY = n

# INCLUDE_DHCP_SERVER - build and install dhcp-server package
INCLUDE_DHCP_SERVER ?= n
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
module sonic-scheduled-configurations {

yang-version 1.1;

namespace "http://github.com/sonic-net/sonic-scheduled-configurations";
prefix scheduled-configurations;

description "SCHEDULED_CONFIGURATIONS YANG Module for SONiC OS Used for Scheduled Configuration";

revision 2024-05-09 {
description "First Revision";
}

container sonic-scheduled-configurations {

container SCHEDULED_CONFIGURATIONS {

description "TIME_RANGE part of config_db.json";

list SCHEDULED_CONFIGURATIONS_LIST {
description "List of scheduled configurations, each identified by unique name";

key "name";

leaf name {
type string;
description "Unique name for the scheduled configuration";
}

leaf time_range {
mandatory true;
type string {
length "1..255";
}
description "Time range this configuration is bound to";
}

leaf configuration {
mandatory true;
type string;
description "Configuration to be applied to CONFIG_DB in JSON format";
}

leaf deactivation_configuration {
mandatory true;
type string;
description "A configuration to be applied at deactivation, or the string 'remove' to simply remove the configuration at deactivation";

}
} /* end of list SCHEDULED_CONFIGURATIONS_LIST */

} /* end of container SCHEDULED_CONFIGURATIONS */

} /* end of top level container */

} /* end of module sonic-scheduled-configurations */
61 changes: 61 additions & 0 deletions src/sonic-yang-models/yang-models/sonic-timerange.yang
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
module sonic-timerange {

yang-version 1.1;

namespace "http://github.com/sonic-net/sonic-timerange";
prefix timerange;

description "TIME_RANGE YANG Module for SONiC OS Used for Scheduled Configuration";

revision 2024-05-09 {
description "First Revision";
}

container sonic-timerange {

container TIME_RANGE {

description "TIME_RANGE part of config_db.json";

list TIME_RANGE_LIST {
description "List of time ranges, each identified by unique name";

key "name";

leaf name {
type string;
description "Unique name for the time range";
}

leaf start {
mandatory true;
type string {
length "1..255";
}
description "Start time for time range";
}

leaf end {
mandatory true;
type string {
length "1..255";
}
description "End time for time range";
}

leaf start_year {
type uint16;
description "Indicates what year this time range will begin running";
}

leaf end_year {
type uint16;
description "Indicates what year this time range will end";
}
} /* end of list TIME_RANGE_LIST */

} /* end of container TIME_RANGE */

} /* end of top level container */

} /* end of module sonic-timerange */