Hello Ido Barkan, Dan Kenigsberg,
I'd like you to do a code review. Please visit
https://gerrit.ovirt.org/46280
to review the following change.
Change subject: ifcfg: only deal gracefully with ENOENT in removeNic
......................................................................
ifcfg: only deal gracefully with ENOENT in removeNic
Any other IO errors are unexpected and so they should not go
unnoticed.
Change-Id: Ice4d6b248e8ff43fc8b9deeef07484111a3a3ebd
Bug-Url: https://bugzilla.redhat.com/1256252
Signed-off-by: Ondřej Svoboda <[email protected]>
Reviewed-on: https://gerrit.ovirt.org/46197
Continuous-Integration: Jenkins CI
Reviewed-by: Ido Barkan <[email protected]>
Reviewed-by: Dan Kenigsberg <[email protected]>
---
M vdsm/network/configurators/ifcfg.py
1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/80/46280/1
diff --git a/vdsm/network/configurators/ifcfg.py
b/vdsm/network/configurators/ifcfg.py
index a92e059..ce9a4f3 100644
--- a/vdsm/network/configurators/ifcfg.py
+++ b/vdsm/network/configurators/ifcfg.py
@@ -650,7 +650,10 @@
hwlines = [line for line in nicFile if line.startswith(
'HWADDR=')]
except IOError as e:
- logging.warning("%s couldn't be read (errno %s)", cf, e.errno)
+ if e.errno != errno.ENOENT:
+ logging.error("%s couldn't be read (errno %s)", cf, e.errno)
+ raise
+ logging.warning("%s doesn't exist, reading HWADDR from system", cf)
try:
hwlines = ['HWADDR=%s\n' % netinfo.gethwaddr(nic)]
except IOError as e:
--
To view, visit https://gerrit.ovirt.org/46280
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ice4d6b248e8ff43fc8b9deeef07484111a3a3ebd
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Ondřej Svoboda <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Ido Barkan <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches