Dan Kenigsberg has posted comments on this change.

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


Patch Set 25:

(3 comments)

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

Line 55: def _get_persisted_numvfs(existing_sriov_devices):
Line 56:     numvfs_by_device = {}
Line 57: 
Line 58:     if not os.path.exists(_VIRTUAL_FUNCTIONS_PATH):
Line 59:         os.makedirs(_VIRTUAL_FUNCTIONS_PATH)
I don't see why creating the path on the makefile (and including it in the rpm) 
is yuckie.

But if it is ruled out, how about creating the directory when attempting to 
persist to it?
Line 60:         return numvfs_by_device
Line 61: 
Line 62:     for file_name in os.listdir(_VIRTUAL_FUNCTIONS_PATH):
Line 63:         if file_name not in existing_sriov_devices:


Line 60:         return numvfs_by_device
Line 61: 
Line 62:     for file_name in os.listdir(_VIRTUAL_FUNCTIONS_PATH):
Line 63:         if file_name not in existing_sriov_devices:
Line 64:             logging.error('Phisycal device in %s no longer exists. 
Skipping '
actually, the former spelling (Physical) is the correct one.
Line 65:                           'numvfs restoration.', file_name)
Line 66:         else:
Line 67:             with open(os.path.join(
Line 68:                     _VIRTUAL_FUNCTIONS_PATH, file_name)) as f:


Line 77: 
Line 78:     for device in sriov_devices:
Line 79:         desired_numvfs = persisted_numvfs.get(device)
Line 80:         if desired_numvfs is None:
Line 81:             logging.info('SRIOV network device which is not persisted 
found '
ok, let's be paranoid
Line 82:                          'at: %s.', device)
Line 83:         else:
Line 84:             logging.info('Changing number of virtual functions for 
device %s '
Line 85:                          '-> %s', device, desired_numvfs)


-- 
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: 25
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