olopez32 / ganeti

Automatically exported from code.google.com/p/ganeti
0 stars 0 forks source link

iallocator does not take into account availability of alternate volume groups #809

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
[debian wheezy, ganeti 2.10.2 from backports]

When you create an instance, you can specify --disk ...,vg=FOO
where FOO is a volume group different to the one specified in gnt-cluster init. 
Use case: having multiple classes of storage (e.g. HD and SSD) and being able 
to select for plain/drbd images which one to use.

However there are some problems:

* "gnt-node list" shows only free/used space in the main VG and ignores the 
other VGs
* the instance allocator does not take into account the presence or absence of 
these VGs on nodes. It may decide to place an instance primary or secondary on 
a node where this VG does not exist, which then fails.
* by implication, it does not take into account the free space in these other 
VGs either (because if it did, it would fail when trying to get free space, 
before the node choice was made)

Details of how to reproduce are at
https://groups.google.com/d/msg/ganeti/SuGHATjF8pU/4HRfbMO5UzEJ

Expected behaviour:

* gnt-instance add ... -t drbd --disk 0:size=4G,vg=FOO --disk 1:size=8G,vg=BAR 
... would:

(a) place primary and secondary only on nodes where volume groups FOO and BAR 
exist
(b) only place them on nodes where FOO has at least 4G free space and BAR has 
at least 8G free space

[ditto for hbal]

* gnt-node list DTotal DFree columns should perhaps show sum of all volume 
groups? Or else should be documented that it shows only the main volume group?

Original issue reported on code.google.com by bcandler...@googlemail.com on 21 Apr 2014 at 9:01

GoogleCodeExporter commented 9 years ago
This hits several shortcomings of the iallocator protocol and how storage was 
originally designed in Ganeti. We'll accept this bug, but as these things are 
not trivial to fix, we will most probably not be able to fix it in 2.10. Also, 
some of these things might interfere with current major refactorings in the 
storage layer, thus we have to look out for conflicts here.

Necessary changes would be:
- extend the iallocator protocol to be able to consider more than one storage 
unit, and in particular more than one storage unit for the same storage type
- relax Ganeti's assumption that all storage units are available on all nodes 
(adjust 'gnt-cluster verify' accordingly as well)
- make the output of 'gnt-node list' more intuitive and better documentated wrt 
to DTotal and DFree.

Original comment by hel...@google.com on 22 Apr 2014 at 11:15

GoogleCodeExporter commented 9 years ago
Issue 798 has been merged into this issue.

Original comment by hel...@google.com on 22 Apr 2014 at 1:33

GoogleCodeExporter commented 9 years ago
Issue 798 was about SSL certificates, was that a correct merge?

Original comment by bcandler...@googlemail.com on 24 Apr 2014 at 7:44

GoogleCodeExporter commented 9 years ago
Right! Thanks for pointing it out.

Original comment by hel...@google.com on 24 Apr 2014 at 7:53

GoogleCodeExporter commented 9 years ago
Extension of the IAllocator protocol is not feasible for 2.12. Unfortunately,
we have to postpone.

Original comment by aeh...@google.com on 3 Jun 2014 at 2:25