Change in vdsm[master]: cpu mode support for vdsm

wudxw at linux.vnet.ibm.com wudxw at linux.vnet.ibm.com
Thu Dec 6 02:31:10 UTC 2012


Mark Wu has posted comments on this change.

Change subject: cpu mode support for vdsm
......................................................................


Patch Set 3: I would prefer that you didn't submit this

(3 inline comments)

....................................................
File vdsm/libvirtvm.py
Line 719: 
Line 720:         features = self.conf.get('cpuType', 'qemu64').split(',')
Line 721:         model = features[0]
Line 722:         cpu = self.doc.createElement('cpu')
Line 723:         cpu.setAttribute('match', 'exact')
Actually,  that's ok.  In the mode of 'host-model' and 'host-passthrough', the 'match' attribute will be ignored. But I don't like to rely on it. According to libvirt doc, since 0.8.5 the match attribute can be omitted and will default to exact.  So I think it should be safe to remove the 'match' attribute. 

Plus,  I also have a concern about the live migration, especially for the host-passthrough mode.  I am not sure if engine requires the hosts in a cluster have totally the same cpu model.
Line 724: 
Line 725:         #and now for something completely different
Line 726:         if model == 'hostPassthrough':
Line 727:             cpu.setAttribute('mode', 'host-passthrough')


Line 721:         model = features[0]
Line 722:         cpu = self.doc.createElement('cpu')
Line 723:         cpu.setAttribute('match', 'exact')
Line 724: 
Line 725:         #and now for something completely different
Could you please explain what does this comment mean?  and why do you need it?
Line 726:         if model == 'hostPassthrough':
Line 727:             cpu.setAttribute('mode', 'host-passthrough')
Line 728:         elif model == 'hostModel':
Line 729:             cpu.setAttribute('mode', 'host-model')


Line 725:         #and now for something completely different
Line 726:         if model == 'hostPassthrough':
Line 727:             cpu.setAttribute('mode', 'host-passthrough')
Line 728:         elif model == 'hostModel':
Line 729:             cpu.setAttribute('mode', 'host-model')
Probably, you also need validate the variable 'features'.  If user specify cpu mode and also some features,  libvirt will fail to start vm with error of 'Non-empty feature list specified without CPU model'
Line 730:         else:
Line 731:             m = self.doc.createElement('model')
Line 732:             m.appendChild(self.doc.createTextNode(model))
Line 733:             cpu.appendChild(m)


--
To view, visit http://gerrit.ovirt.org/9507
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I54fb440ef52255f0a7933b000b9b599c2d056021
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Laszlo Hornyak <lhornyak at redhat.com>
Gerrit-Reviewer: Adam Litke <agl at us.ibm.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfediuck at redhat.com>
Gerrit-Reviewer: Laszlo Hornyak <lhornyak at redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Royce Lv <lvroyce at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list