Skip to content

Instantly share code, notes, and snippets.

@cloudnull
Last active August 29, 2015 13:57
Show Gist options
  • Save cloudnull/9926947 to your computer and use it in GitHub Desktop.
Save cloudnull/9926947 to your computer and use it in GitHub Desktop.
Changing and or re-creating the VIPS on your Rackspace Private Openstack Cloud

Change VIPS in a Rackspace Private Cloud

Date: 2014-04-01
tags:rackspace, openstack, dev, rpc, private cloud
category:*nix
Description:
Changing and or re-creating the VIPS on your Rackspace Private Openstack Cloud

If you come accross the need to change / modify the VIPS which control your Openstack cluster as provided by the Rackspace Private Cloud here is the process to successfully perform the operation.

  1. First step is to modify the vips in the Environment JSON. In the Environment JSON you are going to modify the vip IP address. Once complete save the environment within your Chef server.

    knife environment edit rpcs

    Note that your environment name may be different, so change the rpcs to whatever it should be based on your setup.

  2. Stop Monit on EVERYTHING

    knife ssh 'name:*' '/etc/init.d/monit stop'
  3. Remove all known Keystone Endpoints in the DB.

    # Reset nova endpoints
    function reset_keystone_endpoint() {
      echo "Resetting Nova Endpoints"
      # Load the Openstack Credentials
      MYSQLCRD="/root/.my.cnf"
      REGION=${REGION:-"RegionOne"}
      if [[ -f "$MYSQLCRD" ]];then
        USERNAME="$(awk -F'=' '/user/ {print $2}' ${MYSQLCRD})"
        PASSWORD="$(awk -F'=' '/password/ {print $2}' ${MYSQLCRD})"
        NUKECMD="delete from endpoint where region=\"${REGION}\";"
        mysql -u "${USERNAME}" -p"${PASSWORD}" -o keystone -e "${NUKECMD}"
      fi
    }
    reset_keystone_endpoint
  4. Remove all of the "vrrp" files localted on all of the controller nodes.

    knife ssh 'name:*' 'tar -czf /root/vrrp-bak.tar.gz /etc/keepalived/conf.d/vrrp*; \
                        rm "/etc/keepalived/conf.d/vrrp*"'
  5. Re-Run chef-client on everything.

    knife ssh 'name:*' 'chef-client'
  6. Start Monit on EVERYTHING

    knife ssh 'name:*' '/etc/init.d/monit start'

After this you should have new VIP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment