У меня возникает несколько проблем при попытке установить Openshift 3 с помощью ansible. Все ошибки различаются при каждой установке, но они всегда связаны с парой узлов.
Версия
openshift-ansible from git repo: openshift-ansible-3.6.173.0.32-1
ansible: 2.3.0.0
Действия по воспроизведению
ansible-playbook playbooks/byo/config.yml
Вот моя настоящая инструкция:
# to be save in /etc/ansible/hosts.
# coming from https://docs.openshift.org/latest/install_config/install/advanced_install.html#single-master
# Create an OSEv3 group that contains the masters and nodes groups
[OSEv3:children]
masters
nodes
# Set variables common for all OSEv3 hosts
[OSEv3:vars]
# SSH user, this user should allow ssh based auth without requiring a password
ansible_ssh_user=root
# If ansible_ssh_user is not root, ansible_become must be set to true
#ansible_become=true
openshift_deployment_type=origin
openshift_disable_check=memory_availability
# uncomment the following to enable htpasswd authentication; defaults to DenyAllPasswordIdentityProvider
#openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider', 'filename': '/etc/origin/master/htpasswd'}]
# host group for masters
[masters]
master.my-site.com
# host group for etcd
[etcd]
master.my-site.com
# host group for nodes, includes region info
[nodes]
node1.my-site.com openshift_node_labels="{'region': 'primary', 'zone': 'default'}"
node2.my-site.com openshift_node_labels="{'region': 'primary', 'zone': 'default'}"
infra-node1.my-site.com openshift_node_labels="{'region': 'infra', 'zone': 'default'}"
infra-node2.my-site.com openshift_node_labels="{'region': 'infra', 'zone': 'default'}"
По сути, это скопированная копия той, что есть в документации, за исключением того, что я изменил зоны для своих узлов.
Важное примечание: Может быть, я делаю что-то неправильно: node1.my-site.com разрешает тот же IP-адрес, что и infra-node1.my-site.com, node2.my-site.com разрешает тот же IP-адрес, что и infra-node2.my-site. com
Я не знаю, правильный ли это способ, но в документации они просто говорят о двух узлах, поэтому я подозревал, что он должен был разрешать один и тот же IP-адрес.
Наблюдаемые результаты
Примерно через 10 или 20 минут развертывание завершится ошибкой со случайными ошибками:
Failure summary:
1. Host: node2.my-site.com
Play: Verify Requirements
Task: openshift_health_check
Message: One or more checks failed
Details: check "docker_storage":
Some dependencies are required in order to query docker storage on host:
Unable to install required packages on this host:
python-docker-py
Failure talking to yum: [Errno 2] No such file or directory: '/var/cache/yum/x86_64/7/epel/gen/primary_db.sqlite'
check "package_availability":
Error with yum repository configuration: updates: Check uncompressed DB failed
2. Host: infra-node2.my-site.com
Play: Verify Requirements
Task: openshift_health_check
Message: One or more checks failed
Details: check "docker_storage":
Some dependencies are required in order to query docker storage on host:
Unable to install required packages on this host:
python-docker-py
Failure talking to yum: updates: Check uncompressed DB failed
Это было странно '/var/cache/yum/x86_64/7/epel/gen/primary_db.sqlite'
была ли проверка
Failure summary:
1. Host: infra-node1.my-site.com
Play: Verify Requirements
Task: openshift_health_check
Message: One or more checks failed
Details: check "package_version":
MODULE FAILURE
check "package_availability":
Error with yum repository configuration: File /var/cache/yum/x86_64/7/epel/metalink.xml is not XML
2. Host: node1.my-site.com
Play: Verify Requirements
Task: openshift_health_check
Message: One or more checks failed
Details: check "package_version":
MODULE FAILURE
3. Host: infra-node2.my-site.com
Play: Verify Requirements
Task: openshift_health_check
Message: One or more checks failed
Details: check "package_version":
MODULE FAILURE
check "package_availability":
Error with yum repository configuration: File /var/cache/yum/x86_64/7/epel/metalink.xml does not exist
4. Host: node2.my-site.com
Play: Verify Requirements
Task: openshift_health_check
Message: One or more checks failed
Details: check "package_version":
MODULE FAILURE
check "package_availability":
Error with yum repository configuration: File /var/cache/yum/x86_64/7/epel/metalink.xml does not exist
Этот файл не был XML, я подтверждаю:
<?xml version="1.0" encoding="utf-8"?>
<metalink version="3.0" xmlns="http://www.metalinker.org/" type="dynamic" pubdate="Tue, 12 Sep 2017 20:22:13 GMT" generator="mirrormanager" xmlns:mm0="http://fedorahosted.org/mirrormanager">
<files>
<file name="repomd.xml">
<resources maxconnections="1">
<url protocol="blablabla">http://blablabla</url>
...
...
<url protocol="blablabla">http://blablabla</url>
</resources>
</file>
</files>
</metalink>
x86_64/repodata/repomd.xml</url> <==== What?????
<url protocol="blablabla">http://blablabla</url>
</resources>
</file>
</files>
</metalink>
Третья ошибка Я вообще не понимаю, так как это old.tmp (там был repomd.xml)
Failure summary:
1. Host: infra-node1.my-site.com
Play: Disable excluders
Task: openshift_excluder : Install docker excluder
Message: Failure talking to yum: [Errno 2] No such file or directory: '/var/cache/yum/x86_64/7/centos-openshift-origin/repomd.xml.old.tmp'
Другой:
Failure summary:
1. Host: node2.my-site.com
Play: Verify Requirements
Task: openshift_health_check
Message: One or more checks failed
Details: check "package_availability":
Error with yum repository configuration: updates: Check uncompressed DB failed
2. Host: infra-node2.my-site.com
Play: Verify Requirements
Task: openshift_health_check
Message: One or more checks failed
Details: check "package_availability":
Error with yum repository configuration: updates: Check uncompressed DB failed
И последний:
Failure summary:
1. Host: node1.my-site.com
Play: Verify Requirements
Task: openshift_health_check
Message: One or more checks failed
Details: check "package_availability":
Unexpected error with yum repository: [Errno 2] No such file or directory: '/var/cache/yum/x86_64/7/epel/gen/primary_db.sqlite'
2. Host: node2.my-site.com
Play: Verify Requirements
Task: openshift_health_check
Message: One or more checks failed
Details: check "package_version":
MODULE FAILURE
check "package_availability":
Unexpected error with yum repository: /builddir/build/BUILD/Python-2.7.5/Objects/stringobject.c:3902: bad argument to internal function
3. Host: infra-node2.my-site.com
Play: Verify Requirements
Task: openshift_health_check
Message: One or more checks failed
Details: check "package_availability":
Unexpected error with yum install/update: database disk image is malformed
Дополнительная информация
Предоставьте любую дополнительную информацию, которая может помочь нам диагностировать проблему.
centos-release-7-3.1611.el7.centos.x86_64
попробуйте эту ссылку, очень хорошее объяснение. https://keithtenzer.com/2017/08/11/openshift-3-6-fast-track-everything-you-need-nothing-you-dont/