MIGRATE OPENSTACK KEYSTONE TO A DIFFERENT IP ADDRESS
来源:互联网 发布:mysql as省略 编辑:程序博客网 时间:2024/06/04 23:32
http://manku.thimma.org/2013/09/migrate-openstack-keystone-to-a-different-ip-address/
MIGRATE OPENSTACK KEYSTONE TO A DIFFERENT IP ADDRESS
SEPTEMBER 20, 2013 SHASHI LEAVE A COMMENT
This hack describes how to change openstack service end-points after there is a change in the host IP address.
When you initially install and provision OpenStack, Keystone (the identity service) creates a set of end-points for all the services. You can get the list of service end-points by typing
# keystone endpoint-list
Particularly of interest are the “publicurl”s. A typical publicurl of a service end-point would look like
http://10.0.0.25:8774/v2/$(tenant_id)s
If the IP address of the host changes, the end-points aren’t migrated automatically. This may cause quite a lot of dependent services to stop working.
One such service is “Horizon” which is the web interface and dashboard for OpenStack. Once the IP address is changed, you won’t be able to login to the admin dashboard as well.
To fix this, the service end-points needs to be updated. Unfortunately, the keystone tool supports only creation of end-points at this time. You’ll have to manually update the end-point URLs in the database.
In this example, I’m using mysql as the database and I have changed the host IP from 10.0.0.25 to 10.0.0.100.
Login to mysql (probably as root), select the keystone database and query the URLs.
# mysql -u root -p keystone
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
...
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> select id, url from endpoint where interface='public';
+----------------------------------+--------------------------------------------+
| id | url |
+----------------------------------+--------------------------------------------+
| 384ee4e74ad19a71bc56bff55e18e25c | http://10.0.0.25:8774/v2/$(tenant_id)s |
| 675affbfacf34c0899a994d72eea7d57 | http://10.0.0.25:9292/v2 |
| 34818b5b99394e4d9894e932403696cf | http://10.0.0.25:9696/ |
| 8b363857ce294150567571dfc476a83 | http://10.0.0.25:8776/v1/$(tenant_id)s |
| b4041634dc614f8876baa119769e784e | http://10.0.0.25:5000/v2.0 |
| c6edf51290e34b84995bccacbc2a2454 | http://10.0.0.25:8773/services/Cloud |
+----------------------------------+--------------------------------------------+
6 rows in set (0.00 sec)
Now that we know what to change, update the URLs (as suggested below)
mysql> update endpoint set url='http://10.0.0.100:8773/services/Cloud' where id='c6edf51290e34b84995bccacbc2a2454';
Now doing a keystone endpoint-list should show your new URL.
To change the IP address in the configurations do the following;
# cd /etc/
# find {keystone,nova,cinder,quantum,glance} -type f -exec grep -nH 10.0.0.25 {} \;
# find {keystone,nova,cinder,quantum,glance} -type f -exec sed -i s/10.0.0.25/10.0.0.100/g {} \;
Restart apache2, memcached and try logging into Horizon.
Of course, YMMV!
- MIGRATE OPENSTACK KEYSTONE TO A DIFFERENT IP ADDRESS
- Migrate a Windows 2008 VM from VMware to OpenStack
- Openstack keystone token to memcache
- openstack keystone v2 to v3
- openstack keystone v2 to v3
- The host file--map a name to an IP address
- How to change CentOS IP address on a cloned VM
- interger to IP address
- openstack keystone
- openstack---------keystone
- openstack-keystone
- openstack-keystone
- Restore openstack after ip address changed
- Booting to a different runlevel
- VirtualHost Tricks - Pointing your machine's IP to a different location than localhost
- Migrate to GRUB 2---Transitioning to a new boot loader
- 轻松安装OpenStack Keystone
- OpenStack keystone的理解
- cocos2d-x,Eclipse搭建Android环境
- Android做了些什么?
- WINCE开发相关知识整理
- Sqlite 反射机制封装数据库
- 设置或获取某一个节点里所包含的HTML
- MIGRATE OPENSTACK KEYSTONE TO A DIFFERENT IP ADDRESS
- JavaScript 学习心得(一)
- Xcode5提交代码到github
- 正确建立ado组件说明
- C/C++计时函数汇总
- [EXCEL]单元格高效操作
- 如何使用KeyChain保存和获取UDID
- 数据结构-链式栈的实现
- html富文本两次转码后解决方案