You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Alex Heneveld <no...@github.com> on 2016/03/08 11:01:41 UTC

[jclouds] fix for issue if SL machine has multiple credentials registered (#931)

now just pick the best one. it matters only when we are going to log in to a machine.
the only time the problem has been observed has been with pre-existing machines set up
outwith jclouds with multiple password.
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/931

-- Commit Summary --

  * fix for issue if SL machine has multiple credentials registered

-- File Changes --

    M providers/softlayer/src/main/java/org/jclouds/softlayer/compute/functions/VirtualGuestToNodeMetadata.java (54)
    M providers/softlayer/src/test/java/org/jclouds/softlayer/compute/functions/VirtualGuestToNodeMetadataTest.java (55)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/931.patch
https://github.com/jclouds/jclouds/pull/931.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/931

Re: [jclouds] fix for issue if SL machine has multiple credentials registered (#931)

Posted by Alex Heneveld <no...@github.com>.
it's probably clear from the code, but this bug means anyone who has a VM in SL with multiple passwords set on it is unable to use jclouds to deploy to SL.  the error this fixes causes it to bomb out when listing VM's before any creation, with e.g.:

```
java.lang.IllegalArgumentException: expected one element but was: <Password{id=
..., username=root, password=...}, Password{id=..., username=vyatta, password=...}>
        at com.google.common.collect.Iterators.getOnlyElement(Iterators.java:312)
        at com.google.common.collect.Iterables.getOnlyElement(Iterables.java:289)
        at org.jclouds.softlayer.compute.functions.VirtualGuestToNodeMetadata.apply(VirtualGuestToNodeMetadata.java:98)
        at org.jclouds.softlayer.compute.functions.VirtualGuestToNodeMetadata.apply(VirtualGuestToNodeMetadata.java:48)
        at com.google.common.base.Functions$FunctionComposition.apply(Functions.java:216)
        at com.google.common.collect.Iterators$8.transform(Iterators.java:794)
        at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
        at com.google.common.collect.Iterators$7.computeNext(Iterators.java:646)
        at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
        at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
        at com.google.common.collect.Iterators.indexOf(Iterators.java:771)
        at com.google.common.collect.Iterators.any(Iterators.java:679)
        at com.google.common.collect.Iterables.any(Iterables.java:623)
        at org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet.getNextNames(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:197)
        at org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet.execute(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:121)
        at org.jclouds.compute.internal.BaseComputeService.createNodesInGroup(BaseComputeService.java:210)
```

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/931#issuecomment-193701606

Re: [jclouds] fix for issue if SL machine has multiple credentials registered (#931)

Posted by Andrea Turli <no...@github.com>.
Closed #931.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/931#event-581757023

Re: [jclouds] fix for issue if SL machine has multiple credentials registered (#931)

Posted by Andrea Turli <no...@github.com>.
lgtm, test passing. Thanks @ahgittin !

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/931#issuecomment-193794786

Re: [jclouds] fix for issue if SL machine has multiple credentials registered (#931)

Posted by Andrea Turli <no...@github.com>.
Merged at [master](http://git-wip-us.apache.org/repos/asf/jclouds/commit/d649c90d)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/931#issuecomment-193795526