How do I change the IP address of a Router or Message Processor?

sgilson
Participant V

How do you change the IP address of a Router/MP? The doc seems to be missing some steps:

  1. Edit the /<inst root>/apigee4/bin/apigee env.sh file.
  2. Change the HOSTIP parameter to include the new IP address.
  3. Restart the modified node.

Don't you have to tell the other nodes about the change?

Stephen

Solved Solved
0 8 1,081
1 ACCEPTED SOLUTION

Correct, you need to call into the /v1/servers API to update the registered internalIP and externalIP properties. This isn't automatic, it would need to be done explicitly.

View solution in original post

8 REPLIES 8

+ @Paul Mibus

Since these are stateless, we may not need to inform other nodes

But i would expect atleast to update /v1/servers/{uuid} to reflect the new IP [not sure if this automatically handled?]

@Mukundha Madhavan Gateway Pod configuration (External and Internal IPs) still need to be updated. Remember we have MP to MP events such as cache eviction. Also, MS check status on MPs and the info used for that is based on Gateway Pod registration.

I used the steps to change the IP address for MP. It reverts to the old IP, once MP is started up.

That probably means that the host still has its old IP address. Can you confirm that the host address was changed before the MP was started? The MP will automatically detect and write its own address to the configuration database.

The host IP has definitely changed. When I run the command to change ExternalIP and InternalIP it works. Then when I try restart the MP it reverts back.

Correct, you need to call into the /v1/servers API to update the registered internalIP and externalIP properties. This isn't automatic, it would need to be done explicitly.

From Paul, the curl command are in the form:

curl -u <sysAdminEmail:pw> -X PUT http://ms_IP:8080/v1/servers/<uuid> -d ExternalIP=<ip>

curl -u <sysAdminEmail:pw> -X PUT http://ms_IP:8080/v1/servers/<uuid> -d InternalIP=<ip>

where uuid is the uuid of the Router or MP.