第 4 章 执行环境
对执行环境的问题进行故障排除。
4.1. 问题 - 无法为私有自动化中心上的执行环境镜像选择 "Use in Controller" 选项
您不能将 Use in Controller 选项用于私有自动化中心上的执行环境镜像。您还会收到错误消息:"No Controllers available"。
要解决这个问题,将自动化控制器连接到您的私有自动化中心实例。
流程
在私有自动化中心上更改
/etc/pulp/settings.py
文件,并根据您的配置添加以下参数之一:单个控制器
CONNECTED_ANSIBLE_CONTROLLERS = ['<https://my.controller.node>']
负载均衡器后面的很多控制器
CONNECTED_ANSIBLE_CONTROLLERS = ['<https://my.controller.loadbalancer>']
没有负载均衡器的许多控制器
CONNECTED_ANSIBLE_CONTROLLERS = ['<https://my.controller.node1>', '<https://my.controller2.node2>']
停止所有私有自动化中心服务:
# systemctl stop pulpcore.service pulpcore-api.service pulpcore-content.service pulpcore-worker@1.service pulpcore-worker@2.service nginx.service redis.service
重启所有私有自动化中心服务:
# systemctl start pulpcore.service pulpcore-api.service pulpcore-content.service pulpcore-worker@1.service pulpcore-worker@2.service nginx.service redis.service
验证
- 验证您现在可以在私有自动化中心中使用 Use in Controller 选项。