Lock group(s) when creating instances
Lock group(s) when creating instances

This is required to prevent race conditions such as removing a network
from a group and adding an instance at the same time. (See issue 621#2.)

Signed-off-by: Petr Pudlak <9d19625f8ee825a2c398462ed335cbcf98f79c32@google.com>
Reviewed-by: Thomas Thrainer <98bdeac947eb8ca18146e9ce7f092788ec242cd1@google.com>
Reviewed-by: Michele Tartara <05f7077a2c6cbbdc4af4ba42e3ef89a0df846179@google.com>

mbakke/ganeti,onponomarev/ganeti,andir/ganeti,yiannist/ganeti,ganeti/ganeti,apyrgio/snf-ganeti,leshchevds/ganeti,apyrgio/snf-ganeti,ganeti/ganeti,leshchevds/ganeti,andir/ganeti,dimara/ganeti,apyrgio/ganeti,grnet/snf-ganeti,onponomarev/ganeti,dimara/ganeti,bitemyapp/ganeti,ganeti/ganeti,leshchevds/ganeti,andir/ganeti,mbakke/ganeti,yiannist/ganeti,apyrgio/ganeti,yiannist/ganeti,bitemyapp/ganeti,grnet/snf-ganeti,ganeti-github-testing/ganeti-test-1,mbakke/ganeti,ganeti-github-testing/ganeti-test-1