summaryrefslogtreecommitdiffstats
path: root/phosphor-rsyslog-config
Commit message (Collapse)AuthorAgeFilesLines
* rsyslod: Change disable actionSantosh Puranik2019-05-272-23/+3
| | | | | | | | | | | | | | | | | | | | | | | | This commit changes the way remote logging is disabled. Prior to this, we would create/delete the RSYSLOG_SERVER_CONFIG_FILE to enable/disable remote logging. Deleting the file would cause systemd to spin while it tried to trigger the syslog service via socket activation. So this commit reverts commits 40a7406097c0b5b0670c5987f6fe8c902d65562d and e165ea956c5557c2b470869d252c80744227b00f and then: To disable remote logging, we now simply ask that rsyslog ignore all incoming messages. This is done by using a special '~' rule for all messages. Tested: -- Verified that systemd no longer spins while trying to activate rsyslog with default config. -- Verified that setting a remote logging server over the REST API still works. Signed-off-by: Santosh Puranik <santosh.puranik@in.ibm.com> Change-Id: Ife217a84395aaf32b775b7a84f85fc6310df3e7c
* build: install into bin instead of sbinPatrick Venture2019-04-041-1/+1
| | | | | | | Installs into bin instead of sbin per guidelines Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I382022b4f09374132cf07232177a5145c425f758
* utils: restart: Fix restart bugWilliam A. Kennington III2019-04-031-1/+1
| | | | | | | | | bc89289f48ce5e1c8e5c66e657a176a0cd881d39 introduced a regression in the type signature of the RestartUnit call. The "replace" argument was accidentally deleted. Change-Id: I44313997b8b72b7163ad8b43ed2b45a01cb54e44 Signed-off-by: William A. Kennington III <wak@google.com>
* utils: restart: Always restart serviceWilliam A. Kennington III2019-04-011-4/+17
| | | | | | | | | | If the service has hit its reset limit in systemd, calling RestartUnit on the service will do nothing. This ensures that the service will try and restart at least once after a configuration change, regardless of whether or not it has failed in the past. Change-Id: I28962fc4ef9da641d1d19b8e09450e40d76e9c27 Signed-off-by: William A. Kennington III <wak@google.com>
* Fix regression with e165ea9Deepak Kodihalli2019-01-141-0/+1
| | | | | | | | | Commit e165ea9 introduces creation of the remote logging config file on demand, but it presumed the directory housing this config file pre-exists. That was not the case. Change-Id: I8974ce798de5d2747bcc4a67209f4d2c8081cfe6 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* rsyslogd: don't start without actionsDeepak Kodihalli2019-01-112-3/+22
| | | | | | | | | | | | | Rsyslog is currently used only for remote logging. The daemon would run though (started by systemd) even when remote logging has not been configured. In other words, it would run without any actions. With Yocto 2.6, rsyslogd won't run without any actions. Hence, rsyslogd is now started only on the condition that the remote logging config file is present. Change-Id: Iae11d6912e60765ecb774b663d44b4e3c6f381a3 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* add sdjournal interface to inject testsPatrick Venture2018-11-111-0/+3
| | | | | | | | The goal of the tests is not to test phosphor-logging, but rather allow code to call through phosphor-logging/log<> during a test. Change-Id: Id8c84ded473decc7f9f0be268116083093f86e54 Signed-off-by: Patrick Venture <venture@google.com>
* minor cleanup, std namespacingPatrick Venture2018-11-011-1/+3
| | | | | | | Added std namespace to places where there is a cpp version. Change-Id: I60a05a7c9cdcd79cfffc3c4968005fcbe34acf81 Signed-off-by: Patrick Venture <venture@google.com>
* build: phosphor-rsyslog-config: drop invalid libraryPatrick Venture2018-10-311-2/+0
| | | | | | | | | | | | | | | The line in the makefile for including the phosphor-logging isn't populated during build in neither the CI nor the obmc-phosphor-image build. "phosphor_rsyslog_conf-server-conf.o -lsdbusplus -lsystemd -lphosphor_dbus" Tested: Verified CI still builds both. Tested: Verified the build line from the compile log doesn't populate that line with any value. Change-Id: I4ec8c44d6a717f011118826149e64d2dd2c56d52 Signed-off-by: Patrick Venture <venture@google.com>
* add .clang-formatPatrick Venture2018-10-264-107/+102
| | | | | Change-Id: I2c36b7886a25d0b235693b0776019d29608e1d52 Signed-off-by: Patrick Venture <venture@google.com>
* phosphor-rsyslog-conf: react to hostname changeDeepak Kodihalli2018-10-171-1/+18
| | | | | | | | | | | | | | The rsyslog client caches the hostname when it starts up (hostname is included in logs that are streamed out). If someone changes hostname via REST API for example, the same won't reflect in rsyslog logs at the server. Listen to the hostname changed D-Bus signal from systemd, and restart rsyslogd when this happens. This ensures logs are streamed out with the updated hostname. Change-Id: Ied2b401e621314ef7c25e97dc93f86a429fb4077 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* phoshor-rsyslog-config: wrap utils::restartDeepak Kodihalli2018-08-312-1/+10
| | | | | | | | Provide a virtual wrapper around utils::restart in class Server. This allows mocking in tests. Change-Id: I79a229eaaaa17860959b8025eb8c152362738acf Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* phosphor-rsyslog-conf: implement restoreDeepak Kodihalli2018-08-292-2/+41
| | | | | | | | Upon startup, if a remote logging config exists, relay that information into appropriate D-Bus properties. Change-Id: Ib873667a50f0c8a6af6a3b571f68d6075808ed10 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* rsyslog-conf: add validation and error handlingDeepak Kodihalli2018-08-293-10/+90
| | | | | | | Validate server IP address. Handle exceptions. Change-Id: I6da9949dbf90dd12853afca8050b68b3aaad144e Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* phosphor-ryslog-conf: add way to disable loggingDeepak Kodihalli2018-08-291-4/+22
| | | | | | | | Remote logging via rsyslog can be disabled by writing 0 to the port, or an empty string to the address. Change-Id: I50bce3ff008af1b9c488a09a2b36c01abbe5497d Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Add application to configure rsyslogDeepak Kodihalli2018-08-295-0/+187
The application implements the xyz.openbmc_project.Network.Client D-Bus interface to set a remote rsyslog server's address and port in the rsyslog config file. This lets us configure rsyslog to be able to stream out logs. TODO: Exception handling and validation will be handled in subsequent commits. Change-Id: I8917daab3f0de1806d2f1aafe99cb3a872f19184 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
OpenPOWER on IntegriCloud