Martin Polednik has uploaded a new change for review.
Change subject: caps: add fake emulated machines ......................................................................
caps: add fake emulated machines
When running fakekvm, the libvirt capability XML doesn't contain emulated machine types of the opposite architecture. When adding such host to engine, it will be considered non-operational. The patch hardcodes the emulated machine types of both architectures and returns them, causing the engine to accept the host.
Change-Id: I707515225b9034adda1770870d9a6939ecca9e5d Signed-off-by: Martin Polednik mpolednik@redhat.com --- M vdsm/caps.py 1 file changed, 24 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/52/46852/1
diff --git a/vdsm/caps.py b/vdsm/caps.py index fed29f1..a3c1f16 100644 --- a/vdsm/caps.py +++ b/vdsm/caps.py @@ -381,6 +381,27 @@ return AutoNumaBalancingStatus.UNKNOWN
+def _get_fake_emulated_machines(): + ppc64le_machines = ['pseries', 'pseries-rhel7.2.0'] + x86_64_machines = ['pc-i440fx-rhel7.1.0', + 'rhel6.3.0', + 'pc-q35-rhel7.2.0', + 'pc-i440fx-rhel7.0.0', + 'rhel6.1.0', + 'rhel6.6.0', + 'rhel6.2.0', + 'pc', + 'pc-q35-rhel7.0.0', + 'pc-q35-rhel7.1.0', + 'q35', + 'pc-i440fx-rhel7.2.0', + 'rhel6.4.0', + 'rhel6.0.0', + 'rhel6.5.0'] + + return ppc64le_machines + x86_64_machines + + def _get_emulated_machines_from_node(node): # We have to make sure to inspect 'canonical' attribute where # libvirt puts the real machine name. Relevant bug: @@ -417,6 +438,9 @@
@utils.memoized def _getEmulatedMachines(arch, capabilities=None): + if config.getboolean('vars', 'fake_kvm_support'): + return _get_fake_emulated_machines() + if capabilities is None: capabilities = _getCapsXMLStr() caps = ET.fromstring(capabilities)
automation@ovirt.org has posted comments on this change.
Change subject: caps: add fake emulated machines ......................................................................
Patch Set 1:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
Francesco Romani has posted comments on this change.
Change subject: caps: add fake emulated machines ......................................................................
Patch Set 1: Code-Review+1
(2 comments)
I'd really like to go in the direction to make all fake_* stuff an hook, but probably not feasible right now. Partial ACK.
https://gerrit.ovirt.org/#/c/46852/1/vdsm/caps.py File vdsm/caps.py:
Line 381: return AutoNumaBalancingStatus.UNKNOWN Line 382: Line 383: Line 384: def _get_fake_emulated_machines(): Line 385: ppc64le_machines = ['pseries', 'pseries-rhel7.2.0'] minor: let's reformat this like
ppc64le_machines = [ 'pseries', 'pseries-rhel7.2.0' ] Line 386: x86_64_machines = ['pc-i440fx-rhel7.1.0', Line 387: 'rhel6.3.0', Line 388: 'pc-q35-rhel7.2.0', Line 389: 'pc-i440fx-rhel7.0.0',
Line 383: Line 384: def _get_fake_emulated_machines(): Line 385: ppc64le_machines = ['pseries', 'pseries-rhel7.2.0'] Line 386: x86_64_machines = ['pc-i440fx-rhel7.1.0', Line 387: 'rhel6.3.0', same as above Line 388: 'pc-q35-rhel7.2.0', Line 389: 'pc-i440fx-rhel7.0.0', Line 390: 'rhel6.1.0', Line 391: 'rhel6.6.0',
Martin Polednik has abandoned this change.
Change subject: caps: add fake emulated machines ......................................................................
Abandoned
abandoning for more robust and future-proof patch series
automation@ovirt.org has posted comments on this change.
Change subject: caps: add fake emulated machines ......................................................................
Patch Set 1:
* Update tracker::IGNORE, no Bug-Url found
vdsm-patches@lists.fedorahosted.org