Dan Kenigsberg has posted comments on this change.

Change subject: network: persist sriov devices number of vfs
......................................................................


Patch Set 26: Code-Review-1

(2 comments)

https://gerrit.ovirt.org/#/c/40088/26/vdsm/vdsm-restore-net-config
File vdsm/vdsm-restore-net-config:

Line 53: 
Line 54: 
Line 55: def _get_persisted_numvfs(existing_sriov_devices):
Line 56:     numvfs_by_device = {}
Line 57:     for file_name in os.listdir(_VIRTUAL_FUNCTIONS_PATH):
but there *is* a case where _VIRTUAL_FUNCTIONS_PATH is missing (e.g. after 
upgrade).

I believe you should check for its existence first and return the empty dir. 
the former code was right - it simlply did not need to create the directory.

if not os.path.exists(_VIRTUAL_FUNCTIONS_PATH):
   return numvfs_by_device
Line 58:         if file_name not in existing_sriov_devices:
Line 59:             logging.error('Phisycal device in %s no longer exists. 
Skipping '
Line 60:                           'numvfs restoration.', file_name)
Line 61:         else:


Line 59: Phisycal
spelling: Physical


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I76b898019840ffe65939ffad4a1e98829ad3c887
Gerrit-PatchSet: 26
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan <ibar...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Francesco Romani <from...@redhat.com>
Gerrit-Reviewer: Ido Barkan <ibar...@redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik <mpoled...@redhat.com>
Gerrit-Reviewer: Ondřej Svoboda <osvob...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to