Merge "Improve LOG messaging" into stable/train

This commit is contained in:
Zuul 2019-10-28 13:23:00 +00:00 committed by Gerrit Code Review
commit 0aed1a2294
2 changed files with 5 additions and 5 deletions

View File

@ -55,8 +55,8 @@ def _get_net_crd(namespace):
annotations = ns['metadata']['annotations']
net_crd_name = annotations[constants.K8S_ANNOTATION_NET_CRD]
except KeyError:
LOG.exception("Namespace missing CRD annotations for selecting "
"the corresponding security group.")
LOG.debug("Namespace missing CRD annotations for selecting the "
"corresponding security group. Action will be retried.")
raise exceptions.ResourceNotReady(namespace)
try:
net_crd = kubernetes.get('%s/kuryrnets/%s' % (constants.K8S_API_CRD,

View File

@ -67,15 +67,15 @@ class NamespacePodSubnetDriver(default_subnet.DefaultPodSubnetDriver):
annotations = ns['metadata']['annotations']
net_crd_name = annotations[constants.K8S_ANNOTATION_NET_CRD]
except KeyError:
LOG.warning("Namespace missing CRD annotations for selecting the "
"corresponding subnet.")
LOG.debug("Namespace missing CRD annotations for selecting "
"the corresponding subnet.")
raise exceptions.ResourceNotReady(namespace)
try:
net_crd = kubernetes.get('%s/kuryrnets/%s' % (
constants.K8S_API_CRD, net_crd_name))
except exceptions.K8sResourceNotFound:
LOG.warning("Kuryrnet resource not yet created, retrying...")
LOG.debug("Kuryrnet resource not yet created, retrying...")
raise exceptions.ResourceNotReady(net_crd_name)
except exceptions.K8sClientException:
LOG.exception("Kubernetes Client Exception.")