7.6. 更新中央位置
使用示例过程配置和部署所有边缘站点后,在中央位置更新配置,以便中央镜像服务可以将镜像推送到边缘站点。
此流程重启镜像服务(glance),并中断任何长时间运行的镜像服务进程。例如,如果镜像从中央镜像服务服务器复制到 DCN 镜像服务服务器,则该镜像副本会中断,您必须重启它。如需更多信息,请参阅 中断镜像服务进程后清除数据。
流程
创建一个类似如下的
~/central/glance_update.yaml文件。这个示例包括两个边缘站点的配置,dcn0 和 dcn1 :parameter_defaults: GlanceEnabledImportMethods: web-download,copy-image GlanceBackend: rbd GlanceStoreDescription: 'central rbd glance store' CephClusterName: central GlanceBackendID: central GlanceMultistoreConfig: dcn0: GlanceBackend: rbd GlanceStoreDescription: 'dcn0 rbd glance store' CephClientUserName: 'openstack' CephClusterName: dcn0 GlanceBackendID: dcn0 dcn1: GlanceBackend: rbd GlanceStoreDescription: 'dcn1 rbd glance store' CephClientUserName: 'openstack' CephClusterName: dcn1 GlanceBackendID: dcn1创建
dcn_ceph.yaml文件。在以下示例中,此文件将中央站点上的 glance 服务配置为边缘站点的 Ceph 集群的客户端,即dcn0和dcn1。openstack overcloud export ceph \ --stack dcn0,dcn1 \ --output-file ~/central/dcn_ceph.yaml使用原始模板重新部署中央站点,并包含新创建的
dcn_ceph.yaml和glance_update.yaml文件。openstack overcloud deploy \ --deployed-server \ --stack central \ --templates /usr/share/openstack-tripleo-heat-templates/ \ -r ~/control-plane/central_roles.yaml \ -n ~/network-data.yaml \ -e /usr/share/openstack-tripleo-heat-templates/environments/network-environment.yaml \ -e /usr/share/openstack-tripleo-heat-templates/environments/podman.yaml \ -e /usr/share/openstack-tripleo-heat-templates/environments/dcn-storage.yaml \ -e /usr/share/openstack-tripleo-heat-templates/environments/cephadm/cephadm.yaml \ -e /usr/share/openstack-tripleo-heat-templates/environments/nova-az-config.yaml \ -e /home/stack/central/overcloud-networks-deployed.yaml \ -e /home/stack/central/overcloud-vip-deployed.yaml \ -e /home/stack/central/deployed_metal.yaml \ -e /home/stack/central/deployed_ceph.yaml \ -e /home/stack/central/dcn_ceph.yaml \ -e /home/stack/central/glance_update.yaml
openstack overcloud deploy \
--stack central \
--templates /usr/share/openstack-tripleo-heat-templates/ \
-r ~/central/central_roles.yaml \
...
-e /usr/share/openstack-tripleo-heat-templates/environments/cephadm/cephadm.yaml \
-e /usr/share/openstack-tripleo-heat-templates/environments/nova-az-config.yaml \
-e ~/central/central-images-env.yaml \
-e ~/central/role-counts.yaml \
-e ~/central/site-name.yaml
-e ~/central/ceph.yaml \
-e ~/central/ceph_keys.yaml \
-e ~/central/glance.yaml \
-e ~/central/dcn_ceph_external.yaml
在位于中央位置的控制器上,重新启动
cinder-volume服务。如果您使用cinder-backup服务部署中央位置,则还要重启cinder-backup服务:ssh tripleo-admin@controller-0 sudo pcs resource restart openstack-cinder-volume ssh tripleo-admin@controller-0 sudo pcs resource restart openstack-cinder-backup
7.6.1. 在中断镜像服务进程后清除数据 复制链接链接已复制到粘贴板!
重启中央位置时,任何长时间运行的镜像服务(glance)进程都会中断。在重启这些进程前,您必须首先清理您重启的 Controller 节点上的数据,并在 Ceph 和镜像服务数据库中。
流程
检查并清除重启的 Controller 节点中的 Reidual 数据。将 staging 存储的
glance-api.conf文件中的文件与镜像服务数据库中对应的镜像进行比较,如 <image_ID>.raw。- 如果这些对应的镜像显示导入状态,您必须重新创建镜像。
- 如果镜像显示 active 状态,则必须从 staging 中删除数据并重启副本导入。
-
检查和清除 Ceph 存储中的遗留数据。从暂存区域清理的镜像必须具有包含镜像的 Ceph 存储的
stores属性中的匹配记录。Ceph 中的镜像名称是镜像服务数据库中的 image id。 清除镜像服务数据库。从导入作业中清除处于导入状态的镜像:
$ glance image-delete <image_id>