Hi. I've got a question about allocation method in gf paas spi: At the end of
create method in LibvirtLocalMachine or VBoxLocalMachine there's a snippet of
code like this: try { // Domain domain =
connection().domainDefineXML(getConfig(vmConfig));
source.fireEvent(AllocationPhase.VM_SPAWN); final CountDownLatch latch =
vmLifecycle.inStartup(name); VirtualMachineConfig vmConfig =
VirtualMachineConfig.Utils.create( name, template.getConfig(),
serverPool.getConfig(), cluster.getConfig()); final VBoxVirtualMachine vm =
new VBoxVirtualMachine( vmConfig, template.getConfig().getUser(), this,
name); domains.put(name, vm); cluster.add(vm); ListenableFutureImpl future =
new ListenableFutureImpl(latch, vm, source);
future.fireEvent(AllocationPhase.VM_START); vmLifecycle.start(vm); return
future; } catch (Exception e) { throw new VirtException(e); } My question is:
what CountDownLatch are for? How to take them down? During deploy application
every two minutes There appears a message in log: "IMS in the process of
allocating 1 virtual machines, cache refresh delayed" when I have added this
vmLifecycle.getStartupLatch(zoneName); before return future; the deploy still
isn't ending and only message changed to: "IMS cache refresh started" Can
someone put some light on this? Why deploy isn't ending? What those latches
are for? How do they work? How shall I handle them?
--
[Message sent by forum member 'piotr.tempes']
View Post: http://forums.java.net/node/884775