Revision 557838c1 daemons/import-export

b/daemons/import-export
43 43
from ganeti import errors
44 44
from ganeti import serializer
45 45
from ganeti import objects
46
from ganeti import locking
47 46
from ganeti import impexpd
48 47
from ganeti import netutils
49 48

  
......
256 255
      poller.register(fd, select.POLLIN)
257 256

  
258 257
    if options.connect_timeout and mode == constants.IEM_IMPORT:
259
      listen_timeout = locking.RunningTimeout(options.connect_timeout, True)
258
      listen_timeout = utils.RunningTimeout(options.connect_timeout, True)
260 259
    else:
261 260
      listen_timeout = None
262 261

  
......
277 276
          logging.info("Child process didn't establish connection in time")
278 277
          child.Kill(signal.SIGTERM)
279 278
          exit_timeout = \
280
            locking.RunningTimeout(CHILD_LINGER_TIMEOUT, True)
279
            utils.RunningTimeout(CHILD_LINGER_TIMEOUT, True)
281 280
          # Next block will calculate timeout
282 281
        else:
283 282
          # Not yet connected, check again in a second
......
293 292
        notify_status = child_io_proc.NotifyDd()
294 293
        if notify_status:
295 294
          # Schedule next notification
296
          dd_stats_timeout = locking.RunningTimeout(DD_STATISTICS_INTERVAL,
297
                                                    True)
295
          dd_stats_timeout = utils.RunningTimeout(DD_STATISTICS_INTERVAL, True)
298 296
        else:
299 297
          # Try again soon (dd isn't ready yet)
300
          dd_stats_timeout = locking.RunningTimeout(1.0, True)
298
          dd_stats_timeout = utils.RunningTimeout(1.0, True)
301 299

  
302 300
      if dd_stats_timeout:
303 301
        dd_timeout = max(0, dd_stats_timeout.Remaining() * 1000)
......
327 325
                  logging.info("Giving child process %0.2f seconds to exit",
328 326
                               CHILD_LINGER_TIMEOUT)
329 327
                  exit_timeout = \
330
                    locking.RunningTimeout(CHILD_LINGER_TIMEOUT, True)
328
                    utils.RunningTimeout(CHILD_LINGER_TIMEOUT, True)
331 329
          else:
332 330
            poller.unregister(fd)
333 331
            del fdmap[fd]

Also available in: Unified diff