Add a logger to service_discovery.py because a "typical" logger
was not present and use the logger to capture the hopefully
rare condition that service spec was not present for a daemon.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
(cherry picked from commit
17668d5612f1cc1203a00edd5a8ec98c65241680)
logging.getLogger('cherrypy.error').addFilter(cherrypy_filter)
cherrypy.log.access_log.propagate = False
+logger = logging.getLogger(__name__)
class Route(NamedTuple):
try:
spec = cast(SMBSpec, self.mgr.spec_store[dd.service_name()].spec)
except KeyError:
- # TODO: logging
+ logger.warning("no spec found for %s", dd.service_name())
continue
# TODO: needs updating once ip control/colocation is present
addr = dd.ip if dd.ip else self.mgr.inventory.get_addr(dd.hostname)