Check memory size before setting it
authorGuido Trotter <ultrotter@google.com>
Mon, 1 Sep 2008 11:37:21 +0000 (11:37 +0000)
committerGuido Trotter <ultrotter@google.com>
Mon, 1 Sep 2008 11:37:21 +0000 (11:37 +0000)
commitcfefe007f184d4e54403347d811b683eba3aa9b0
treeb46732c3ed5b75cc4532273ab33dfa793bd26b24
parent4300c4b6104a883b0a3f4bc86c13ee3819880934
Check memory size before setting it

With this change when a user asks for a new memory size for an instance,
the number is checked instead of just applied. The operation fails only
if the instance would not be able to restart on its primary node, but
generates warnings should it be impossible to failover the instance or
should the computation be impossible due to nodes being unreachable.

This is a forward-port from branches/ganeti-1.2

Original-Reviewed-by: iustinp
Reviewed-by: iustinp
lib/cmdlib.py