openstack中彻底删除计算节点的操作记录
在使用openstack的过程中,我们经常会添加好几台计算节点来部署虚拟机,在后续使用中由于某些原因,一些计算节点出现了问题,需要将这些出了问题的计算节点从openstack的控制节点中踢出去!但是很多时候,在删除计算节点的时候由于删除不彻底而导致了后面使用openstack出现了诸多问题。
下面记录了在openstack中彻底删除计算节点linux-node2.openstack的操作:
在控制节点上操作
查看计算节点
[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可用。
现在需要使它为不可用。
[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库)
[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
[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中彻底删除计算节点的操作记录的更多相关文章
- OpenStack IceHouse 部署 - 4 - 计算节点部署
		Nova计算服务(计算节点) 参考 本页内容依照官方安装文档进行,具体参见Configure a compute node(nova service) 前置工作 数据库 由于我们在Nova(计算管理 ... 
- redis cluster中添加删除重分配节点例子
		redis cluster配置好,并运行一段时间后,我们想添加节点,或者删除节点,该怎么办呢. 一,redis cluster命令行 //集群(cluster) CLUSTER INFO 打 ... 
- Openstack 网络服务 Neutron计算节点部署(十)
		Neutron计算节点部署 安装组件,安装的服务器是192.168.137.12 1.安装软件包 yum install -y openstack-neutron-linuxbridge ebtabl ... 
- 5.openstack之mitaka搭建计算节点
		部署计算节点(compute服务) 一:控制节点配置 1.建库建用户 CREATE DATABASE nova_api; CREATE DATABASE nova; GRANT ALL PRIVILE ... 
- Openstack 网络服务 Neutron计算节点部署 (十一)
		一) Neutron计算节点部署 1.安装软件包 # yum install -y openstack-neutron-linuxbridge ebtables ipset 2.配置文件neutron ... 
- html5中JavaScript删除全部节点
		如果div里有这么些内容: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type ... 
- openstack 部署笔记--neutron计算节点
		控制节点 # vim /etc/neutron/neutron.conf [DEFAULT] # ... transport_url = rabbit://openstack:root@control ... 
- 【openstack N版】——计算服务nova
		一.openstack计算服务nova 1.1nova介绍 Nova是openstack最早的两块模块之一,另一个是对象存储swift.在openstack体系中一个叫做计算节点,一个叫做控制节点.这 ... 
- Openstack的计算节点的nova-network异常中止及实例无法删除排错过程
		在预生产环境(172.17.46.2)发现无法删除实例,可以对实例做暂停,恢复操作. 查询原因发现计算节点的nova-network异常 [root@node-12 ~]# /etc/init.d/o ... 
随机推荐
- 用jq编码解码一个url地址
			介绍一下编码解码函数对 1. escape /unescape 主要用于汉字编码,返回字符的unicode编码值, 对“+”不能编码 2. encodeURI / decodeURI ... 
- ABAP指针
			1. 什么是ABAP指针:在ABAP里面,field symbol就相当于c语言的指针.如果你定义并且分配了相应的结构或者变量给它,其实它就指向这个结构或者变量的地址,如果修改了field symbo ... 
- For循环语句的使用
			一.For循环语句 说明:For循环用于循环次数已经确定的情况下. 格式:for(循环变量赋初值; 循环条件; 循环变量增值) { ·····语句 } 举例:求 ... 
- Sharepoint学习笔记—习题系列--70-573习题解析 -(Q45-Q47)
			Question45You create and deploy a custom Web Part.You add the Web Part to a page and receive a run-t ... 
- iOS开发之网络编程--1、NSURLSession的基本使用
			前言:学习NSURLSession的使用之前,先学习一篇关于NSURLSession的好文章<From NSURLConnection to NSURLSession>或者是国内的译文&l ... 
- Cocos2d入门--1--初涉相关属性或代码
			Cocos2d vision: cocos2d-x-3.8.1 万丈高楼,起于累土.对于一个游戏框架的学习,其实在于框架功能的使用积累,学会了如何在cocos2d游戏引擎的基础上使用它提供的各种功能 ... 
- 傅里叶:有关FFT,DFT与蝴蝶操作(转 重要!!!!重要!!!!真的很重要!!!!)
			转载地址:http://blog.renren.com/share/408963653/15068964503(作者 : 徐可扬) 有没有!!! 其实我感觉这个学期算法最难最搞不懂的绝对不是动态规划 ... 
- 用的比较多的linux命令
			vi编辑器 :set nu 显示行号 :$ 到文件最后一行 文件查找 find . -maxdepth 1 -name "@*" 这个命令意思是,查找当前目录下以@开 ... 
- Linux写时拷贝技术(copy-on-write)
			COW技术初窥: 在Linux程序中,fork()会产生一个和父进程完全相同的子进程,但子进程在此后多会exec系统调用,出于效率考虑,linux中引入了“写时复制“技术,也就是只有进程空间的各段的内 ... 
- PS网页设计教程XXIX——如何在PS中设计一个画廊布局
			作为编码者,美工基础是偏弱的.我们可以参考一些成熟的网页PS教程,提高自身的设计能力.套用一句话,“熟读唐诗三百首,不会作诗也会吟”. 本系列的教程来源于网上的PS教程,都是国外的,全英文的.本人尝试 ... 
