Browse Source

Merge "Only log unexpected rndc errors"

changes/23/681723/1
Zuul 1 week ago
parent
commit
17c26a4758
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      designate/backend/impl_bind9.py

+ 2
- 1
designate/backend/impl_bind9.py View File

@@ -97,6 +97,7 @@ class Bind9Backend(base.Backend):
97 97
         except exceptions.Backend as e:
98 98
             # If create fails because the zone exists, don't reraise
99 99
             if "already exists" not in six.text_type(e):
100
+                LOG.warning('RNDC call failure: %s', e)
100 101
                 raise
101 102
 
102 103
         self.mdns_api.notify_zone_changed(
@@ -123,6 +124,7 @@ class Bind9Backend(base.Backend):
123 124
         except exceptions.Backend as e:
124 125
             # If zone is already deleted, don't reraise
125 126
             if "not found" not in six.text_type(e):
127
+                LOG.warning('RNDC call failure: %s', e)
126 128
                 raise
127 129
 
128 130
     def _execute_rndc(self, rndc_op):
@@ -138,5 +140,4 @@ class Bind9Backend(base.Backend):
138 140
             LOG.debug('Executing RNDC call: %r', rndc_call)
139 141
             utils.execute(*rndc_call)
140 142
         except utils.processutils.ProcessExecutionError as e:
141
-            LOG.info('RNDC call failure: %s', e)
142 143
             raise exceptions.Backend(e)

Loading…
Cancel
Save