Comment 2 for bug 1857068

Revision history for this message
Gerry Kopec (gerry-kopec) wrote : Re: Distributed cloud - dcorch showing error logs for ntp and ptp

Looking at the code some problem areas are:
dcorch/drivers/openstack/sysinv_v1.py:
- get_ptp() -- ptp.enabled no longer exists
        LOG.debug("get_ptp uuid=%s enabled=%s mode=%s "
                  "transport=%s mechanism=%s" %
                  (ptp.uuid, ptp.enabled, ptp.mode,
                   ptp.transport, ptp.mechanism))
- get_ntp() -- intp.enabled no longer exists
        LOG.debug("get_ntp uuid=%s enabled=%s ntpservers=%s" %
                  (intp.uuid, intp.enabled, intp.ntpservers))

It appears the above exceptions are handled and the "error enabled" logs are generated but ptp/ntp is now set to None and that then triggers other problems.

dcorch/engine/sync_services/sysinv.py:
- get_resource_id() - NO uuid log expects 2 parms but is only give one and throws exception
                LOG.info("get_resource_id {} NO uuid resource_type={}".format(
                    resource_type))

- get_resource_info() - resource=None is not handled, resource._info will throw exception
        if resource_type in payload_resources:
            if 'payload' not in resource._info:
                dumps = jsonutils.dumps({"payload": resource._info})
            else:
                dumps = jsonutils.dumps(resource._info)
            LOG.info("get_resource_info resource_type={} dumps={}".format(
                resource_type, dumps),
                extra=self.log_extra)
            return dumps