From 19582197abce0bb760b9364b5bbfe47647ccc163 Mon Sep 17 00:00:00 2001 From: Mike Hibler Date: Tue, 25 Sep 2007 23:29:14 +0000 Subject: [PATCH] Fix obscure elabinelab newnode problem where MAC address was being typed as a double by the RPC::XML library. --- utils/newnode.in | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/utils/newnode.in b/utils/newnode.in index e76c75fd6..3a5add6a1 100644 --- a/utils/newnode.in +++ b/utils/newnode.in @@ -320,8 +320,16 @@ NODE: foreach my $node_id (@node_ids) { "cert" => $RPCCERT, "portnum" => $RPCPORT}); + # + # XXX force MAC to a string since simple XML parser may otherwise + # think it is an int (i.e., all digits) or even a double (i.e., + # all digits with an 'e' in the middle). Don't laugh, I spent a + # lot of time figuring this out when it really happened! + # + my $macstr = RPC::XML::string->new($interfaces{0}[0]); + my $rval = libxmlrpc::CallMethod("elabinelab", "newnode_info", - {"mac" => $interfaces{0}[0]}); + {"mac" => $macstr}); if (!defined($rval)) { print "XMPRPC server did not return control iface info!\n"; -- GitLab