From bf8fb1850e870d162feebe3803b4009bd97af242 Mon Sep 17 00:00:00 2001 From: "kirby@puppetlabs.com" Date: Thu, 1 Dec 2016 09:58:29 -0800 Subject: [PATCH] (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. --- lib/vmpooler/pool_manager.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/vmpooler/pool_manager.rb b/lib/vmpooler/pool_manager.rb index bed2289..9ea67a2 100644 --- a/lib/vmpooler/pool_manager.rb +++ b/lib/vmpooler/pool_manager.rb @@ -705,6 +705,8 @@ module Vmpooler # Clear out the tasks manager, as we don't know about any tasks at this point $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 if ! $threads['disk_manager']