Forum Discussion
Brian_O_Kelley_
Nimbostratus
Jan 02, 2008No fault on VirtualServer.create but nothing happens
I saw this on a number of commands, usually when I had an incorrect parameter. This worries me - I'm making the assumption that if no SOAPFault occurs, my command completed successfully. I see the command reach the BigIP in the logs, but I don't see anything actually happening. I'm using BIG-IP 9.3.0 Build 178.5.
Here's an example (I'm using SOAP::Lite in perl):
sub addVirt($$$$$) {
my($name, $address, $port, $profile, $doit) = @_;
$virt_def = {name => $name, address => $address, port => $port, protocol => 'PROTOCOL_TCP'};
$virt_res = {type => "RESOURCE_TYPE_POOL", default_pool_name => $name};
$virt_prof = {profile_context => "PROFILE_CONTEXT_TYPE_CLIENT", profile_name => ""};
@virt_profs = [$virt_prof] ;
if ($doit) {
$soapResponse = $VirtualServer->create(SOAP::Data->name(definitions => [$virt_def]),
SOAP::Data->name(wildmasks => []),
SOAP::Data->name(resources => [$virt_res]),
SOAP::Data->name(profiles => [@virt_profs]));
if ($soapResponse->fault) {
print("SOAP fault: " , $soapResponse->faultcode , " " ,
$soapResponse->faultstring , "\n");
return 1;
}
}
print "Added virt $name at $address:$port with profile '$profile'\n";
return 0;
}
Here's what I see on the client side:
SOAPAction: "urn:iControl:LocalLB/VirtualServercreate"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
PROTOCOL_TCP
bob
34.23.23.2
80
bob
RESOURCE_TYPE_POOL
PROFILE_CONTEXT_TYPE_CLIENT
SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x140d4c0)
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK
Connection: close
Date: Wed, 02 Jan 2008 04:57:07 GMT
Server: Apache
Content-Type: text/xml; charset="UTF-8"
Client-Date: Wed, 02 Jan 2008 04:55:59 GMT
Client-Peer: 8.10.75.125:443
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /C=--/ST=WA/L=Seattle/O=MyCompany/OU=1191895286/CN=dhcp-68/emailAddress=root@dhcp-68
Client-SSL-Cert-Subject: /C=--/ST=WA/L=Seattle/O=MyCompany/OU=1191895286/CN=dhcp-68/emailAddress=root@dhcp-68
Client-SSL-Cipher: DHE-RSA-AES256-SHA
Client-SSL-Warning: Peer certificate not verified
Client-Transfer-Encoding: chunked
Set-Cookie: BIGIPAuthCookie=732B56B828B5AD672030C450317E6098B0F8B53A; path=/;
SOAPServer: EasySoap++/0.6
xmlns:E="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:A="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:s="http://www.w3.org/2001/XMLSchema-instance"
xmlns:y="http://www.w3.org/2001/XMLSchema"
xmlns:iControl="urn:iControl"
E:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
xmlns:m="urn:iControl:LocalLB/VirtualServer">
Here's what I see in the trace on the server side:
Jan 1 20:55:36 slb1b iControlPortal.cgi[27091]: icontrol_portal: PROTOCOL_TCP bob 34.23.23.2 80 bob RESOURCE_TYPE_POOL PROFILE_CONTEXT_TYPE_CLIENT
Jan 1 20:55:36 slb1b iControlPortal.cgi[27091]: LocalLB:+++++++++++++++++++++++++++++++++++++
Jan 1 20:55:36 slb1b iControlPortal.cgi[27091]: LocalLB:VirtualServer::create ( ) called by user "admin"
Jan 1 20:55:36 slb1b iControlPortal.cgi[27091]: LocalLB:-------------------------------------
- The issue you are having is that the wildmasks parameter you are passing in converting to an zero length array. The server side logic will parse loop over the input arrays and expects that all the arrays are of equal size and will ignore entries where the sizes don't match.
$soapResponse = $VirtualServer->create(SOAP::Data->name(definitions => [$virt_def]), SOAP::Data->name(wildmasks => []), SOAP::Data->name(resources => [$virt_res]), SOAP::Data->name(profiles => [@virt_profs]));
$soapResponse = $VirtualServer->create(SOAP::Data->name(definitions => [$virt_def]), SOAP::Data->name(wildmasks => [""]), SOAP::Data->name(resources => [$virt_res]), SOAP::Data->name(profiles => [@virt_profs]));
- As for your second post about Pool.add_member, this is the same issue. The members array is getting converted to a list of scalars , not a soapenc:Array.
bob 8.10.72.5 80 192.168.1.12 80
$soapResponse = $Pool->add_member( SOAP::Data->name(pool_names => [$pool]), SOAP::Data->name(members => [@members]));
bob 8.10.72.5 80 192.168.1.12 80
- Brian_O_Kelley_
Nimbostratus
Joe, I hear you on loosely-typed. Not a huge perl fan, but it's what I'm stuck with at the moment. To your response, I did try it this way too - I think it looks the same way yours does, but I do get an error here: - Brian_O_Kelley_
Nimbostratus
Yup, that worked. Thanks!
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects