openstack中彻底删除计算节点的操作记录
在使用openstack的过程中,我们经常会添加好几台计算节点来部署虚拟机,在后续使用中由于某些原因,一些计算节点出现了问题,需要将这些出了问题的计算节点从openstack的控制节点中踢出去!但是很多时候,在删除计算节点的时候由于删除不彻底而导致了后面使用openstack出现了诸多问题。
下面记录了在openstack中彻底删除计算节点linux-node2.openstack的操作:
在控制节点上操作
查看计算节点
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
[root@linux-node1 src] # openstack host list
+-----------------------+-------------+----------+
| Host Name | Service | Zone |
+-----------------------+-------------+----------+
| linux-node1.openstack | conductor | internal |
| linux-node1.openstack | cert | internal |
| linux-node1.openstack | consoleauth | internal |
| linux-node1.openstack | scheduler | internal |
| linux-node1.openstack | compute | nova |
| linux-node2.openstack | compute | nova |
+-----------------------+-------------+----------+
[root@linux-node1 src] # nova service-list
+----+------------------+-----------------------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+----+------------------+-----------------------+----------+---------+-------+----------------------------+-----------------+
| 1 | nova-conductor | linux-node1.openstack | internal | enabled | up | 2016-11-02T11:25:08.000000 | - |
| 4 | nova-cert | linux-node1.openstack | internal | enabled | up | 2016-11-02T11:25:07.000000 | - |
| 5 | nova-consoleauth | linux-node1.openstack | internal | enabled | up | 2016-11-02T11:25:07.000000 | - |
| 6 | nova-scheduler | linux-node1.openstack | internal | enabled | up | 2016-11-02T11:25:07.000000 | - |
| 7 | nova-compute | linux-node1.openstack | nova | enabled | up | 2016-11-02T11:24:59.000000 | - |
| 8 | nova-compute | linux-node2.openstack | nova | enabled | down | 2016-10-31T05:55:24.000000 | - |
+----+------------------+-----------------------+----------+---------+-------+----------------------------+-----------------+
|
虽然上面显示的一个计算节点linux-node2.openstack 的State状态是down,但是Status状态还是enabled可用。
现在需要使它为不可用。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
[root@linux-node1 src] # nova service-disable linux-node2.openstack nova-compute
+-----------------------+--------------+----------+
| Host | Binary | Status |
+-----------------------+--------------+----------+
| linux-node2.openstack | nova-compute | disabled |
+-----------------------+--------------+----------+
[root@linux-node1 src] # nova service-list
+----+------------------+-----------------------+----------+----------+-------+----------------------------+-----------------+
| Id | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+----+------------------+-----------------------+----------+----------+-------+----------------------------+-----------------+
| 1 | nova-conductor | linux-node1.openstack | internal | enabled | up | 2016-11-02T11:25:48.000000 | - |
| 4 | nova-cert | linux-node1.openstack | internal | enabled | up | 2016-11-02T11:25:47.000000 | - |
| 5 | nova-consoleauth | linux-node1.openstack | internal | enabled | up | 2016-11-02T11:25:47.000000 | - |
| 6 | nova-scheduler | linux-node1.openstack | internal | enabled | up | 2016-11-02T11:25:47.000000 | - |
| 7 | nova-compute | linux-node1.openstack | nova | enabled | up | 2016-11-02T11:25:49.000000 | - |
| 8 | nova-compute | linux-node2.openstack | nova | disabled | down | 2016-11-02T11:25:48.000000 | - |
+----+------------------+-----------------------+----------+----------+-------+----------------------------+-----------------+
|
在数据库里清理(nova库)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
[root@linux-node1 ~] # mysql -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 230863
Server version: 5.5.50-MariaDB MariaDB Server
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> use nova;
Database changed
MariaDB [nova]> delete from nova.services where host= "linux-node2.openstack" ;
Query OK, 1 row affected (0.00 sec)
MariaDB [nova]> delete from compute_nodes where hypervisor_hostname= "linux-node2.openstack" ;
Query OK, 1 row affected (0.00 sec)
MariaDB [nova]> select host from nova.services;
+-----------------------+
| host |
+-----------------------+
| linux-node1.openstack |
| linux-node1.openstack |
| linux-node1.openstack |
| linux-node1.openstack |
| linux-node1.openstack |
+-----------------------+
5 rows in set (0.00 sec)
MariaDB [nova]> select hypervisor_hostname from compute_nodes;
+-----------------------+
| hypervisor_hostname |
+-----------------------+
| linux-node1.openstack |
+-----------------------+
1 row in set (0.00 sec)
|
再次查看计算节点,就发现已经删除了linux-node2.openstack
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
[root@linux-node1 src] # openstack host list
+-----------------------+-------------+----------+
| Host Name | Service | Zone |
+-----------------------+-------------+----------+
| linux-node1.openstack | conductor | internal |
| linux-node1.openstack | cert | internal |
| linux-node1.openstack | consoleauth | internal |
| linux-node1.openstack | scheduler | internal |
| linux-node1.openstack | compute | nova |
+-----------------------+-------------+----------+
[root@linux-node1 src] # nova service-list
+----+------------------+-----------------------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+----+------------------+-----------------------+----------+---------+-------+----------------------------+-----------------+
| 1 | nova-conductor | linux-node1.openstack | internal | enabled | up | 2016-11-02T11:44:08.000000 | - |
| 4 | nova-cert | linux-node1.openstack | internal | enabled | up | 2016-11-02T11:44:08.000000 | - |
| 5 | nova-consoleauth | linux-node1.openstack | internal | enabled | up | 2016-11-02T11:44:07.000000 | - |
| 6 | nova-scheduler | linux-node1.openstack | internal | enabled | up | 2016-11-02T11:44:07.000000 | - |
| 7 | nova-compute | linux-node1.openstack | nova | enabled | up | 2016-11-02T11:44:09.000000 | - |
+----+------------------+-----------------------+----------+---------+-------+----------------------------+-----------------+
|
openstack中彻底删除计算节点的操作记录相关推荐
- redis cluster中添加删除重分配节点例子
redis cluster中添加删除重分配节点例子 作者:用户 来源:互联网 时间:2016-05-05 10:22:27 摘要: 本文讲的是redis cluster中添加删除重分配节点例子, re ...
- OpenStack icehouse系列之计算节点搭建
OpenStack icehouse系列之计算节点搭建 我们接着上一篇博文OpenStack icehouse系列之网络节点搭建继续往下搭建下面是环境介绍 网络节点:ml2.openvswitch.D ...
- OpenStack Juno系列之计算节点搭建
OpenStack Juno系列之计算节点搭建 nova-compute安装配置 -------------------- apt-get install nova-compute sysfsutil ...
- Oracle EBS 中退货订单流程的系统操作记录
Oracle EBS 中退货订单流程的系统操作记录 1.创建退货订单并登记,行状态为等待退货. 订单行项目 2.库存职责下,接收退货,输入RMA编号(退货订单编号)2015010008,点击查找,输入 ...
- 来都来了,你确定不看看,使用python中的科学计算库Numpy操作数组,你一定能学废(图文并茂版)
Numpy操作数组 Numpy库 Numpy库的介绍 Numpy库的安装: python中数组与列表对比 列表: 数组: 数组的创建 使用array方法创建数组 注意: ndmin,dtype参数的使 ...
- 结构体里有指针 scanf赋值_C++|链表中常见的链表节点指针操作
链表节点指针做左值时的赋值可以理解为左值指向或链接. 1 用带指针的结构体类型来描述链接结点 typedef struct Lnode{ ElemType data; /*数据域,保存结点的值 */s ...
- JS记坑 ----- 在父节点中添加删除子节点
场景:通过javascript为ul标签内动态增删li标签,我通过 liArr = ul.children; 获取了ul的存有所有子元素的类数组,但是在 appendChild().insert()和 ...
- 在SqlServer存储过程中使用Cursor(游标)操作记录
1. 为何使用游标: 使用游标(cursor)的一个主要的原因就是把集合操作转换成单个记录处理方式.用SQL语言从数据库中检索数据后,结果放在内存的一块区域中,且结果往往是一个含有多个记录的 ...
- jquery的DOM节点操作(删除元素节点)
1.删除元素节点 在操作页面时,删除多余或者指定的页面元素是非常必要的. jquery中提供了remove()方法来删除元素. 其语法格式如下: 删除元素节点示例代码: <!DOCTYPE ht ...
最新文章
- 关于数组集合之间的转换
- 二分类神经网络的特征光谱---2-3至2-9
- Python--day8--Socket编程/异常处理
- Maximum Balanced Circle
- Collection集合总结
- html5--5-4 绘制矩形
- MFC开发IM-第三篇、资源视图--显示在另一个编辑器中打开
- 计算机金融专业课程方案,《计算机在金融业中的应用》教学实施方案
- 一味地追求流量正确么?
- 关于线程协同的火车票售卖程序
- 【软件自动化测试】基于自设网站的软件测试与分析
- Github注册教程
- ibus 五笔输入法 极点五笔6.1词库hack
- 每日思考第 61 期:职场PUA与情场PUA
- 快速入门了解后端网络方面必备知识
- Excel隔行插入空白行小技巧
- plt.contour
- 四点之间最短路(spfa+优先队列+枚举优化)UESTC1955喜马拉雅山上的猴子
- Linux宝塔Apache死机,宝塔面板重启不了apache,出现错误:httpd not running, trying to start...
- 书柜例子解释整理表空间碎片