Revision 5bb0a1cb lib/backend.py
b/lib/backend.py | ||
---|---|---|
66 | 66 |
from ganeti import vcluster |
67 | 67 |
from ganeti import ht |
68 | 68 |
from ganeti.block.base import BlockDev |
69 |
from ganeti.block.drbd_info import DRBD8Info |
|
69 | 70 |
from ganeti import hooksmaster |
70 | 71 |
|
71 | 72 |
|
... | ... | |
830 | 831 |
hyper = hypervisor.GetHypervisor(what[constants.NV_HVINFO]) |
831 | 832 |
result[constants.NV_HVINFO] = hyper.GetNodeInfo() |
832 | 833 |
|
834 |
if constants.NV_DRBDVERSION in what and vm_capable: |
|
835 |
try: |
|
836 |
drbd_version = DRBD8Info.CreateFromFile().GetVersionString() |
|
837 |
except errors.BlockDeviceError, err: |
|
838 |
logging.warning("Can't get DRBD version", exc_info=True) |
|
839 |
drbd_version = str(err) |
|
840 |
result[constants.NV_DRBDVERSION] = drbd_version |
|
841 |
|
|
833 | 842 |
if constants.NV_DRBDLIST in what and vm_capable: |
834 | 843 |
try: |
835 | 844 |
used_minors = drbd.DRBD8.GetUsedDevs() |
Also available in: Unified diff