cancel
Showing results for 
Search instead for 
Did you mean: 

Force IP up even though it is a duplicate?

trouphaz
Level 4
I am using a load balancer with DSR (Dynamic Server Return).  I need to create a loopback address that has the same IP as the virtual IP used by the load balancer.  The problem is that VCS will not start an IP resource that already exists on the network.  Is there a way to force VCS to ignore this test with a particular flag or something?
1 ACCEPTED SOLUTION

Accepted Solutions

TomerG
Level 6
Partner Employee Accredited Certified

I don't see any options for this as far as attributes for the IP resource, however the IP online script (located in /opt/VRTSvcs/bin/IP/) is nothing but a Perl script, so you could just comment out the lines where they do the check (see below). NOTE that this would mean you have an "unsupported" configuration in the sense that you are working around some safeties that have been built in and modifying the existing agents (which will be re-modified probably during the next upgrade back to normal), but hey...

 

 

# Try a ping to see if someone else on

# the net is using $Address -- bail if it is in use.

#

open (PING, "$ping $Address 1 2> /dev/null |");

# WE SHOULD SEND A WARNING TO THE LOG FILE HERE

if (<PING> =~ / alive\b/) {

        VCSAG_LOG_MSG ("W", "Address $Address already exists: Resource will not

go ONLINE", 4005, "$Address");

        close(IPLOCK);

        exit 0;

}

 

Personally, I would rather create a COPY of the IP resource type (may be a bit complicated for someone not experienced with it) so that you have a custom resource type, e.g. called IPNoPing or something like that. This one would have the customized online script (but otherwise the same as IP), and that way upgrades wouldn't affect you, since they will only update the IP resource type. 

View solution in original post

2 REPLIES 2

TomerG
Level 6
Partner Employee Accredited Certified

I don't see any options for this as far as attributes for the IP resource, however the IP online script (located in /opt/VRTSvcs/bin/IP/) is nothing but a Perl script, so you could just comment out the lines where they do the check (see below). NOTE that this would mean you have an "unsupported" configuration in the sense that you are working around some safeties that have been built in and modifying the existing agents (which will be re-modified probably during the next upgrade back to normal), but hey...

 

 

# Try a ping to see if someone else on

# the net is using $Address -- bail if it is in use.

#

open (PING, "$ping $Address 1 2> /dev/null |");

# WE SHOULD SEND A WARNING TO THE LOG FILE HERE

if (<PING> =~ / alive\b/) {

        VCSAG_LOG_MSG ("W", "Address $Address already exists: Resource will not

go ONLINE", 4005, "$Address");

        close(IPLOCK);

        exit 0;

}

 

Personally, I would rather create a COPY of the IP resource type (may be a bit complicated for someone not experienced with it) so that you have a custom resource type, e.g. called IPNoPing or something like that. This one would have the customized online script (but otherwise the same as IP), and that way upgrades wouldn't affect you, since they will only update the IP resource type. 

trouphaz
Level 4
So, I ended up making a new resource type based on the IP type and then removed the ping section from that one.  I plan on tweaking it more by forcing it to only allow the use of lo0 as an interface (so someone doesn't accidentally use the LoopbackIP resource as a regular IP resource).  Thanks for the info.