vzctl set --save: do not save config if failed to apply parameters

It does not make sense to save parameters if we failed to apply them.
For example, this behavior is plain wrong:

	# vzctl set 301 --diskspace 0.5G --save
	....
	Error in ploop_resize_image (ploop.c:1502): Unable to change image size
	to 1048576 sectors, minimal size is 1517480
	Umounting fs at /vz/private/301/root.hdd/root.hdd.mnt
	Unmounting device /dev/ploop1
	Failed to resize image: Error in ploop_resize_image (ploop.c:1502):
	Unable to change image size to 1048576 sectors, minimal size is 1517480 [-1]
	CT configuration saved to /etc/vz/conf/301.conf

This should also fix e.g. bug #2032:
http://bugzilla.openvz.org/2032

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
1 file changed