• OpenStack 删除一个计算节点


    思路

    增加计算节点大概需要 4 个事情:

    1. 加入 package 源 OpenStack packages for Ubuntu
    2. 安装时间同步服务 chrony Other nodes reference the controller node for clock synchronization
    3. 安装 nova 计算服务 Install and configure a compute node for Ubuntu
    4. 安装 Networking service 网络服务 Install and configure compute node

    删除(下线)一个计算节点的话,只需要删除 nova 计算服务 和 Networking service 网络服务

    操作步骤

    1. 删除 nova service
      root@controller:/home/dhbm# nova service-list

       +--------------------------------------+----------------+------------+----------+---------+-------+----------------------------+-----------------+-------------+
       | Id                                   | Binary         | Host       | Zone     | Status  | State | Updated_at                 | Disabled Reason | Forced down |
       +--------------------------------------+----------------+------------+----------+---------+-------+----------------------------+-----------------+-------------+
       | 8108a83f-39a4-41cb-bf66-d13d36acff1b | nova-scheduler | controller | internal | enabled | up    | 2022-11-21T06:14:46.000000 | -               | False       |
       | 77aa7e35-b7df-41f8-a5af-657100b07ea6 | nova-conductor | controller | internal | enabled | up    | 2022-11-21T06:14:46.000000 | -               | False       |
       | 5385e0fd-f5f6-4045-ab31-1a057f7324aa | nova-compute   | controller | nova     | enabled | up    | 2022-11-21T06:14:55.000000 | -               | False       |
       | 5cb981b3-96b5-42f0-b978-3ed6eb51c586 | nova-conductor | compute1   | internal | enabled | down  | -                          | -               | False       |
       | 835a0ee6-b218-4c98-96f1-966d36e1e70a | nova-scheduler | compute1   | internal | enabled | down  | -                          | -               | False       |
       | 0eb6f0a6-42b6-4210-a858-34accd88cb20 | nova-compute   | compute1   | nova     | enabled | down  | 2022-11-21T02:07:01.000000 | -               | False       |
       +--------------------------------------+----------------+------------+----------+---------+-------+----------------------------+-----------------+-------------+
      
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7
      • 8
      • 9
      • 10

      删除其中 compute1 相关的 service ID

      root@controller:/home/dhbm# nova service-delete 5cb981b3-96b5-42f0-b978-3ed6eb51c586

      root@controller:/home/dhbm# nova service-delete 835a0ee6-b218-4c98-96f1-966d36e1e70a

      root@controller:/home/dhbm# nova service-delete 0eb6f0a6-42b6-4210-a858-34accd88cb20

      最终结果
      root@controller:/home/dhbm# openstack compute service list --service nova-compute

       +----+--------------+------------+------+---------+-------+----------------------------+
       | ID | Binary       | Host       | Zone | Status  | State | Updated At                 |
       +----+--------------+------------+------+---------+-------+----------------------------+
       |  5 | nova-compute | controller | nova | enabled | up    | 2022-11-21T06:18:25.000000 |
       +----+--------------+------------+------+---------+-------+----------------------------+
      
      • 1
      • 2
      • 3
      • 4
      • 5
    2. 删除 network agent

      root@controller:/home/dhbm# openstack network agent list

       +--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
       | ID                                   | Agent Type         | Host       | Availability Zone | Alive | State | Binary                    |
       +--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
       | 326c6f4c-370a-4f06-abfb-6e7fa1bc6c67 | Linux bridge agent | controller | None              | :-)   | UP    | neutron-linuxbridge-agent |
       | 4b594d85-cc54-45b1-8264-2c692827d7ca | Linux bridge agent | compute1   | None              | XXX   | UP    | neutron-linuxbridge-agent |
       | 633c6363-6a63-4ac9-a589-41d28a1508ae | Metadata agent     | controller | None              | :-)   | UP    | neutron-metadata-agent    |
       | 9a8ead8b-2173-44f2-a102-8c1d4b4098da | L3 agent           | controller | nova              | :-)   | UP    | neutron-l3-agent          |
       | fce10fb1-f9a7-4f5e-862b-51955d52b149 | DHCP agent         | controller | nova              | :-)   | UP    | neutron-dhcp-agent        |
       +--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
      
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7
      • 8
      • 9

      删除 compute1 对应的 ID
      root@controller:/home/dhbm# openstack network agent delete 4b594d85-cc54-45b1-8264-2c692827d7ca

      最终结果
      root@controller:/home/dhbm# openstack network agent list

       +--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
       | ID                                   | Agent Type         | Host       | Availability Zone | Alive | State | Binary                    |
       +--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
       | 326c6f4c-370a-4f06-abfb-6e7fa1bc6c67 | Linux bridge agent | controller | None              | :-)   | UP    | neutron-linuxbridge-agent |
       | 633c6363-6a63-4ac9-a589-41d28a1508ae | Metadata agent     | controller | None              | :-)   | UP    | neutron-metadata-agent    |
       | 9a8ead8b-2173-44f2-a102-8c1d4b4098da | L3 agent           | controller | nova              | :-)   | UP    | neutron-l3-agent          |
       | fce10fb1-f9a7-4f5e-862b-51955d52b149 | DHCP agent         | controller | nova              | :-)   | UP    | neutron-dhcp-agent        |
       +--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
      
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7
      • 8
  • 相关阅读:
    CSS中如何实现元素的旋转和缩放效果?
    Mybatis批量插入返回主键id
    java计算机毕业设计济南旅游网站源码+mysql数据库+系统+lw文档+部署
    macOS - 处理系统更新红点
    Euro-NCAP-HWA测试流程中文版V1.1(2023发布)
    LeetCode HOT 100 —— 75 .颜色分类
    「在 Kubernetes 上运行 Pgpool-Il」实现 PostgreSQL 查询(读)负载均衡和连接池
    抽象工厂模式 rust和java的实现
    将二叉树的子树映射成一个数,用于判断子树相同
    【PAT甲级 - C++题解】1137 Final Grading
  • 原文地址:https://blog.csdn.net/u010953609/article/details/127977142