Pivotal Knowledge Base


How to remove static IPs of Elastic Runtime router


Product Version
Pivotal Cloud Foundry® Elastic Runtime

1.6.x, 1.7.x


This article discusses a workaround to remove static IP addresses assigned to router VM(s). It is required by network admins to specify a router IP range for a load balancer. Some sample use cases are:

  1. Operator forgets to configure router IPs and wants to add them after installation. 
  2. Operator wants to modify the router IPs range to comply with network changes.


Per Ops Manager's design, if an operator forgets to assign a static IP for a job (HA Proxy, Router) Ops Manager will choose an IP at the top of the range. If the user decides to change the static IP in the middle of the range , Ops Manager will display an error since an internal range has already been calculated and allocated.
To get around this problem the user must scale the job down to zero, assign the new static IP, and redeploy. While this will work for most jobs, Elastic Runtime has a constraint that the Router job has to have more than zero instances.


Here is the procedure to scale the Router job down to zero to remove allocated static IPs and then assign new IPs. 

  1. Go to Ops Manager GUI to record Elastic Runtime build number
  2. SSH into Ops Manager VM using default user and go to directory /var/tempest/workspaces/default/metadata
  3. Check the files inside to find out the correct metadata file referred to Elastic Runtime installed from step 1.
  4. Backup the metadata file to a different folder. Otherwise, Ops Manager will have errors when reloading from GUI if unknown files are at this directory.
  5. Perform `sudo vi` to update the file, find out the minimum constraints of the router job and set it to zero
  6. Save the changes
  7. Go to Ops Manager GUI to set Router instance to `0` and click Save button
  8. Disable all related Errands and then apply changes 
  9. Wait for Apply Changes to complete successfully. This means that there are no longer any static IPs assigned to the gorouter job
  10. Go into Ops Manager -> ER -> IPs and Ports, to set the new static IPs for the gorouter. The number of IPs should match the count of router instances
  11. Go to the Ops Manager -> ER -> Resource Config screen and bump up the router count to match the number of IP addresses assigned
  12. Apply Changes, which pushes out the new IP addresses and creates the new router instances


Use Elastic Runtime version 1.6.20-build.1

ubuntu@pivotal-ops-manager:/var/tempest/workspaces/default/metadata$ sudo find . -name "*.yml" -print | sudo xargs grep "1.6.20"

./79d6f03fe691.yml:product_version: 1.6.20-build.1

edit the matched yml file and search the keyword `name: router` to find its job metadata and scroll down to find correct instance_definitions

set constraints -> min value from 1 to 0

- name: instances
type: integer
default: 1
configurable: true
min: 1


We do not support any changes in the metadata other than that is specifically listed in this KB.

Note that the operation would have downtime as Elastic Runtime can not work without Router. Also, all the errands should be disabled to avoid time wasting to wait those failed. 

Contact Pivotal Support if you have questions and need assistance. 




Powered by Zendesk