Fix locking in networks
authorDimitris Aragiorgis <dimara@grnet.gr>
Fri, 30 Nov 2012 15:45:04 +0000 (17:45 +0200)
committerMichael Hanselmann <hansmi@google.com>
Mon, 3 Dec 2012 11:04:59 +0000 (12:04 +0100)
commit213076fe1a198fcbd5ad3953cd8321b8789d20db
tree506f3c6bba2487d4daac14aa9191d2f466cd25d1
parent9de303af97c2b45630b4be461475d29e671abaca
Fix locking in networks

Ensure that locks are held only if needed.

Add conflicts_check in OpNetworkAdd. This is needed if we want to
check whether nodes/master IPs are included in network.

Depending on conflicts_check value, we have to hold node/instance locks
during OpNetworkAdd/OpNetworkConnect or not.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
lib/client/gnt_network.py
lib/cmdlib.py
lib/opcodes.py