Francesco Romani has posted comments on this change.

Change subject: vm: Remove empty RNG devices left after 3.5->3.6 upgrade
......................................................................


Patch Set 1:

(2 comments)

https://gerrit.ovirt.org/#/c/48621/1//COMMIT_MSG
Commit Message:

Line 11: rebooted. These devices do not contain 'source' spec param so they
Line 12: cause exceptions on newer VDSM versions that expect 'source' to be
Line 13: present.
Line 14: 
Line 15: Change-Id: I2580dcb335970a4bb5c4c87fe6ea9fcd8e494df5
we'll need a bug-url to backport to 3.6


https://gerrit.ovirt.org/#/c/48621/1/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 4980:     def _fixLegacyRngConf(self):
Line 4981:         with self._confLock:
Line 4982:             self._devices[hwclass.RNG] = [dev for dev in 
self._devices[hwclass.RNG]
Line 4983:                                             if 'source' in 
dev.specParams]
Line 4984:             self.conf['devices'] = [dev for dev in 
self.conf['devices']
let's add an helper function like

  def _is_legacy_rng_conf(dev):
    '''
   returns True if legacy (3.5) RNG device conf, False otherwise.
    '''
    ...

So we can make this more readable
Line 4985:                                         if not (dev['type'] == 
hwclass.RNG and
Line 4986:                                                 ('specParams' not in 
dev or
Line 4987:                                                  'source' not in 
dev['specParams']))]
Line 4988: 


-- 
To view, visit https://gerrit.ovirt.org/48621
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2580dcb335970a4bb5c4c87fe6ea9fcd8e494df5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shmuel Leib Melamud <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Shmuel Leib Melamud <[email protected]>
Gerrit-Reviewer: gerrit-hooks <[email protected]>
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to