bug report: (pallet.repl/show-nodes)

11 views
Skip to first unread message

Marc Limotte

unread,
Jul 22, 2014, 5:32:10 PM7/22/14
to palletops
I believe there is a bug in (pallet.repl/show-nodes).  Repl session and stack trace are below.  In short, it seems that pallet.node/is-64bit? throws a NullPointerException, which causes pallet.repl/show-nodes to not list some nodes. show-nodes calls pallet.compute/nodes and then pallet.node/node-map, so I've shown those calls, because show-nodes doesn't show the stack-trace.


user=> (def nodes (pallet.compute/nodes aws))
#'user/nodes
user=> (def n (nth nodes 5))
#'user/n
user=> n
  sample-group  ZONE/us-east-1a.REGION/us-east-1.PROVIDER/aws-ec2 null
 null
 RUNNING
 public: 50.19.xx.xx  private: 10.249.xx.xx
user=> (require '[pallet.node :as pn :refer :all])
nil
user=> (pn/node-map n)
(pn/node-map n)
{:host-name "N/A", :primary-ip "N/A"}
; node-map has a try catch that dumps errors at TRACE and returns this boring Map.
; Calling each fn in the node-map def, I found one that generates an error.
user=> (is-64bit? n)
(is-64bit? n)

NullPointerException   pallet.compute.jclouds.JcloudsNode (jclouds.clj:278)
user=> (pst)
(pst)
NullPointerException 
pallet.compute.jclouds.JcloudsNode (jclouds.clj:278)
user/eval19706 (form-init830193847663813673.clj:1)
clojure.lang.Compiler.eval (Compiler.java:6703)
clojure.lang.Compiler.eval (Compiler.java:6666)
clojure.core/eval (core.clj:2927)
clojure.main/repl/read-eval-print--6625/fn--6628 (main.clj:239)
clojure.main/repl/read-eval-print--6625 (main.clj:239)
clojure.main/repl/fn--6634 (main.clj:257)
clojure.main/repl (main.clj:257)
clojure.tools.nrepl.middleware.interruptible-eval/evaluate/fn--19116 (interruptible_eval.clj:56)
clojure.core/apply (core.clj:624)
clojure.core/with-bindings* (core.clj:1862)
nil
user=> n
n
  sample-group ZONE/us-east-1a.REGION/us-east-1.PROVIDER/aws-ec2 null
null
RUNNING
public: 50.19.44.24  private: 10.249.35.104
user=> 

marc

tbatchelli

unread,
Jul 24, 2014, 2:05:49 PM7/24/14
to palle...@googlegroups.com
Looks like a bug indeed. I filed https://github.com/pallet/pallet-repl/issues/7 for this as show-nodes should not fail regardless, but this issue seems to be related to pallet-jclouds. What are your dependencies?
Reply all
Reply to author
Forward
0 new messages