Change in vdsm[master]: BZ#770834 - Handle correctly nic names like p33p1

juan.hernandez at redhat.com juan.hernandez at redhat.com
Wed Jan 4 12:33:28 UTC 2012


Juan Hernandez has posted comments on this change.

Change subject: BZ#770834 - Handle correctly nic names like p33p1
......................................................................


Patch Set 3: (1 inline comment)

....................................................
File vdsm/configNetwork.py
Line 157:     return sorted(nics, key=splitNicForSorting)
That is an error in the sed script, i guess, it is not sorting correctly according to the second number. It is like sorting "eth0" and "eth1" as [ 'eth1', 'eth0' ]. Try the sed script with "p33p10", "p33p2" and "p33p20":

 echo -e "ifcfg-p33p2\nifcfg-p33p10\nifcfg-p33p20" | sed -e '/ifcfg-[A-Za-z0-9#\._-]\+$/ { s/^ifcfg-//g;s/[0-9]/ &/}' | sort -k 1,1 -k 2n
p 33p10
p 33p2
p 33p20

It is not sorting correctly.

--
To view, visit http://gerrit.ovirt.org/799
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I716f5d7d137325abaa0022a40f482c9ad270855a
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>


More information about the vdsm-patches mailing list