MIGRATE OPENSTACK KEYSTONE TO A DIFFERENT IP ADDRESS

本文介绍如何在OpenStack Keystone中更改服务端点的IP地址。当主机IP地址发生变化时,需要手动更新数据库中的端点URL。文章还提供了具体的MySQL操作步骤及配置文件修改指南。

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!


基于阶梯碳交易的含 P2G-CCS 耦合和燃气掺氢的虚拟电厂优化调度(Matlab代码实现)内容概要:本文围绕“基于阶梯碳交易的含P2G-CCS耦合和燃气掺氢的虚拟电厂优化调度”展开研究,提出了一种综合考虑碳交易机制、电转气与碳捕集封存(P2G-CCS)技术以及天然气管道掺氢利用的虚拟电厂优化调度模型。通过构建阶梯式碳交易成本函数,激励低碳运行,结合P2G技术将富余可再生能源转化为氢气或甲烷进行存储与利用,同时引入CCS技术降低碳排放,并探索燃气系统掺氢输送的可行性,提升能源系统灵活性与低碳水平。采用Matlab进行建模与求解,验证了该模型在降低系统运行成本、减少碳排放和提高可再生能源消纳能力方面的有效性。; 适合人群:具备电力系统、能源系统优化背景,熟悉Matlab编程和优化建模的研究生、科研人员及能源领域工程技术人员。; 使用场景及目标:①研究高比例可再生能源接入背景下虚拟电厂的低碳优化调度策略;②探索P2G-CCS与燃气掺氢技术在综合能源系统中的协同效益;③实现阶梯碳交易机制下的经济性与环保性联合优化。; 阅读建议:建议读者结合Matlab代码深入理解模型构建过程,重点关注目标函数设计、约束条件设置及求解方法的选择,同时可尝试调整碳交易阶梯参数、P2G效率或掺氢比例等关键变量,开展敏感性分析以深化对系统运行特性的认知。
内容概要:本文档是Geant4协作组织发布的面向应用开发者的权威手册,系统介绍了Geant4——一种用于模拟粒子与物质相互作用的蒙特卡洛仿真工具包的核心概念与使用方法。内容涵盖从基础入门(如定义主程序、构建探测器几何结构、设置材料与粒子)到高级功能(如物理过程建模、轨迹跟踪、可视化、数据分析及多线程控制)的完整开发流程。重点讲解了用户动作类、探测器响应、电磁场处理、击中与数字化、偏差技术、并行几何与评分机制等关键模块,并提供了丰富的代码示例与命令接口说明,帮助开发者构建完整的仿真应用程序。; 适合人群:具备C++编程基础和基本粒子物理知识,从事高能物理、核科学、医学物理或辐射探测等领域研究的研发人员、研究生及工程技术人员;尤其适合需要定制化仿真系统的应用开发者。; 使用场景及目标:① 构建粒子探测器的几何模型并配置材料属性;② 定义粒子源与物理过程,实现事件生成与轨迹追踪;③ 利用可视化工具调试几何结构与分析数据;④ 实现敏感探测器、击中处理与数字化流程;⑤ 应用评分与分析工具进行结果统计与输出。; 阅读建议:建议结合Geant4安装包中的示例程序(如B1、RE系列)同步实践,优先掌握核心类(G4RunManager、用户动作类、G4UImanager)的作用机制,重视可视化调试与几何检查功能的使用,逐步深入理解状态机管理、多线程架构与自定义物理列表的设计逻辑。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值