Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix device filtering breaking for IPv6 interfaces #15

Merged
merged 1 commit into from
Mar 2, 2016

Conversation

vervas
Copy link
Contributor

@vervas vervas commented Mar 2, 2016

When running kitchen converge I get the following error:

$ cat .kitchen/logs/kitchen.log
I, [2016-03-02T14:18:47.025183 #12846]  INFO -- Kitchen: -----> Starting Kitchen (v1.4.2)
I, [2016-03-02T14:18:48.201225 #12846]  INFO -- Kitchen: -----> Converging <influxdb-ubuntu-1404>...
E, [2016-03-02T14:18:52.886025 #12846] ERROR -- Kitchen: ------Exception-------
E, [2016-03-02T14:18:52.886079 #12846] ERROR -- Kitchen: Class: Kitchen::ActionFailed
E, [2016-03-02T14:18:52.886113 #12846] ERROR -- Kitchen: Message: Failed to complete #converge action: [undefined method `[]' for nil:NilClass]
E, [2016-03-02T14:18:52.886157 #12846] ERROR -- Kitchen: ---Nested Exception---
E, [2016-03-02T14:18:52.886175 #12846] ERROR -- Kitchen: Class: NoMethodError
E, [2016-03-02T14:18:52.886210 #12846] ERROR -- Kitchen: Message: undefined method `[]' for nil:NilClass
E, [2016-03-02T14:18:52.886224 #12846] ERROR -- Kitchen: ------Backtrace-------
E, [2016-03-02T14:18:52.886235 #12846] ERROR -- Kitchen: /Users/vervas/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/kitchen-nodes-0.6.6/lib/kitchen/provisioner/finder/ssh.rb:87:in `block in run_ifconfig'

This happens when trying to match devices with IPv6 since IP4REGEX.match(device) returns nil.

Filtering out the devices not matching this regex solves the issue.

When trying to match devices with IPv6 this breaks when trying to access the first element since IP4REGEX does not match.
mwrock added a commit that referenced this pull request Mar 2, 2016
Fix device filtering breaking for IPv6 interfaces
@mwrock mwrock merged commit ce18ba9 into mwrock:master Mar 2, 2016
@mwrock
Copy link
Owner

mwrock commented Mar 2, 2016

Thanks!

@mwrock mwrock added the bug label Mar 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants