Change in vdsm[master]: netinfo: dns: more robust parsing of resolv.conf

danken at redhat.com danken at redhat.com
Mon Mar 14 13:57:42 UTC 2016


Dan Kenigsberg has submitted this change and it was merged.

Change subject: netinfo: dns: more robust parsing of resolv.conf
......................................................................


netinfo: dns: more robust parsing of resolv.conf

The current code which parses /etc/resolv.conf is not
very robust. This code should handle manual edit
of such file (discouraged, but possible).

In particular, it should skip silently empty lines;
current code breaks in this case.

I noticed this issue randomly while running Vdsm
on some host of mine, where I routinely edit
/etc/resolv.conf (et. al.)

Change-Id: Iff7cafb643c9191d9a2f6abbcfec0407e6860e07
Signed-off-by: Francesco Romani <fromani at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/54558
Continuous-Integration: Jenkins CI
Reviewed-by: Edward Haas <edwardh at redhat.com>
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
---
M lib/vdsm/netinfo/dns.py
M tests/network/netinfo_test.py
2 files changed, 8 insertions(+), 5 deletions(-)

Approvals:
  Jenkins CI: Passed CI tests
  Dan Kenigsberg: Looks good to me, approved
  Francesco Romani: Verified
  Edward Haas: Looks good to me, but someone else must approve



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iff7cafb643c9191d9a2f6abbcfec0407e6860e07
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>


More information about the vdsm-patches mailing list