Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Event and alarm management (#17949)" #20052

Merged
merged 1 commit into from
Aug 28, 2024
Merged
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: 0 additions & 6 deletions dockers/docker-database/database_config.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,6 @@
"instance" : {% if include_remote_db %} "remote_redis" {% else %} "redis" {% endif %}
}
{% endif %}
,
"EVENT_DB" : {
"id" : 19,
"separator": "|",
"instance" : "redis"
}
},
"VERSION" : "1.0"
}
10 changes: 0 additions & 10 deletions dockers/docker-eventd/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,3 @@ stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=start:exited

[program:eventdb]
command=/usr/bin/eventdb
priority=3
autostart=false
autorestart=false
stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=start:exited

13 changes: 3 additions & 10 deletions files/build_templates/docker_image_ctl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,9 @@ function preStartAction()
# Load redis content from /host/warmboot/dump.rdb
docker cp $WARM_DIR/dump.rdb database$DEV:/var/lib/redis/dump.rdb
else
COLD_DIR=/host/coldboot
#In case of cold reboot, load redis content from /host/coldboot/dump.rdb
if [[ -f $COLD_DIR/dump.rdb ]]; then
#Load redis content from /host/coldboot/dump.rdb
docker cp $COLD_DIR/dump.rdb database$DEV:/var/lib/redis/dump.rdb
else
# Create an emtpy file and overwrite any RDB if already there
echo -n > /tmp/dump.rdb
docker cp /tmp/dump.rdb database$DEV:/var/lib/redis/
fi
# Create an emtpy file and overwrite any RDB if already there
echo -n > /tmp/dump.rdb
docker cp /tmp/dump.rdb database$DEV:/var/lib/redis/
fi
fi
{%- elif docker_container_name == "pde" %}
Expand Down
17 changes: 3 additions & 14 deletions src/sonic-eventd/Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
RM := rm -rf
EVENTD_TARGET := eventd
EVENTD_TEST := tests/tests
EVENTDB_TEST := tests/eventdb
EVENTD_TOOL := tools/events_tool
EVENTD_PUBLISH_TOOL := tools/events_publish_tool.py
RSYSLOG-PLUGIN_TARGET := rsyslog_plugin/rsyslog_plugin
RSYSLOG-PLUGIN_TEST := rsyslog_plugin_tests/tests
EVENTD_MONIT := tools/events_monit_test.py
EVENTD_MONIT_CONF := tools/monit_events
EVENTDB_TARGET := eventdb
EVENTDB_DEFAULT_PROFILE := var/evprofile/default.json
EVENTDB_PROF := etc/eventd.json

CP := cp
MKDIR := mkdir
Expand All @@ -23,7 +19,7 @@ PWD := $(shell pwd)

ifneq ($(MAKECMDGOALS),clean)
ifneq ($(strip $(C_DEPS)),)
-include $(C_DEPS) $(OBJS) $(EVENTDB_OBJS)
-include $(C_DEPS) $(OBJS)
endif
endif

Expand All @@ -35,11 +31,10 @@ endif

all: sonic-eventd eventd-tests eventd-tool rsyslog-plugin rsyslog-plugin-tests

sonic-eventd: $(OBJS) $(EVENTDB_OBJS)
sonic-eventd: $(OBJS)
@echo 'Building target: $@'
@echo 'Invoking: G++ Linker'
$(CC) $(LDFLAGS) -o $(EVENTD_TARGET) $(OBJS) $(LIBS)
$(CC) $(LDFLAGS) -o $(EVENTDB_TARGET) $(EVENTDB_OBJS) $(LIBS)
@echo 'Finished building target: $@'
@echo ' '

Expand All @@ -57,14 +52,12 @@ rsyslog-plugin: $(RSYSLOG-PLUGIN_OBJS)
@echo 'Finished building target: $@'
@echo ' '

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

Expand All @@ -80,16 +73,12 @@ rsyslog-plugin-tests: $(RSYSLOG-PLUGIN-TEST_OBJS)
install:
$(MKDIR) -p $(DESTDIR)/usr/bin
$(MKDIR) -p $(DESTDIR)/etc/monit/conf.d
$(MKDIR) -p $(DESTDIR)/etc/evprofile
$(CP) $(EVENTD_TARGET) $(DESTDIR)/usr/bin
$(CP) $(EVENTD_TOOL) $(DESTDIR)/usr/bin
$(CP) $(EVENTD_PUBLISH_TOOL) $(DESTDIR)/usr/bin
$(CP) $(RSYSLOG-PLUGIN_TARGET) $(DESTDIR)/usr/bin
$(CP) $(EVENTD_MONIT) $(DESTDIR)/usr/bin
$(CP) $(EVENTD_MONIT_CONF) $(DESTDIR)/etc/monit/conf.d
$(CP) $(EVENTDB_TARGET) $(DESTDIR)/usr/bin
$(CP) $(EVENTDB_PROF) $(DESTDIR)/etc/eventd.json
$(CP) $(EVENTDB_DEFAULT_PROFILE) $(DESTDIR)/etc/evprofile/default.json

deinstall:
$(RM) -rf $(DESTDIR)/usr
Expand Down
3 changes: 0 additions & 3 deletions src/sonic-eventd/debian/sonic-eventd.install
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
usr/bin/eventd
usr/bin/eventdb
usr/bin/events_tool
usr/bin/events_publish_tool.py
etc/evprofile/default.json
etc/eventd.json
5 changes: 0 additions & 5 deletions src/sonic-eventd/etc/eventd.json

This file was deleted.

Loading
Loading