Revision 07b8a2b5 daemons/ganeti-confd
b/daemons/ganeti-confd | ||
---|---|---|
67 | 67 |
self.port = port |
68 | 68 |
self.processor = processor |
69 | 69 |
self.bind((bind_address, port)) |
70 |
logging.debug("listening on ('%s':%d)" % (bind_address, port))
|
|
70 |
logging.debug("listening on ('%s':%d)", bind_address, port)
|
|
71 | 71 |
|
72 | 72 |
# this method is overriding a daemon.AsyncUDPSocket method |
73 | 73 |
def handle_datagram(self, payload_in, ip, port): |
... | ... | |
134 | 134 |
# IN_IGNORED event from inotify, because of the file removal (which is |
135 | 135 |
# contextual with the replacement). In such a case we need to create |
136 | 136 |
# another watcher for the "new" file. |
137 |
logging.debug("Received 'ignored' inotify event for %s" % event.path)
|
|
137 |
logging.debug("Received 'ignored' inotify event for %s", event.path)
|
|
138 | 138 |
self.watch_handle = None |
139 | 139 |
|
140 | 140 |
try: |
... | ... | |
144 | 144 |
# going to realod the file after setting up the new watch. |
145 | 145 |
self.callback(False) |
146 | 146 |
except errors.ConfdFatalError, err: |
147 |
logging.critical("Critical error, shutting down: %s" % err)
|
|
147 |
logging.critical("Critical error, shutting down: %s", err)
|
|
148 | 148 |
sys.exit(constants.EXIT_FAILURE) |
149 | 149 |
except: |
150 | 150 |
# we need to catch any exception here, log it, but proceed, because even |
... | ... | |
157 | 157 |
# usually happen in Ganeti, as the config file is normally replaced by a |
158 | 158 |
# new one, at filesystem level, rather than actually modified (see |
159 | 159 |
# utils.WriteFile) |
160 |
logging.debug("Received 'modify' inotify event for %s" % event.path)
|
|
160 |
logging.debug("Received 'modify' inotify event for %s", event.path)
|
|
161 | 161 |
|
162 | 162 |
try: |
163 | 163 |
self.callback(True) |
164 | 164 |
except errors.ConfdFatalError, err: |
165 |
logging.critical("Critical error, shutting down: %s" % err)
|
|
165 |
logging.critical("Critical error, shutting down: %s", err)
|
|
166 | 166 |
sys.exit(constants.EXIT_FAILURE) |
167 | 167 |
except: |
168 | 168 |
# we need to catch any exception here, log it, but proceed, because even |
... | ... | |
171 | 171 |
logging.error("Unexpected exception", exc_info=True) |
172 | 172 |
|
173 | 173 |
def process_default(self, event): |
174 |
logging.error("Received unhandled inotify event: %s" % event)
|
|
174 |
logging.error("Received unhandled inotify event: %s", event)
|
|
175 | 175 |
|
176 | 176 |
|
177 | 177 |
class ConfdConfigurationReloader(object): |
Also available in: Unified diff