You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some outputs generated by: /sbin/ip -o -0 addr | grep -v LOOPBACK | awk '{print $2}' | sed 's/://'
Script produces an error:
/opt/vagrant/embedded/gems/gems/vagrant-1.8.6/plugins/guests/linux/cap/network_interfaces.rb:29:in `sort': comparison of Array with Array failed (ArgumentError)
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/plugins/guests/linux/cap/network_interfaces.rb:29:in `network_interfaces'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/capability_host.rb:111:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/capability_host.rb:111:in `capability'
Here are example data sets, one which works (currently uncommented) and second one, which doesn't:
#ifaces = ["eth0", "eth1", "docker0", "veth437f7f9", "veth06b3e44", "veth8bb7081"]
ifaces = [ "eth0", "eth1", "docker0", "veth2cea1c9", "vethf058250", "veth1a8ff66" ]
ifaces = ifaces.map do |iface|
iface.scan(/(.+?)(\d+)/).flatten.map do |iface_part|
if iface_part.to_i.to_s == iface_part
iface_part.to_i
else
iface_part
end
end
end.sort.map(&:join)
The text was updated successfully, but these errors were encountered:
@TomaszUrugOlszewski Thanks for providing the failing example. Tests have been updated and implementation reworked to properly handle it within #7866. Cheers!
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
ghost
locked and limited conversation to collaborators
Apr 3, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello,
For some outputs generated by:
/sbin/ip -o -0 addr | grep -v LOOPBACK | awk '{print $2}' | sed 's/://'
Script produces an error:
Here are example data sets, one which works (currently uncommented) and second one, which doesn't:
The text was updated successfully, but these errors were encountered: