gnt-cluster modify/init: deprecate --no-lvm-storage
authorHelga Velroyen <helgav@google.com>
Tue, 2 Apr 2013 11:16:46 +0000 (13:16 +0200)
committerHelga Velroyen <helgav@google.com>
Fri, 26 Apr 2013 13:34:58 +0000 (15:34 +0200)
commit912737ba13f35a062ce81c2de147aacd8ffb7ead
treef29dd7b454c4b818b6ce81a7707a3ea923cbfb49
parent59ef0f156139b571964cfadfcf3d1bf5c363dcac
gnt-cluster modify/init: deprecate --no-lvm-storage

This patch does three things:

1. It deprecates the option '--no-lvm-storage' of 'gnt-cluster modify'
and 'gnt-cluster init'. Technically, it is not fully removed, but kept in order
to warn the user that it is no longer supported and that she should use
--enabled-disk-templates instead.

2. The consistency check between '--no-lvm-storage' and '--vg-name' is replaced
by checks between '--enabled-disk-templates' and '--vg-name'. There are these
cases:
- vg name, lvm disk template enabled = ok
- no vg name, lvm disk template enabled = error
- vg name, no lvm enabled = warning
- no vg name, no lvm enabled = ok
I added quite a lot of tests for all these and the transitions from each case
to another to the QA.

3. The check whether or not the volume group is available on all nodes is now
done only in these cases:
- the volume group name gets set and lvm is already enabled
- lvm is getting enabled and the volume group was set before

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
lib/bootstrap.py
lib/client/gnt_cluster.py
lib/cmdlib.py
qa/qa_cluster.py