Skip to content
Closed
Show file tree
Hide file tree
Changes from 5 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 @@ -111,3 +111,9 @@ sources.list.*

# Generated mirror configs
apt-retries-count

# Python venv
venv/**

src/protobuf/**
fsroot-vs/**
4 changes: 3 additions & 1 deletion dockers/docker-orchagent/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,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 @@ -302,3 +302,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 %}
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 @@ -178,6 +178,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 @@ -325,3 +325,37 @@ stderr_logfile=syslog
{% 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 @@ -46,7 +46,7 @@ CHANGE_DEFAULT_PASSWORD ?= n
DEFAULT_USERNAME = admin

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

# 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
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,44 @@
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 time_range {
mandatory true;
type string {
length 1..255;
}
description "time range this configuration is bound to";
}

leaf configuration {
type string;
description "configuration to be applied to APPL_DB in JSON format";
}
} /* end of list SCHEDULED_CONFIGURATIONS_LIST */

} /* end of container SCHEDULED_CONFIGURATIONS */

} /* end of top level container */

} /* end of module sonic-scheduled-configurations */

52 changes: 52 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,52 @@
module sonic-timerange {

yang-version 1.1;

namespace "http://github.com/sonic-net/sonic-timerage";
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 start {
Comment thread
matiAlfaro marked this conversation as resolved.
mandatory true;
type string {
length 1..255;
}
description "start time for time range";
}

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

leaf runOnce {
type boolean;
default "false";
description "Indicates whether the time range should trigger only once.";
}
} /* end of list TIME_RANGE_LIST */

} /* end of container TIME_RANGE */

} /* end of top level container */

} /* end of module sonic-timerange */