Change in vdsm[master]: vm: document disk stats collection on recovery

nsoffer at redhat.com nsoffer at redhat.com
Fri Sep 5 16:05:25 UTC 2014


Nir Soffer has posted comments on this change.

Change subject: vm: document disk stats collection on recovery
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.ovirt.org/#/c/32406/2/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 2914:             # notification of that event yet.
Line 2915:             # Thus, in the clientIF:_recoverExistingVms() there is an explicit
Line 2916:             # last step, on which irs state is polled; when it is ready,
Line 2917:             # it invokes preparePaths for each recovered VM, completing
Line 2918:             # the recovery and starting disk stats collection.
> Looks good, need to check the flow to be sure that this is correct.
Generally this is correct, but in _recoverExistingVms() irs.ready is *not* checked, instead the code call irs method that can return non-empty result only after irs is ready.

But I don't think we should get into these details, because it is too fragile to document a code in clientIF.py n vm.py.

So lets shorten this to something like:

 # Note that we do not start disk stat collection here since in the recovery 
 # flow irs may not be ready yet. Disk stats collection is started from on 
 # the end of the recovery process.

Now I think we have a leak of storage domain ids in the self.sdIds list in the recovery flow:

- We add the domain id once here
- And again in perparePath called on the end of the recovery thread
- We remove domain id only once

So after recovering N disks from some domain, we will have  2*N items with the domain id in self.sdIds.

I'm not sure this cause any harm. I guess the solution would be to change the list to a counting dictionary, or remove self.sdIds and check for domain ids by iterating devices. This value is used only when unpausing a vm after a domain become valid. The code in clientIF unpaused only vms which has the domain id in vm.sdIds.
Line 2919: 
Line 2920:         for devType, devClass in self.DeviceMapping:
Line 2921:             for dev in devices[devType]:
Line 2922:                 self._devices[devType].append(devClass(self.conf, self.log,


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibd7d32373f5a0a7dd4ef88c5a0ad5a9f3d52938c
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list