金鱼哥RHCA回忆录:CL210管理计算资源--管理计算节点+章节实验
CL210管理计算资源–管理计算节点+章节实验
🎹 个人简介:大家好,我是 金鱼哥,CSDN运维领域新星创作者,华为云·云享专家,阿里云社区·专家博主
📚个人资质:CCNA、HCNP、CSNA(网络分析师),软考初级、中级网络工程师、RHCSA、RHCE、RHCA、RHCI、ITIL😜
💬格言:努力不一定成功,但要想成功就必须努力🔥🎈支持我:可点赞👍、可收藏⭐️、可留言📝
📜迁移和疏散导论
迁移是将服务器实例从一个计算节点移动到另一个计算节点的过程。在OpenStack中有三种不同的迁移方式。
-
在冷迁移中,如果实例处于运行状态,管理员将关闭该实例。从源计算节点将镜像的副本发送到目标计算节点。实例被重新分配到数据库中的目标主机并重新启动。
-
热迁移在不关闭电源的情况下将实例从一个主机移动到另一个主机。实例不知道它正在被移动。在迁移期间,可以维护活动客户机连接并执行工作。与此实例上的应用程序和服务通信的应用程序和用户不应该检测到中断。磁盘也必须传输并连接到目标虚拟机。磁盘传输有两种方法:基于块的存储和共享存储。
-
疏散通常发生在计算节点出现故障或进入关机模式时。疏散正在运行的计算节点是可能的,但它不被认为是疏散过程的正常用例。实例在另一个计算节点上重新生成。实例保留它们的名称、UUID、网络地址和任何其他分配的资源。如果实例磁盘不在共享存储或块存储卷上,则疏散过程是破坏性的。OpenStack选择哪些计算节点将接收疏散的实例。
📑实例迁移
可以在运行时使用openstack server migrate命令和–live选项迁移实例。要迁移已停止的实例,请使用相同的命令,但不带–live选项。在这两种情况下,管理员都使用–target将目标计算节点通知OpenStack。
–share-migration和–block-migration选项用于管理磁盘传输。默认情况下,–share-migration选项是由OpenStack实现的。红帽推荐的overcloud部署实践是使用Ceph RBD存储集群安装共享存储。可以使用基于块存储服务卷的临时或持久磁盘部署实例,而不是使用计算服务临时存储,但是与不同后端相匹配的计算节点需要基于块的迁移。
要列出特定计算节点上的服务器,请使用openstack server list命令。
可以使用openstack server migrate命令将服务器从一个计算主机迁移到另一个计算主机。注意这里没有–shared-migration或–block-migration选项。默认情况下,OpenStack选择共享存储迁移。
📑实例疏散
要使用nova host-evacuate命令执行计算节点的疏散,首先必须禁用该命令。使用openstack compute service set命令和–disable选项来禁用计算节点。
然后可以使用nova host-evacuate对禁用的计算节点进行疏散。
若要强制将服务器从一个正在运行的计算节点疏散到另一个计算节点,请使用nova host-evacuate-live命令。如果在运行的计算节点上使用nova host-evacuate命令,则返回以下错误:
通过在禁用的计算节点上使用nova host-evacuate命令或在运行的计算节点上使用nova host-evacuate -live命令,接受实例进行迁移时,将显示以下消息:
被移动的实例在移动时的状态是迁移。在它们被移动到新的计算节点后,它们的状态变为ACTIVE。
📜存储迁移
📑共享存储迁移
使用共享存储方法,如果源和目标计算节点都连接到包含迁移实例的磁盘的相同共享存储位置,并且对这些位置都有足够的访问特权,那么就不会发生物理磁盘移动。源计算节点停止使用磁盘,而目标计算节点接管磁盘活动。
当发出openstack server migrate命令时,源将实例的内存内容发送到目的地。在传输过程中,源主机上的内存页仍在实时修改。源主机跟踪在传输期间修改的内存页,并在初始批量传输完成后重新传输它们。实例的内存内容的传输速度必须快于在源虚拟机上写入内存页的速度。所有重新传输完成后,在目标主机上启动一个相同的实例。同时,虚拟网络基础结构重定向网络流量。
使用块存储的热迁移与共享存储热迁移使用类似的过程。但是,使用块存储,磁盘内容在传输内存内容之前被复制,这使得使用共享存储进行实时迁移更快、更高效。
📑热迁移配置选项
下面是在/var/lib/config-data/puppet-generated/nova_libvirt/etc/nova/nova.conf中对libvirt可用的热迁移配置选项列表及其默认值。在所有计算和HCI节点上都可以找到这个配置文件。
当一个实例接近内存副本的末尾时,它将暂停一段时间。这个停机时间允许在不受内存写入干扰的情况下复制其余的页面。这段时间的值取决于实例的大小。默认情况下是500毫秒。如果记忆拷贝没有取得预期的进展,时间会逐渐增加。使用live_migration_downtime_delay、live_migration_downtime_delay和live_migration_downtime_steps参数影响停机算法。
📑块迁移
在没有实现共享存储时,基于块的实时迁移是另一种方法。当源和目标计算节点不共享公共访问存储时,必须将根卷、临时卷、交换卷和持久卷传输到目标计算节点使用的存储位置。当主要关注性能时,应该避免基于块的实时迁移。相反,在定期进行热迁移的公共网络上实现共享存储结构。
📑基于块的实时迁移用例
红帽推荐的overcloud部署实践是使用Ceph RBD存储集群安装共享存储,但早期的用例为管理实例磁盘提供了各种配置:
-
尽管/var/lib/nova/instances可以使用GlusterFS或NFS在计算节点之间共享,但默认配置是让每个计算节点为调度到其hypervisor的每个实例维护磁盘存储。重新调度或重新部署到另一个虚拟机监控程序的实例将导致在新的计算节点上部署该实例磁盘的重复集。
-
不同的计算节点,即使在相同的网络中运行,也可以连接到不同的存储阵列、Red Hat虚拟化数据存储或其他后端存储子系统。
-
可以使用基于块存储服务卷的临时或持久磁盘部署实例,而不是使用计算服务临时存储,但是使用不同后端配置的计算节点需要基于块的迁移。
📑基于块的实时迁移的实现需求
实现基于块的实时迁移有一些具体要求:
源和目标计算节点必须位于同一子网中。
两个计算节点必须使用相同的处理器类型。
所有控制器和计算节点必须对所有其他节点具有一致的名称解析。
nova和libvirt用户的UID和GID必须在所有计算节点上相同。
计算节点必须使用KVM和libvirt,这是使用Red Hat OpenStack平台时需要的。对于实时迁移,带有libvirt平台的KVM具有最好的特性覆盖率和稳定性。
本地目录的权限和系统访问必须在所有节点之间保持一致。
libvirt必须能够在节点之间安全地通信。
源和目标计算节点都必须使用一致的多路径设备命名。实例期望在这两个位置上类似地解析多路径设备名。
📑故障排除
当迁移失败或花费的时间太长时,检查nova-compute.log中在源和目标计算节点上记录的日志文件。现在可以在控制器节点上找到scheduler、api和conductor日志文件。
📜课本练习
[student@workstation ~]$ lab computeresources-migrate setup
Setting up environment for the exercise:
. Verifying project: finance.................................. SUCCESS
. Creating user env file: developer1-finance-rc............... SUCCESS
. Creating user env file: architect1-finance-rc............... SUCCESS
. Creating keypair: example-keypair........................... SUCCESS
. Creating flavor: m1.web..................................... SUCCESS
. Creating image: rhel7....................................... SUCCESS
. Creating internal network: finance-network1................. SUCCESS
. Creating subnet: finance-subnet1............................ SUCCESS
. Creating external network: provider-datacentre.............. SUCCESS
. Creating router: finance-router1............................ SUCCESS
. Creating security group: finance-web........................ SUCCESS
. Creating port rule: ssh..................................... SUCCESS
. Creating protocol rule: icmp................................ SUCCESS
. Creating instance: finance-server1.......................... SUCCESS
. Creating instance: finance-server2.......................... SUCCESS
. Creating instance: finance-server3.......................... SUCCESS
📑1. 在工作站中,加载/home/student/architect1-finance-rc环境标识文件,然后列出计算服务。
[student@workstation ~]$ source architect1-finance-rc
[student@workstation ~(architect1-finance)]$ openstack compute service list -c Host -c Zone -c Status
+-----------------------------------+----------+---------+
| Host | Zone | Status |
+-----------------------------------+----------+---------+
| controller0.overcloud.example.com | internal | enabled |
| compute1.overcloud.example.com | nova | enabled |
| computehci0.overcloud.example.com | nova | enabled |
| compute0.overcloud.example.com | nova | enabled |
| controller0.overcloud.example.com | internal | enabled |
| controller0.overcloud.example.com | internal | enabled |
+-----------------------------------+----------+---------+
📑2. 使用openstack server list命令列出compute0和compute1上的服务器。
[student@workstation ~(architect1-finance)]$ openstack server list
+--------------------------------------+-----------------+--------+-------------------------------+-------+--------+
| ID | Name | Status | Networks | Image | Flavor |
+--------------------------------------+-----------------+--------+-------------------------------+-------+--------+
| f425aa29-8368-4168-a656-e4f8ff446aeb | finance-server3 | ACTIVE | finance-network1=192.168.1.10 | rhel7 | m1.web |
| e9b5667c-85f0-4328-983e-9e1244323c9b | finance-server2 | ACTIVE | finance-network1=192.168.1.12 | rhel7 | m1.web |
| 03f2c461-7920-4f0a-8eba-dd5ec517a62a | finance-server1 | ACTIVE | finance-network1=192.168.1.4 | rhel7 | m1.web |
+--------------------------------------+-----------------+--------+-------------------------------+-------+--------+
[student@workstation ~(architect1-finance)]$ openstack server list --host compute0.overcloud.example.com --all-projects -c ID -c Name
+--------------------------------------+-----------------+
| ID | Name |
+--------------------------------------+-----------------+
| f425aa29-8368-4168-a656-e4f8ff446aeb | finance-server3 |
| e9b5667c-85f0-4328-983e-9e1244323c9b | finance-server2 |
| 03f2c461-7920-4f0a-8eba-dd5ec517a62a | finance-server1 |
+--------------------------------------+-----------------+
[student@workstation ~(architect1-finance)]$ openstack server list --host compute1.overcloud.example.com --all-projects -c ID -c Name
[student@workstation ~(architect1-finance)]$
📑3. 将finance-server1从compute0迁移到compute1。验证服务器是否已经迁移。
[student@workstation ~(architect1-finance)]$ openstack server migrate 03f2c461-7920-4f0a-8eba-dd5ec517a62a --live compute1.overcloud.example.com
[student@workstation ~(architect1-finance)]$ openstack server list --host compute1.overcloud.example.com --all-projects -c ID -c Name
[student@workstation ~(architect1-finance)]$ openstack server list --host compute1.overcloud.example.com --all-projects -c ID -c Name
+--------------------------------------+-----------------+
| ID | Name |
+--------------------------------------+-----------------+
| 03f2c461-7920-4f0a-8eba-dd5ec517a62a | finance-server1 |
+--------------------------------------+-----------------+
[student@workstation ~(architect1-finance)]$
📑4. 迁移
在compute0上禁用nova-compute服务。疏散剩余的服务器到compute1。验证服务器被迁移到compute1。最后,在compute0上启用nova-compute服务。
[student@workstation ~(architect1-finance)]$ openstack compute service set compute0.overcloud.example.com nova-compute --disable
[student@workstation ~(architect1-finance)]$ openstack compute service list -c Binary -c Host -c Status
+------------------+-----------------------------------+----------+
| Binary | Host | Status |
+------------------+-----------------------------------+----------+
| nova-conductor | controller0.overcloud.example.com | enabled |
| nova-compute | compute1.overcloud.example.com | enabled |
| nova-compute | computehci0.overcloud.example.com | enabled |
| nova-compute | compute0.overcloud.example.com | disabled |
| nova-consoleauth | controller0.overcloud.example.com | enabled |
| nova-scheduler | controller0.overcloud.example.com | enabled |
+------------------+-----------------------------------+----------+
[student@workstation ~(architect1-finance)]$ nova host-evacuate-live compute0
[student@workstation ~(architect1-finance)]$ openstack server list --host compute1.overcloud.example.com --all-projects -c ID -c Name
+--------------------------------------+-----------------+
| ID | Name |
+--------------------------------------+-----------------+
| f425aa29-8368-4168-a656-e4f8ff446aeb | finance-server3 |
| e9b5667c-85f0-4328-983e-9e1244323c9b | finance-server2 |
| 03f2c461-7920-4f0a-8eba-dd5ec517a62a | finance-server1 |
+--------------------------------------+-----------------+
[student@workstation ~(architect1-finance)]$ openstack compute service set compute0.overcloud.example.com nova-compute --enable
[student@workstation ~(architect1-finance)]$ openstack compute service list -c Host -c Status
+-----------------------------------+---------+
| Host | Status |
+-----------------------------------+---------+
| controller0.overcloud.example.com | enabled |
| compute1.overcloud.example.com | enabled |
| computehci0.overcloud.example.com | enabled |
| compute0.overcloud.example.com | enabled |
| controller0.overcloud.example.com | enabled |
| controller0.overcloud.example.com | enabled |
+-----------------------------------+---------+
📑清除实验
[student@workstation ~]$ lab computeresources-migrate cleanup
📜章节实验
-
将实例部署到HCi节点。
-
执行紧急疏散。
-
执行块迁移。
[student@workstation ~]$ lab computeresources-review setup
Setting up environment for the exercise:
• Verifying project: production............................... SUCCESS
• Creating user env file: operator1-production-rc............. SUCCESS
• Creating user env file: architect1-production-rc............ SUCCESS
• Creating keypair: example-keypair........................... SUCCESS
. Creating flavor: default.................................... SUCCESS
. Creating image: rhel7....................................... SUCCESS
. Creating hci image: hci-image............................... SUCCESS
. Creating internal network: production-network1.............. SUCCESS
. Creating subnet: production-subnet1......................... SUCCESS
. Creating external network: provider-datacentre.............. SUCCESS
. Creating router: production-router1......................... SUCCESS
. Creating security group: production-web..................... SUCCESS
. Creating port rule: ssh..................................... SUCCESS
. Creating protocol rule: icmp................................ SUCCESS
. Creating instance: production-server1....................... SUCCESS
. Creating instance: production-server2....................... SUCCESS
. Creating instance: production-server3....................... SUCCESS
. Powering off baremetal node: compute0....................... SUCCESS
. Stopping server: compute0................................... SUCCESS
📑1.其中一个计算节点当前处于关机状态。找到已关机的计算节点并将实例疏散到另一个节点。打开计算节点的电源。
[student@workstation ~]$ ssh director
(undercloud) [stack@director ~]$ openstack baremetal node list -c Name -c 'Power State'
+-------------+-------------+
| Name | Power State |
+-------------+-------------+
| controller0 | power on |
| compute0 | power off |
| computehci0 | power on |
| compute1 | power on |
| ceph0 | power on |
+-------------+-------------+
(undercloud) [stack@director ~]$ source overcloudrc
(overcloud) [stack@director ~]$ openstack server list --host compute0.overcloud.example.com --all-projects -c ID -c Name
+--------------------------------------+--------------------+
| ID | Name |
+--------------------------------------+--------------------+
| 43016394-8338-44bd-aa56-8bff36a67a79 | production-server3 |
| 5efc2990-88e8-406a-8c55-4900e5b10b18 | production-server2 |
| b2e318bf-c0f5-440a-a96b-17bd40887296 | production-server1 |
+--------------------------------------+--------------------+
(overcloud) [stack@director ~]$ nova host-evacuate compute0
+--------------------------------------+-------------------+---------------+
| Server UUID | Evacuate Accepted | Error Message |
+--------------------------------------+-------------------+---------------+
| b2e318bf-c0f5-440a-a96b-17bd40887296 | True | |
| 5efc2990-88e8-406a-8c55-4900e5b10b18 | True | |
| 43016394-8338-44bd-aa56-8bff36a67a79 | True | |
+--------------------------------------+-------------------+---------------+
(overcloud) [stack@director ~]$ openstack server list --host compute0.overcloud.example.com --all-projects -c ID -c Name
(overcloud) [stack@director ~]$ openstack server list --host compute1.overcloud.example.com --all-projects -c ID -c Name
+--------------------------------------+--------------------+
| ID | Name |
+--------------------------------------+--------------------+
| 43016394-8338-44bd-aa56-8bff36a67a79 | production-server3 |
| 5efc2990-88e8-406a-8c55-4900e5b10b18 | production-server2 |
| b2e318bf-c0f5-440a-a96b-17bd40887296 | production-server1 |
+--------------------------------------+--------------------+
(undercloud) [stack@director ~]$ source stackrc
(undercloud) [stack@director ~]$ openstack baremetal node list -c Name -c 'Power State'
+-------------+-------------+
| Name | Power State |
+-------------+-------------+
| controller0 | power on |
| compute0 | power off |
| computehci0 | power on |
| compute1 | power on |
| ceph0 | power on |
+-------------+-------------+
(undercloud) [stack@director ~]$ openstack baremetal node power on compute0
(undercloud) [stack@director ~]$ openstack baremetal node list -c Name -c 'Power State'
+-------------+-------------+
| Name | Power State |
+-------------+-------------+
| controller0 | power on |
| compute0 | power on |
| computehci0 | power on |
| compute1 | power on |
| ceph0 | power on |
+-------------+-------------+
(undercloud) [stack@director ~]$ openstack server list
+--------------------------------------+-------------+---------+------------------------+----------------+-----------+
| ID | Name | Status | Networks | Image | Flavor |
+--------------------------------------+-------------+---------+------------------------+----------------+-----------+
| 67ec3852-e2b0-493a-b7e6-83244c6f2f08 | compute1 | ACTIVE | ctlplane=172.25.249.55 | overcloud-full | baremetal |
| 2fa177e2-3fdf-4643-9229-9f37abd0cc5e | compute0 | SHUTOFF | ctlplane=172.25.249.54 | overcloud-full | baremetal |
| 270e81d7-b905-4d8d-99d1-a8cc9cc7b17d | computehci0 | ACTIVE | ctlplane=172.25.249.59 | overcloud-full | baremetal |
| 1dfc01e4-5060-415e-a28e-4642c8bcb0f2 | controller0 | ACTIVE | ctlplane=172.25.249.57 | overcloud-full | baremetal |
| a341c1c8-cd16-4ad4-a4c7-3814b101b4dd | ceph0 | ACTIVE | ctlplane=172.25.249.58 | overcloud-full | baremetal |
+--------------------------------------+-------------+---------+------------------------+----------------+-----------+
(undercloud) [stack@director ~]$ openstack server start compute0
(undercloud) [stack@director ~]$ openstack server list
+--------------------------------------+-------------+--------+------------------------+----------------+-----------+
| ID | Name | Status | Networks | Image | Flavor |
+--------------------------------------+-------------+--------+------------------------+----------------+-----------+
| 67ec3852-e2b0-493a-b7e6-83244c6f2f08 | compute1 | ACTIVE | ctlplane=172.25.249.55 | overcloud-full | baremetal |
| 2fa177e2-3fdf-4643-9229-9f37abd0cc5e | compute0 | ACTIVE | ctlplane=172.25.249.54 | overcloud-full | baremetal |
| 270e81d7-b905-4d8d-99d1-a8cc9cc7b17d | computehci0 | ACTIVE | ctlplane=172.25.249.59 | overcloud-full | baremetal |
| 1dfc01e4-5060-415e-a28e-4642c8bcb0f2 | controller0 | ACTIVE | ctlplane=172.25.249.57 | overcloud-full | baremetal |
| a341c1c8-cd16-4ad4-a4c7-3814b101b4dd | ceph0 | ACTIVE | ctlplane=172.25.249.58 | overcloud-full | baremetal |
+--------------------------------------+-------------+--------+------------------------+----------------+-----------+
(undercloud) [stack@director ~]$ source overcloudrc
(overcloud) [stack@director ~]$ openstack compute service list -c Binary -c Host -c State
+------------------+-----------------------------------+-------+
| Binary | Host | State |
+------------------+-----------------------------------+-------+
| nova-conductor | controller0.overcloud.example.com | up |
| nova-compute | compute1.overcloud.example.com | up |
| nova-compute | computehci0.overcloud.example.com | up |
| nova-compute | compute0.overcloud.example.com | up |
| nova-consoleauth | controller0.overcloud.example.com | up |
| nova-scheduler | controller0.overcloud.example.com | up |
+------------------+-----------------------------------+-------+
📑2.作为architect1用户,创建一个名为hci-aggreqate的新aggregate。
将computehci0节点添加到hci-aggregate 聚合。设置hciaggregate 聚合的元数据。创建一个名为default-hci的新flavor,并确认computehci属性。启动一个名为hci-server1的新实例。使用default-hci flavor、hci-image镜像和production-network1网络。确认在computehci0计算节点上启动了实例。
[student@workstation ~(architect1-production)]$ openstack aggregate create hci-aggregate
+-------------------+----------------------------+
| Field | Value |
+-------------------+----------------------------+
| availability_zone | None |
| created_at | 2020-10-30T02:25:03.128821 |
| deleted | False |
| deleted_at | None |
| id | 1 |
| name | hci-aggregate |
| updated_at | None |
+-------------------+----------------------------+
[student@workstation ~(architect1-production)]$ openstack aggregate add host hci-aggregate computehci0.overcloud.example.com
+-------------------+----------------------------------------+
| Field | Value |
+-------------------+----------------------------------------+
| availability_zone | None |
| created_at | 2020-10-30T02:25:03.000000 |
| deleted | False |
| deleted_at | None |
| hosts | [u'computehci0.overcloud.example.com'] |
| id | 1 |
| metadata | {} |
| name | hci-aggregate |
| updated_at | None |
+-------------------+----------------------------------------+
[student@workstation ~(architect1-production)]$ openstack aggregate set --property computehci=true hci-aggregate
[student@workstation ~(architect1-production)]$ openstack aggregate show hci-aggregate
+-------------------+----------------------------------------+
| Field | Value |
+-------------------+----------------------------------------+
| availability_zone | None |
| created_at | 2020-10-30T02:25:03.000000 |
| deleted | False |
| deleted_at | None |
| hosts | [u'computehci0.overcloud.example.com'] |
| id | 1 |
| name | hci-aggregate |
| properties | computehci='true' |
| updated_at | None |
+-------------------+----------------------------------------+
[student@workstation ~(architect1-production)]$ openstack flavor create --ram 1024 --disk 10 --vcpus 2 --public default-hci
+----------------------------+--------------------------------------+
| Field | Value |
+----------------------------+--------------------------------------+
| OS-FLV-DISABLED:disabled | False |
| OS-FLV-EXT-DATA:ephemeral | 0 |
| disk | 10 |
| id | 9ea3bc75-7a85-490d-8af4-e6bf60d41f69 |
| name | default-hci |
| os-flavor-access:is_public | True |
| properties | |
| ram | 1024 |
| rxtx_factor | 1.0 |
| swap | |
| vcpus | 2 |
+----------------------------+--------------------------------------+
[student@workstation ~(architect1-production)]$ openstack flavor set default-hci --property computehci=true
[student@workstation ~(architect1-production)]$ openstack flavor show default-hci
+----------------------------+--------------------------------------+
| Field | Value |
+----------------------------+--------------------------------------+
| OS-FLV-DISABLED:disabled | False |
| OS-FLV-EXT-DATA:ephemeral | 0 |
| access_project_ids | None |
| disk | 10 |
| id | 9ea3bc75-7a85-490d-8af4-e6bf60d41f69 |
| name | default-hci |
| os-flavor-access:is_public | True |
| properties | computehci='true' |
| ram | 1024 |
| rxtx_factor | 1.0 |
| swap | |
| vcpus | 2 |
+----------------------------+--------------------------------------+
[student@workstation ~(architect1-production)]$ openstack server create --flavor default-hci --image hci-image --nic net-id=production-network1 --wait hci-server1
+-------------------------------------+-------------------------------------------------+
| Field | Value
+-------------------------------------+-------------------------------------------------+
| OS-DCF:diskConfig | MANUAL
| OS-EXT-AZ:availability_zone | nova
| OS-EXT-SRV-ATTR:host | computehci0.overcloud.example.com
| OS-EXT-SRV-ATTR:hypervisor_hostname | computehci0.overcloud.example.com
…………
📑3. 配置 nova使用块存储。
在compute0和compute1上重新启动nova_compute容器。确认容器的运行状况。作为architect1用户,在compute0上创建一个实例。使用默认flavor。rhel7镜像和production-network1网络。使用块迁移将实例迁移到compute1。
[student@workstation ~(architect1-production)]$ ssh compute0
Warning: Permanently added 'compute0,172.25.250.2' (ECDSA) to the list of known hosts.
[heat-admin@compute0 ~]$ sudo -i
[root@compute0 ~]# vim /var/lib/config-data/puppet-generated/nova_libvirt/etc/nova/nova.conf
[root@compute0 ~]# grep 'images_type' /var/lib/config-data/puppet-generated/nova_libvirt/etc/nova/nova.conf
#images_type=rbd
[root@compute0 ~]# docker restart nova_compute
nova_compute
[root@compute0 ~]# docker ps --format "table {{.Names}}\t{{.Status}}"
NAMES STATUS
ovn_controller Up 53 minutes
ovn_metadata_agent Up 53 minutes (healthy)
logrotate_crond Up 53 minutes
nova_compute Up 32 seconds (healthy)
nova_migration_target Up 53 minutes
ceilometer_agent_compute Up 53 minutes
iscsid Up 53 minutes
nova_libvirt Up 53 minutes
nova_virtlogd Up 53 minutes
[student@workstation ~(architect1-production)]$ ssh compute1
[heat-admin@compute1 ~]$ sudo -i
[root@compute1 ~]# vim /var/lib/config-data/puppet-generated/nova_libvirt/etc/nova/nova.conf
[root@compute1 ~]# grep 'images_type' /var/lib/config-data/puppet-generated/nova_libvirt/etc/nova/nova.conf
#images_type=rbd
[root@compute1 ~]# docker restart nova_compute
nova_compute
[root@compute1 ~]# docker ps --format "table {{.Names}}\t{{.Status}}" | grep nova
nova_compute Up 30 seconds (healthy)
nova_migration_target Up About an hour
nova_libvirt Up About an hour
nova_virtlogd Up About an hour
[student@workstation ~(architect1-production)]$ openstack server create --flavor default --image rhel7 --nic net-id=production-network1 --availability-zone nova:compute1.overcloud.example.com --wait production-server10
+-------------------------------------+-------------------------------------------------+
| Field | Value
+-------------------------------------+-------------------------------------------------+
| OS-DCF:diskConfig | MANUAL
| OS-EXT-AZ:availability_zone | nova
| OS-EXT-SRV-ATTR:host | compute1.overcloud.example.com
| OS-EXT-SRV-ATTR:hypervisor_hostname | compute1.overcloud.example.com
…………
[student@workstation ~(architect1-production)]$ openstack server migrate --live compute0.overcloud.example.com --block-migration production-server10
[student@workstation ~(architect1-production)]$ openstack server show production-server10
+-------------------------------------+-------------------------------------------------+
| Field | Value
+-------------------------------------+-------------------------------------------------+
| OS-DCF:diskConfig | MANUAL
| OS-EXT-AZ:availability_zone | nova
| OS-EXT-SRV-ATTR:host | compute0.overcloud.example.com
| OS-EXT-SRV-ATTR:hypervisor_hostname | compute0.overcloud.example.com
…………
📑实验评分
[student@workstation ~]$ lab computeresources-review grade
Grading the exercise:
. Verify the node for the three instances .................... PASS
. Verify that the aggregate exists ........................... PASS
. Verify that the flavor exists .............................. PASS
. Verify the node for hci-server1............................. PASS
. Verify the node for production-server10..................... PASS
Overall lab grade.............................................. PASS
📑清除实验
[student@workstation ~]$ lab computeresources-review cleanup
💡总结
-
实例启动过程。
-
调度器进程接收来自conductor(指挥器)的资源请求。然后,请求被发送到放置服务,该服务运行一个查询来查找可以满足资源需求的可用计算节点。然后将列表发送回调度器服务。调度器使用筛选器来优化搜索,并创建一个计算节点的排序列表。然后,调度器从列表中选择第一个,conductor尝试构建实例。
-
红帽OpenStack平台在版本13中包含了安置服务。一个新的RESTful API用于解决共享存储的问题。通用资源池解决了容量和使用信息不正确的问题。
-
超融合节点将计算和存储结合在同一个节点上。在超融合节点中,Ceph一直被用作存储组件。超融合存储比标准存储节点更便宜、更灵活。
-
资源约束是确定的,以确保Ceph和计算服务不会相互干扰。
-
迁移是将服务器实例从一个计算节点移动到另一个计算节点的过程。疏散通常在计算节点进入故障或关闭模式时发生。在这种情况下,计算节点上的所有实例都被移动到另一个节点。实例可以在运行时使用共享存储或块存储进行迁移。
RHCA认证需要经历5门的学习与考试,还是需要花不少时间去学习与备考的,好好加油,可以噶🤪。
以上就是【金鱼哥】对 第七章 管理计算资源–管理计算节点+章节实验 的简述和讲解。希望能对看到此文章的小伙伴有所帮助。
💾红帽认证专栏系列:
RHCSA专栏:戏说 RHCSA 认证
RHCE专栏:戏说 RHCE 认证
此文章收录在RHCA专栏:RHCA 回忆录
如果这篇【文章】有帮助到你,希望可以给【金鱼哥】点个赞👍,创作不易,相比官方的陈述,我更喜欢用【通俗易懂】的文笔去讲解每一个知识点。
如果有对【运维技术】感兴趣,也欢迎关注❤️❤️❤️ 【金鱼哥】❤️❤️❤️,我将会给你带来巨大的【收获与惊喜】💕💕!
- 点赞
- 收藏
- 关注作者
评论(0)