Skip to content

Commit

Permalink
service starts fine; tool ready to test send/receive
Browse files Browse the repository at this point in the history
  • Loading branch information
renukamanavalan committed Jun 14, 2022
1 parent 9f9027b commit d5b9562
Show file tree
Hide file tree
Showing 9 changed files with 365 additions and 9 deletions.
1 change: 1 addition & 0 deletions dockers/docker-eventd/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ RUN apt-get clean -y && \
apt-get autoremove -y && \
rm -rf /debs

COPY ["start.sh", "/usr/bin/"]
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor"]
Expand Down
3 changes: 0 additions & 3 deletions dockers/docker-eventd/eventd.sh

This file was deleted.

2 changes: 1 addition & 1 deletion dockers/docker-eventd/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ dependent_startup_wait_for=rsyslogd:running


[program:eventd]
command=/usr/bin/eventd
command=/usr/sbin/eventd
priority=3
autostart=false
autorestart=false
Expand Down
5 changes: 3 additions & 2 deletions files/build_templates/eventd.service.j2
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
[Unit]
Description=EVENTD container
Requires=updategraph.service
Requisite=swss.service
After=updategraph.service
BindsTo=sonic.target
After=sonic.target
Before=ntp-config.service
StartLimitIntervalSec=1200
StartLimitBurst=3

Expand All @@ -14,3 +12,6 @@ ExecStartPre=/usr/bin/{{docker_container_name}}.sh start
ExecStart=/usr/bin/{{docker_container_name}}.sh wait
ExecStop=/usr/bin/{{docker_container_name}}.sh stop
RestartSec=30

[Install]
WantedBy=sonic.target
13 changes: 11 additions & 2 deletions src/sonic-eventd/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
RM := rm -rf
EVENTD_TARGET := eventd
EVENTD_TEST := tests/tests
EVENTD_TOOL := tools/events_tool
CP := cp
MKDIR := mkdir
CC := g++
Expand All @@ -19,8 +20,9 @@ endif

-include src/subdir.mk
-include tests/subdir.mk
-include tools/subdir.mk

all: sonic-eventd eventd-tests
all: sonic-eventd eventd-tests eventd-tool

sonic-eventd: $(OBJS)
@echo 'Building target: $@'
Expand All @@ -29,12 +31,19 @@ sonic-eventd: $(OBJS)
@echo 'Finished building target: $@'
@echo ' '

eventd-tool: $(TOOL_OBJS)
@echo 'Building target: $@'
@echo 'Invoking: G++ Linker'
$(CC) $(LDFLAGS) -o $(EVENTD_TOOL) $(TOOL_OBJS) $(LIBS)
@echo 'Finished building target: $@'
@echo ' '

eventd-tests: $(TEST_OBJS)
@echo 'Building target: $@'
@echo 'Invoking: G++ Linker'
$(CC) $(LDFLAGS) -o $(EVENTD_TEST) $(TEST_OBJS) $(LIBS) $(TEST_LIBS)
@echo 'Finished building target: $@'
$(EVENTD_TEST)
@echo 'Blocked $(EVENTD_TEST)'
@echo 'Finished running tests'
@echo ' '

Expand Down
2 changes: 1 addition & 1 deletion src/sonic-eventd/tests/subdir.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ C_DEPS += ./tests/eventd_ut.d ./tests/main.d
tests/%.o: tests/%.cpp
@echo 'Building file: $<'
@echo 'Invoking: GCC C++ Compiler'
$(CC) -D__FILENAME__="$(subst src/,,$<)" $(CFLAGS) -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
$(CC) -D__FILENAME__="$(subst tests/,,$<)" $(CFLAGS) -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '
Loading

0 comments on commit d5b9562

Please sign in to comment.