Skip to content

Commit

Permalink
[hostcfgd]: Promote logs for update-notifications-from-DB from DEBUG …
Browse files Browse the repository at this point in the history
…to INFO (sonic-net#2576)

* Add a log message for each notification of add/del TACACS server.

Signed-off-by: Renuka Manavalan <remanava@microsoft.com>

* Moved another syslog message from DEBUG to INFO to be able to see those notifications.

All these changes are to help with a one-time-seen-bug, that hostcfgd did not act upon changes to redis for TACACS servers. We could not repro the bug.

Signed-off-by: Renuka Manavalan <remanava@microsoft.com>
  • Loading branch information
renukamanavalan authored and tiantianlv committed Apr 10, 2019
1 parent adbf6ab commit 8d53e98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions files/image_config/hostcfgd/hostcfgd
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,14 @@ class HostConfigDaemon:
log_data = copy.deepcopy(data)
if log_data.has_key('passkey'):
log_data['passkey'] = obfuscate(log_data['passkey'])
syslog.syslog(syslog.LOG_DEBUG, 'value of {} changed to {}'.format(key, log_data))
syslog.syslog(syslog.LOG_INFO, 'value of {} changed to {}'.format(key, log_data))

def tacacs_global_handler(self, key, data):
self.aaacfg.tacacs_global_update(key, data)
log_data = copy.deepcopy(data)
if log_data.has_key('passkey'):
log_data['passkey'] = obfuscate(log_data['passkey'])
syslog.syslog(syslog.LOG_DEBUG, 'value of {} changed to {}'.format(key, log_data))
syslog.syslog(syslog.LOG_INFO, 'value of {} changed to {}'.format(key, log_data))

def start(self):
self.config_db.subscribe('AAA', lambda table, key, data: self.aaa_handler(key, data))
Expand Down

0 comments on commit 8d53e98

Please sign in to comment.