mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
(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:
parent
2d6e5b3a8f
commit
bf8fb1850e
1 changed files with 2 additions and 0 deletions
|
|
@ -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']
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue