【openstack N版】——摘除一个计算节点
1.查看计算节点
#查看所有计算节点
[root@open-control01 ~]# nova service-list
+----+------------------+--------------------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+----+------------------+--------------------+----------+---------+-------+----------------------------+-----------------+
| 1 | nova-conductor | open-control01 | internal | enabled | up | 2017-05-02T02:22:09.000000 | - |
| 2 | nova-scheduler | open-control01 | internal | enabled | up | 2017-05-02T02:22:03.000000 | - |
| 3 | nova-consoleauth | open-control01 | internal | enabled | up | 2017-05-02T02:22:05.000000 | - |
| 8 | nova-compute | open-compute01 | nova | enabled | up | 2017-05-02T02:22:06.000000 | - |
| 9 | nova-compute | open-compute02 | nova | enabled | up | 2017-05-02T02:22:03.000000 | - |
| 10 | nova-compute | open-compute03 | nova | enabled | up | 2017-05-02T02:22:03.000000 | - |
| 11 | nova-compute | open-compute04 | nova | enabled | up | 2017-05-02T02:22:01.000000 | - |
+----+------------------+--------------------+----------+---------+-------+----------------------------+-----------------+
2.选择要删除的计算节点
#删除open-compute04的ID
[root@open-control01 ~]# nova service-delete
3.查看网络
#查看网络
[root@open-control01 ~]# neutron agent-list
+--------------------------------------+--------------------+--------------------+-------------------+-------+----------------+---------------------------+
| id | agent_type | host | availability_zone | alive | admin_state_up | binary |
+--------------------------------------+--------------------+--------------------+-------------------+-------+----------------+---------------------------+
| 231b4151-79ae-403c-9634-22fb84504012 | Linux bridge agent | open-compute04 | | :-) | True | neutron-linuxbridge-agent |
| 3b7808f5-c5da-495e-bd5d-53ec0e278336 | Linux bridge agent | open-compute02 | | :-) | True | neutron-linuxbridge-agent |
| 461362e0-a2fc-4c07-8f05-7438238895a3 | Linux bridge agent | open-control01 | | :-) | True | neutron-linuxbridge-agent |
| de7c1926-1934-4d95-ab35-5ec249e92f1b | Linux bridge agent | open-compute01 | | :-) | True | neutron-linuxbridge-agent |
| ecb03a62-3099-486e-a685-4a94b1891300 | DHCP agent | open-control01 | nova | :-) | True | neutron-dhcp-agent |
| f1041be4-b6e5-41da-bbb8-73efcccf1893 | Linux bridge agent | open-compute03 | | :-) | True | neutron-linuxbridge-agent |
| fb1b72fe-3a7d-4d74-9a65-87fe082b672b | Metadata agent | open-control01 | | :-) | True | neutron-metadata-agent |
+--------------------------------------+--------------------+--------------------+-------------------+-------+----------------+---------------------------+
4.删除compute04的网络
#删除网络(ID)
[root@open-control01 ~]# neutron agent-delete 231b4151-79ae-403c--22fb84504012
Deleted agent(s): 231b4151-79ae-403c--22fb84504012
5.停止计算节点nova、neutron相关服务
#停止服务
[root@open-compute04 ~]# systemctl stop libvirtd.service openstack-nova-compute.service
[root@open-compute04 ~]# systemctl stop neutron-linuxbridge-agent
6.登录数据库
#用nova用户登录数据库
[root@open-control01 ~]# mysql -unova -pnovapasswd
#使用nova库
MariaDB [(none)]> use nova;
#查询nova主机
MariaDB [nova]> select host from nova.services;
+--------------------+
| host |
+--------------------+
| open-compute01 |
| open-compute02 |
| open-compute03 |
| open-compute04 |
| open-control01 |
| open-control01 |
| open-control01 |
+--------------------+
MariaDB [nova]> select hypervisor_hostname from compute_nodes;
+---------------------+
| hypervisor_hostname |
+---------------------+
| open-compute01 |
| open-compute02 |
| open-compute03 |
| open-compute04 |
| open-compute04 |
+---------------------+
7.删除查询的数据
#删除
MariaDB [nova]> delete from nova.services where host="open-compute04";
Query OK, row affected (0.02 sec)
MariaDB [nova]> delete from compute_nodes where hypervisor_hostname="open-compute04";
Query OK, rows affected (0.01 sec)
8.检查
#nova列表
[root@open-control01 ~]# nova service-list
+----+------------------+--------------------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+----+------------------+--------------------+----------+---------+-------+----------------------------+-----------------+
| 1 | nova-conductor | open-control01 | internal | enabled | up | 2017-05-02T02:43:00.000000 | - |
| 2 | nova-scheduler | open-control01 | internal | enabled | up | 2017-05-02T02:42:53.000000 | - |
| 3 | nova-consoleauth | open-control01 | internal | enabled | up | 2017-05-02T02:42:55.000000 | - |
| 8 | nova-compute | open-compute01 | nova | enabled | up | 2017-05-02T02:42:55.000000 | - |
| 9 | nova-compute | open-compute02 | nova | enabled | up | 2017-05-02T02:42:53.000000 | - |
| 10 | nova-compute | open-compute03 | nova | enabled | up | 2017-05-02T02:42:53.000000 | - |
+----+------------------+--------------------+----------+---------+-------+----------------------------+-----------------+
#neutron列表
[root@open-control01 ~]# neutron agent-list
+--------------------------------------+--------------------+--------------------+-------------------+-------+----------------+---------------------------+
| id | agent_type | host | availability_zone | alive | admin_state_up | binary |
+--------------------------------------+--------------------+--------------------+-------------------+-------+----------------+---------------------------+
| 3b7808f5-c5da-495e-bd5d-53ec0e278336 | Linux bridge agent | open-compute02 | | :-) | True | neutron-linuxbridge-agent |
| 461362e0-a2fc-4c07-8f05-7438238895a3 | Linux bridge agent | open-control01 | | :-) | True | neutron-linuxbridge-agent |
| de7c1926-1934-4d95-ab35-5ec249e92f1b | Linux bridge agent | open-compute01 | | :-) | True | neutron-linuxbridge-agent |
| ecb03a62-3099-486e-a685-4a94b1891300 | DHCP agent | open-control01 | nova | :-) | True | neutron-dhcp-agent |
| f1041be4-b6e5-41da-bbb8-73efcccf1893 | Linux bridge agent | open-compute03 | | :-) | True | neutron-linuxbridge-agent |
| fb1b72fe-3a7d-4d74-9a65-87fe082b672b | Metadata agent | open-control01 | | :-) | True | neutron-metadata-agent |
+--------------------------------------+--------------------+--------------------+-------------------+-------+----------------+---------------------------+
【开源是一种精神,分享是一种美德】
— By GoodCook
— 笔者QQ:253097001
— 欢迎大家随时来交流
—原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。
【openstack N版】——摘除一个计算节点的更多相关文章
- hadoop 集群 加入一个新的存储节点和删除一个计算节点需要刷新集群状态命令
加入一个新的存储节点和删除一个计算节点需要刷新集群状态命令 方式1:静态添加datanode,停止namenode方式 1.停止namenode 2.修改slaves文件,并更新到各个节点3.启动na ...
- OpenStack搭建Q版只属于计算节点上的环境准备(step6)
配置NTP服务 1.安装chronyd yum install chrony -y 2.修改配置文件,使计算节点与控制节点同步时间 vim /etc/chrony.conf 注释掉下面四行: #ser ...
- 超千个节点OpenStack私有云案例(1):CERN 5000+ 计算节点私有云
CERN:欧洲核子研究组织 本文根据以下几篇文章整理而来: https://www.openstack.org/summit/tokyo-2015/videos/presentation/unveil ...
- openstack中彻底删除计算节点的操作记录
在使用openstack的过程中,我们经常会添加好几台计算节点来部署虚拟机,在后续使用中由于某些原因,一些计算节点出现了问题,需要将这些出了问题的计算节点从openstack的控制节点中踢出去!但是很 ...
- OpenStack 新加计算节点后修改
Contents [hide] 1 前提 2 iptables禁止snat= 3 vlan支持 4 Quota支持 5 修改物理资源设置. 6 添加collectd 7 重启服务 前提 我们使用fue ...
- OpenStack运维(二):OpenStack计算节点的故障和维护
1.计划中的维护 举例:需要升级某一个计算节点的硬件配置,需要将计算节点上的虚拟机迁移后在对其进行操作,分为两种情况. 1.1 云系统使用了共享存储 a. 获取虚拟机列表:nova list --ho ...
- 【openstack N版】——云主机调整大小\冷迁移
一.先决条件 云主机冷迁移,即:将一台云主机从一个计算节点上,迁移到另外一个计算节点上.因为环境原因,所以我们需要准备两个计算节点. 1.1准备环境 在控制节点上,安装一个计算节点 #在控制节点安装n ...
- openstack--6--控制节点和计算节点安装配置neutron
Neutron相关介绍 早期的时候是没有neutron,早期所使用的网络的nova-network,经过版本改变才有个neutron. quantum是因为商标和别的公司重名了,又改成的Neutron ...
- 提升Exadata 计算节点本地IO性能
1.问题概述 某客户有一台Exadata X2-2,每个计算节点是4块普通的本地SAS硬盘做成的RAID5,然后在RAID5的本地硬盘上创建了一个文件系统来存放DSG数据同步软件,在后续的运维过程中, ...
随机推荐
- $_FILES详解
<form enctype="multipart/form-data" action="upload.php" method="post&quo ...
- Spring-boot中使用@ConditionalOnExpression注解,在特定情况下初始化bean
想要实现的功能: 我想在配置文件中设置一个开关,enabled,在开关为true的时候才实例化bean,进行相关业务逻辑的操作. 具体实现: 1:要实例化的bean 2. 配置类 代码: 想要实例化的 ...
- 计算机程序的思维逻辑 (75) - 并发容器 - 基于SkipList的Map和Set
上节我们介绍了ConcurrentHashMap,ConcurrentHashMap不能排序,容器类中可以排序的Map和Set是TreeMap和TreeSet,但它们不是线程安全的.Java并发包中与 ...
- golang RWMutex读写锁分析
RWMutex:是基于Mutex实现的读写互斥锁,一个goroutine可以持有多个读锁或者一个写锁,同一时刻只能持有读锁或者写锁 数据结构设计: type RWMutex struct { w Mu ...
- HTML5本地图片裁剪并上传
最近做了一个项目,这个项目中需要实现的一个功能是:用户自定义头像(用户在本地选择一张图片,在本地将图片裁剪成满足系统要求尺寸的大小).这个功能的需求是:头像最初剪切为一个正方形.如果选择的图片小于规定 ...
- javascript中常用的
1.javascript中构造equals().trim()方法并应用 String.prototype.Trim = function() { return this.replace(/(^\s*) ...
- 使用MyBatis对数据库中表实现CRUD操作(二)
一.使用MyBatis对表实现CRUD操作 1.定义sql映射 userMapper.xml <?xml version="1.0" encoding="UTF-8 ...
- (转)经验分享:CSS浮动(float,clear)通俗讲解
很早以前就接触过CSS,但对于浮动始终非常迷惑,可能是自身理解能力差,也可能是没能遇到一篇通俗的教程. 前些天小菜终于搞懂了浮动的基本原理,迫不及待的分享给大家. 写在前面的话: 由于CSS内容比较多 ...
- require include 一个隐藏的用法:作用域。
最近在研究php底层框架,奇怪的一点.控制器里为什么要把从model里获取的数据 需要$this->assign('items', $items); 这种形式模板文件里才可以调用到这个变量.控制 ...
- PRINCE2的价值是什么?
很多学员在进行培训的过程中或者培训后,都会对于PRINCE2带来的价值有各种各样的看法.但是从更加官方一点的角度来说,PRINCE2会有一部分比较通用 的观点. PRINCE2 可以应用到任何类型的项 ...