mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
Merge pull request #469 from puppetlabs/tag_vm_user
(maint) Adding a provider method tag_vm_user
This commit is contained in:
commit
7872bfe8fc
3 changed files with 41 additions and 0 deletions
|
|
@ -294,6 +294,12 @@ module Vmpooler
|
|||
move_vm_queue(pool, vm, 'running', 'completed', redis, 'is listed as running, but has no checkouttime data. Removing from running')
|
||||
end
|
||||
|
||||
# tag VM if not tagged yet, this ensures the method is only called once
|
||||
unless redis.hget("vmpooler__vm__#{vm}", 'user_tagged')
|
||||
success = provider.tag_vm_user(pool, vm)
|
||||
redis.hset("vmpooler__vm__#{vm}", 'user_tagged', 'true') if success
|
||||
end
|
||||
|
||||
throw :stop_checking if provider.vm_ready?(pool, vm)
|
||||
|
||||
throw :stop_checking if provider.get_vm(pool, vm)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue