(POOLER-48) Clear migrations at application start time

This commit updates vmpooler to clear the migrations queue at application start time. When the application is shut down it is not considerate of any activities, like migrations, in flight. The result is that when the application is started again any stale entries in vmpooler__migration will be left until manually removed, which can prevent migrations from occurring.
This commit is contained in:
kirby@puppetlabs.com 2016-12-01 09:58:29 -08:00
parent 2d6e5b3a8f
commit bf8fb1850e

View file

@ -705,6 +705,8 @@ module Vmpooler
# Clear out the tasks manager, as we don't know about any tasks at this point # Clear out the tasks manager, as we don't know about any tasks at this point
$redis.set('vmpooler__tasks__clone', 0) $redis.set('vmpooler__tasks__clone', 0)
# Clear out vmpooler__migrations since stale entries may be left after a restart
$redis.del('vmpooler__migration')
loop do loop do
if ! $threads['disk_manager'] if ! $threads['disk_manager']