-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move sonic-host-services-data from sonic-buildimage into this repo
This repo's tests depends on files that are in src/sonic-host-services-data in sonic-buildimage. Due to PR check requirements, this creates a cyclical dependency when needing to update the templates and the sample output files. To fix that cyclical dependency, move that directory into this repo. That way, both the templates and the sample output files can be updated in a single commit. Signed-off-by: Saikrishna Arcot <[email protected]>
- Loading branch information
1 parent
86d528d
commit bd6baa7
Showing
35 changed files
with
574 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
debian/*.debhelper | ||
debian/debhelper-build-stamp | ||
debian/sonic-host-services-data/ | ||
sonic-host-services-data_*.buildinfo | ||
sonic-host-services-data_*.changes | ||
sonic-host-services-data_*.deb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# This file describes the maintainers for sonic-host-services-data | ||
# See the SONiC project governance document for more information | ||
|
||
Name = "Joe LeVeque" | ||
Email = "[email protected]" | ||
Github = jleveque | ||
Mailinglist = [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# sonic-host-services-data | ||
Data files required for SONiC host services | ||
|
||
|
||
## To build | ||
|
||
``` | ||
dpkg-buildpackage -rfakeroot -b -us -uc | ||
``` | ||
|
||
## To clean | ||
|
||
``` | ||
dpkg-buildpackage -rfakeroot -Tclean | ||
``` | ||
|
||
--- | ||
|
||
See the [SONiC Website](https://sonic-net.github.io/SONiC/) for more information about the SONiC project. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
sonic-host-services-data (1.0-1) UNRELEASED; urgency=low | ||
|
||
* Initial release | ||
|
||
-- Joe LeVeque <[email protected]> Tue, 20 Oct 2020 02:35:43 +0000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Source: sonic-host-services-data | ||
Maintainer: Joe LeVeque <[email protected]> | ||
Section: misc | ||
Priority: optional | ||
Standards-Version: 0.1 | ||
Build-Depends: debhelper (>=11) | ||
|
||
Package: sonic-host-services-data | ||
Architecture: all | ||
Depends: ${misc:Depends} | ||
Description: Data files required for SONiC host services |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
templates/*.j2 /usr/share/sonic/templates/ | ||
org.sonic.hostservice.conf /etc/dbus-1/system.d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/make -f | ||
|
||
ifeq (${ENABLE_HOST_SERVICE_ON_START}, y) | ||
HOST_SERVICE_OPTS := --no-start | ||
else | ||
HOST_SERVICE_OPTS := --no-start --no-enable | ||
endif | ||
|
||
|
||
build: | ||
|
||
%: | ||
dh $@ | ||
|
||
override_dh_installsystemd: | ||
dh_installsystemd --no-start --name=caclmgrd | ||
dh_installsystemd --no-start --name=hostcfgd | ||
dh_installsystemd --no-start --name=featured | ||
dh_installsystemd --no-start --name=aaastatsd | ||
dh_installsystemd --no-start --name=procdockerstatsd | ||
dh_installsystemd --no-start --name=determine-reboot-cause | ||
dh_installsystemd --no-start --name=process-reboot-cause | ||
dh_installsystemd $(HOST_SERVICE_OPTS) --name=sonic-hostservice | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[Unit] | ||
Description=AAA Statistics Collection daemon | ||
Requires=hostcfgd.service | ||
After=hostcfgd.service updategraph.service | ||
BindsTo=sonic.target | ||
After=sonic.target | ||
|
||
[Service] | ||
Type=simple | ||
ExecStart=/usr/local/bin/aaastatsd | ||
Restart=on-failure | ||
RestartSec=10 | ||
TimeoutStopSec=3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Unit] | ||
Description=Delays aaastatsd daemon until SONiC has started | ||
PartOf=aaastatsd.service | ||
|
||
[Timer] | ||
OnUnitActiveSec=0 sec | ||
OnBootSec=1min 30 sec | ||
Unit=aaastatsd.service | ||
|
||
[Install] | ||
WantedBy=timers.target sonic.target | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[Unit] | ||
Description=Control Plane ACL configuration daemon | ||
Requires=updategraph.service | ||
After=updategraph.service | ||
BindsTo=sonic.target | ||
After=sonic.target | ||
|
||
[Service] | ||
Type=simple | ||
ExecStart=/usr/local/bin/caclmgrd | ||
Restart=always | ||
RestartSec=30 | ||
|
||
[Install] | ||
WantedBy=sonic.target |
12 changes: 12 additions & 0 deletions
12
data/debian/sonic-host-services-data.determine-reboot-cause.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Unit] | ||
Description=Reboot cause determination service | ||
Requires=rc-local.service database.service | ||
After=rc-local.service database.service | ||
|
||
[Service] | ||
Type=oneshot | ||
RemainAfterExit=yes | ||
ExecStart=/usr/local/bin/determine-reboot-cause | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[Unit] | ||
Description=Feature configuration daemon | ||
Requires=updategraph.service | ||
After=updategraph.service | ||
BindsTo=sonic.target | ||
After=sonic.target | ||
|
||
[Service] | ||
Type=simple | ||
ExecStart=/usr/local/bin/featured |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Unit] | ||
Description=Delays feature daemon until SONiC has started | ||
PartOf=featured.service | ||
|
||
[Timer] | ||
OnUnitActiveSec=0 sec | ||
OnBootSec=1min 30 sec | ||
Unit=featured.service | ||
|
||
[Install] | ||
WantedBy=timers.target sonic.target | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[Unit] | ||
Description=Host config enforcer daemon | ||
Requires=updategraph.service | ||
After=updategraph.service | ||
BindsTo=sonic.target | ||
After=sonic.target | ||
|
||
[Service] | ||
Type=simple | ||
ExecStart=/usr/local/bin/hostcfgd | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Unit] | ||
Description=Delays hostcfgd daemon until SONiC has started | ||
PartOf=hostcfgd.service | ||
|
||
[Timer] | ||
OnUnitActiveSec=0 sec | ||
OnBootSec=1min 30 sec | ||
Unit=hostcfgd.service | ||
|
||
[Install] | ||
WantedBy=timers.target sonic.target | ||
|
14 changes: 14 additions & 0 deletions
14
data/debian/sonic-host-services-data.procdockerstatsd.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[Unit] | ||
Description=Process and docker CPU/memory utilization data export daemon | ||
Requires=database.service updategraph.service | ||
After=database.service updategraph.service | ||
BindsTo=sonic.target | ||
After=sonic.target | ||
|
||
[Service] | ||
Type=simple | ||
ExecStart=/usr/local/bin/procdockerstatsd | ||
Restart=always | ||
|
||
[Install] | ||
WantedBy=sonic.target |
8 changes: 8 additions & 0 deletions
8
data/debian/sonic-host-services-data.process-reboot-cause.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[Unit] | ||
Description=Retrieve the reboot cause from the history files and save them to StateDB | ||
Requires=database.service determine-reboot-cause.service | ||
After=database.service determine-reboot-cause.service | ||
|
||
[Service] | ||
Type=simple | ||
ExecStart=/usr/local/bin/process-reboot-cause |
9 changes: 9 additions & 0 deletions
9
data/debian/sonic-host-services-data.process-reboot-cause.timer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[Unit] | ||
Description=Delays process-reboot-cause until network is stably connected | ||
|
||
[Timer] | ||
OnBootSec=1min 30 sec | ||
Unit=process-reboot-cause.service | ||
|
||
[Install] | ||
WantedBy=timers.target |
16 changes: 16 additions & 0 deletions
16
data/debian/sonic-host-services-data.sonic-hostservice.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[Unit] | ||
Description=SONiC Host Service | ||
|
||
[Service] | ||
Type=dbus | ||
BusName=org.SONiC.HostService | ||
|
||
ExecStart=/usr/bin/python3 -u /usr/local/bin/sonic-host-server | ||
|
||
Restart=on-failure | ||
RestartSec=10 | ||
TimeoutStopSec=3 | ||
|
||
[Install] | ||
WantedBy=mgmt-framework.service telemetry.service | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE busconfig PUBLIC | ||
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" | ||
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> | ||
<busconfig> | ||
|
||
<!-- Only root can own the bus --> | ||
|
||
<policy user="root"> | ||
<allow own_prefix="org.SONiC.HostService"/> | ||
</policy> | ||
|
||
<!-- Allow user "root" to invoke methods on the bus --> | ||
<policy user="root"> | ||
<allow send_destination="org.SONiC.HostService"/> | ||
<allow receive_sender="org.SONiC.HostService"/> | ||
</policy> | ||
|
||
</busconfig> |
Oops, something went wrong.