Forum Discussion

snovakov_86258's avatar
snovakov_86258
Icon for Nimbostratus rankNimbostratus
Feb 02, 2012

iControl virtual server creation issue...

Please excuse my lack of F5 Big IP knowledge.

 

I am using Perl/iControl API.

 

I have successfully created the following VIP resource pool.

 

It's name is 'myPool':

 

 

POOL myPool LB METHOD round robin MIN/CUR ACTIVE MEMBERS 0/0 | (cur, max, limit, tot) = (0, 0, 0, 0) | (pkts,bits) in = (0, 0), out = (0, 0) | PVA (cur, max, limit, tot) = (0, 0, 0, 0) | PVA (pkts,bits) in = (0, 0), out = (0, 0) | PVA assist conns (tot, curr) = (0, 0) +-> POOL MEMBER myPool/1.2.3.4:80 inactive,down | session enabled priority 0 ratio 1 | (cur, max, limit, tot) = (0, 0, 0, 0) | (pkts,bits) in = (0, 0), out = (0, 0) | requests (total) = 0 | PVA (cur, max, limit, tot) = (0, 0, 0, 0) | PVA (pkts,bits) in = (0, 0), out = (0, 0) | PVA assist conns (tot, curr) = (0, 0)

 

 

I also have successfully created the following VIP resource pool 'monitor' and associated it with the pool:

 

 

Local LB virtual server (VIP) pool monitor associations :

 

 

$VAR1 = [ bless(

 

{ 'monitor_rule' => bless(

 

{ 'type' => 'MONITOR_RULE_TYPE_SINGLE',

 

'quorum' => '0',

 

'monitor_templates' => [ 'tcp' ]

 

},

 

'LocalLB::MonitorRule' ), 'pool_name' => 'myPool'

 

}, 'LocalLB::Pool::MonitorAssociation' )

 

];

 

 

But when I try to use iControl:LocalLB.VirtualServer.create() method to create a new VIP, it is apparently not "taking".

 

 

When I do a:

 

 

virtual show all

 

 

at the bigpipe shell after the attempt to use LocalLB.VirtualServer.create(), my virtual server is not there.

 

 

Yes, after the LocalLB.VirtualServer.create() attempt I am doing an iControl:System/ConfigSync.save_configuration() call to save the configuration.

 

In the 'save' I am calling it like:

 

 

my $soapResponse = $session->save_configuration(

 

SOAP::Data->name(filename => 'blah'),

 

SOAP::Data->name(save_flag => 'SAVE_HIGH_LEVEL_CONFIG')

 

);

 

 

Yes, the '$session' variable is fine.

 

Am passing the 'SAVE_HIGH_LEVEL_CONFIG' save flag. The iControl documentation says the following regarding this way of saving the configuration:

 

 

"Saves only the high-level configuration (virtual servers, pools, members, monitors...). The filename specified when used with this mode will be ignored, since configuration will be saved to /config/bigip.conf by default."

 

 

This should work. The "filename => 'blah'" should not matter.

 

 

The call to LocalLB.VirtualServer.create() looks like:

 

 

my $soapResponse = $session->create(

 

SOAP::Data->name(definitions => [@{$vsDefs}]),

 

SOAP::Data->name(wildmasks => [@{$masks}]),

 

SOAP::Data->name(resources => [@{$vsResources}]),

 

SOAP::Data->name(profiles => [@{$vsProfiles}])

 

);

 

 

The parameters passed-in look like:

 

 

my @vsDefs = ();

 

$vsDefs[0]->{'name'} = 'myVIP';

 

$vsDefs[0]->{'address'} = '10.40.53.150';

 

$vsDefs[0]->{'port'} = '80';

 

$vsDefs[0]->{'protocol'} = 'PROTOCOL_TCP';

 

my @wildMasks = ();

 

my @vsResources = ();

 

$vsResources[0]->{'type'} = 'RESOURCE_TYPE_POOL';

 

$vsResources[0]->{'default_pool_name'} = 'myPool';

 

my @vsProfile = ();

 

$vsProfile[0][0]->{'profile_name'} = 'tcp';

 

$vsProfile[0][0]->{'profile_context'} = 'PROFILE_CONTEXT_TYPE_ALL';

 

 

Now, as you can see, I am passing an 'empty' array of netmasks in. Am not sure if this is ok or not.

 

Does anyone know if this list of netmask representations is mandatory??

 

If so, what should it look like?

 

 

Also, am wondering if because the lone VIP resource pool member:

 

 

myPool/1.2.3.4:80 inactive,down

 

 

is marked 'inactive,down' that the virtual server add doesn't appear to work.

 

 

Also, am wondering if because the same VIP resource pool member's IP address is 'bogus', the virtual server add doesn't appear to work.

 

 

My Perl 'driver' code for iControl checks for *all* errors that I can.

 

I am not getting any errors to the console.

 

All appears to work, but the virtual server does not show when I do a:

 

 

virtual show all

 

 

at the bigpipe shell, the virtual server is not there.

 

 

And yes, my user rights/privileges are full-on 'administrative'.

 

This is not a rights/privileges issue.

 

 

Any help is fully appreciated. Thanks.

 

  • Try setting wildmasks=['255.255.255.255']

     

     

    I have a fairly involved VIP creation automation system in place, and this is what I set wildmasks to [rather than empty].

     

     

    Just an idea to try.
  • God bless you, mhite!

     

    I've been pulling my hair out this morning trying to resolve this.

     

    Thanks a trillion!