IBM Cloud Private 2.1.0.3条件检查失败

时间:2018-06-06 11:31:33

标签: docker ibm-cloud-private

我正在尝试安装IBM私有云社区版,但是从安装说明中执行sudo docker run命令很困难:

> sudo docker run --net=host -t -e LICENSE=accept -v "$(pwd)":/installer/cluster ibmcom/icp-inception:2.1.0.3 install

当我执行它时,会返回以下输出并显示错误消息(下方):

user@kim:/opt/ibm-cloud-private-ce-2.1.0.3/cluster$ sudo docker run --net=host -t -e LICENSE=accept -v "$(pwd)":/installer/cluster ibmcom/icp-inception:2.1.0.3 install

PLAY [Checking Python interpreter] *********************************************

TASK [Checking Python interpreter] *********************************************
changed: [127.0.0.1]

PLAY [Checking prerequisites] **************************************************

TASK [Gathering Facts] *********************************************************
ok: [127.0.0.1]

TASK [docker-engine-check : Getting Docker engine version] *********************
changed: [127.0.0.1]

TASK [docker-engine-check : Checking docker engine if installed] ***************
changed: [127.0.0.1]

TASK [docker-engine : include] *************************************************

TASK [docker-engine : include] *************************************************

TASK [containerd-engine-check : Getting containerd version] ********************

TASK [containerd-engine-check : Checking cri-containerd if installed] **********

TASK [containerd-engine : include] *********************************************

TASK [containerd-engine : include] *********************************************

TASK [network-check : Checking for the network pre-check file] *****************
ok: [127.0.0.1 -> localhost]

TASK [network-check : include_tasks] *******************************************
included: /installer/playbook/roles/network-check/tasks/calico.yaml for 127.0.0.1

TASK [network-check : Calico Validation - Verifying hostname for lowercase] ****

TASK [network-check : Calico Validation - Initializing interface list to be verified] ***
ok: [127.0.0.1]

TASK [network-check : Calico Validation - Finding Interface when autodetection_method is first-found] ***

TASK [network-check : Calico Validation - Updating regex string to match interfaces to be excluded] ***

TASK [network-check : Calico Validation - Getting list of interfaces to be considered] ***

TASK [network-check : Calico Validation - Excluding default interface if defined] ***

TASK [network-check : Calico Validation - Finding Interface reg-ex when autodetection_method is interface(reg-ex)] ***

TASK [network-check : Calico Validation -  Finding Interface when autodetection_method is interface(reg-ex)] ***

TASK [network-check : Calico Validation - Finding Domain/IP when autodetection_method is can-reach] ***
ok: [127.0.0.1]

TASK [network-check : Calico Validation -  Finding IP for the Domain when autodetection_method is can-reach] ***
changed: [127.0.0.1]

TASK [network-check : Calico Validation - Finding Interface when autodetection_method is can-reach] ***
changed: [127.0.0.1]

TASK [network-check : Calico Validation - Finding Interface when lo is found] ***
changed: [127.0.0.1]

TASK [network-check : Calico Validation - Finding Interface when autodetection_method is can-reach] ***
ok: [127.0.0.1]

TASK [network-check : Calico Validation - Finding MTU for the detected Interface(s)] ***
fatal: [127.0.0.1]: FAILED! => {"msg": "The conditional check 'hostvars[inventory_hostname]['ansible_'~item]['mtu'] is defined' failed. The error was: error while evaluating conditional (hostvars[inventory_hostname]['ansible_'~item]['mtu'] is defined): 'dict object' has no attribute u'ansible_'\n\nThe error appears to have been in '/installer/playbook/roles/network-check/tasks/calico.yaml': line 86, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n    - name: Calico Validation - Finding MTU for the detected Interface(s)\n      ^ here\n"}

NO MORE HOSTS LEFT *************************************************************

NO MORE HOSTS LEFT *************************************************************

PLAY RECAP *********************************************************************
127.0.0.1                  : ok=12   changed=6    unreachable=0    failed=1   

Playbook run took 0 days, 0 hours, 0 minutes, 13 seconds

user@kim:/opt/ibm-cloud-private-ce-2.1.0.3/cluster$

我正在使用Docker版本17.12.1-ce在Ubuntu 14.04上工作,构建7390fc6。

我的主机文件如下所示:

[master]
127.0.0.1 ansible_user="user" ansible_ssh_pass="6CEd29CN" ansible_become=true ansible_become_pass="6CEd29CN" ansible_port="22" ansible_ssh_common_args="-oPubkeyAuthentication=no" 

[worker]
127.0.0.1 ansible_user="user" ansible_ssh_pass="6CEd29CN" ansible_become=true ansible_become_pass="6CEd29CN" ansible_port="22" ansible_ssh_common_args="-oPubkeyAuthentication=no" 

[proxy]
127.0.0.1 ansible_user="user" ansible_ssh_pass="6CEd29CN" ansible_become=true ansible_become_pass="6CEd29CN" ansible_port="22" ansible_ssh_common_args="-oPubkeyAuthentication=no" 

#[management]
#4.4.4.4

#[va]
#5.5.5.5

yaml.cfg文件如下所示:

# Licensed Materials - Property of IBM
# IBM Cloud private
# @ Copyright IBM Corp. 2017 All Rights Reserved
# US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

---

###### docker0: 172.17.0.1
###### eth0: 192.168.240.14

## Network Settings
network_type: calico
# network_helm_chart_path: < helm chart path >

## Network in IPv4 CIDR format
network_cidr: 127.0.0.1/8

## Kubernetes Settings
service_cluster_ip_range: 127.0.0.1/24

## Makes the Kubelet start if swap is enabled on the node. Remove
## this if your production env want to disble swap.
kubelet_extra_args: ["--fail-swap-on=false"]

# cluster_domain: cluster.local
# cluster_name: mycluster
# cluster_CA_domain: "{{ cluster_name }}.icp"
# cluster_zone: "myzone"
# cluster_region: "myregion"

## Etcd Settings
etcd_extra_args: ["--grpc-keepalive-timeout=0", "--grpc-keepalive-interval=0", "--snapshot-count=10000"]

## General Settings
# wait_for_timeout: 600
# docker_api_timeout: 100

## Advanced Settings
default_admin_user: user
default_admin_password: 6CEd29CN
# ansible_user: <username>
# ansible_become: true
# ansible_become_password: <password>

## Kubernetes Settings
# kube_apiserver_extra_args: []
# kube_controller_manager_extra_args: []
# kube_proxy_extra_args: []
# kube_scheduler_extra_args: []

## Enable Kubernetes Audit Log
# auditlog_enabled: false

## GlusterFS Settings
# glusterfs: false

## GlusterFS Storage Settings
# storage:
#  - kind: glusterfs
#    nodes:
#      - ip: <worker_node_m_IP_address>
#        device: <link path>/<symlink of device aaa>,<link path>/<symlink of device bbb>
#      - ip: <worker_node_n_IP_address>
#        device: <link path>/<symlink of device ccc>
#      - ip: <worker_node_o_IP_address>
#        device: <link path>/<symlink of device ddd>
#    storage_class:
#      name:
#      default: false
#      volumetype: replicate:3

## Network Settings
## Calico Network Settings
# calico_ipip_enabled: true
# calico_tunnel_mtu: 1430
calico_ip_autodetection_method: can-reach=127.0.0.1

## IPSec mesh Settings
## If user wants to configure IPSec mesh, the following parameters
## should be configured through config.yaml
# ipsec_mesh:
#   enable: true
#   interface: <interface name on which IPsec will be enabled>
#   subnets: []
#   exclude_ips: "<list of IP addresses separated by a comma>"

# kube_apiserver_secure_port: 8001

## External loadbalancer IP or domain
## Or floating IP in OpenStack environment
# cluster_lb_address: none

## External loadbalancer IP or domain
## Or floating IP in OpenStack environment
# proxy_lb_address: none

## Install in firewall enabled mode
# firewall_enabled: false

## Allow loopback dns server in cluster nodes
# loopback_dns: false

## High Availability Settings
# vip_manager: etcd

## High Availability Settings for master nodes
# vip_iface: eth0
# cluster_vip: 127.0.1.1

## High Availability Settings for Proxy nodes
# proxy_vip_iface: eth0
# proxy_vip: 127.0.1.1

## Federation cluster Settings
# federation_enabled: false
# federation_cluster: federation-cluster
# federation_domain: cluster.federation
# federation_apiserver_extra_args: []
# federation_controllermanager_extra_args: []
# federation_external_policy_engine_enabled: false

## vSphere cloud provider Settings
## If user wants to configure vSphere as cloud provider, vsphere_conf
## parameters should be configured through config.yaml
# kubelet_nodename: hostname
# cloud_provider: vsphere
# vsphere_conf:
#    user: <vCenter username for vSphere cloud provider>
#    password: <password for vCenter user>
#    server: <vCenter server IP or FQDN>
#    port: [vCenter Server Port; default: 443]
#    insecure_flag: [set to 1 if vCenter uses a self-signed certificate]
#    datacenter: <datacenter name on which Node VMs are deployed>
#    datastore: <default datastore to be used for provisioning volumes>
#    working_dir: <vCenter VM folder path in which node VMs are located>

## Disabled Management Services Settings
## You can disable the following management services: ["service-catalog", "metering", "monitoring", "istio", "vulnerability-advisor", "custom-metrics-adapter"]
disabled_management_services: ["istio", "vulnerability-advisor", "custom-metrics-adapter"]

## Docker Settings
# docker_env: []
# docker_extra_args: []
## The maximum size of the log before it is rolled
# docker_log_max_size: 50m
## The maximum number of log files that can be present
# docker_log_max_file: 10
## Install/upgrade docker version
# docker_version: 17.12.1
## ICP install docker automatically
# install_docker: true

## Ingress Controller Settings
## You can add your ingress controller configuration, and the allowed configuration can refer to
## https://github.com/kubernetes/ingress-nginx/blob/nginx-0.9.0/docs/user-guide/configmap.md#configuration-options
# ingress_controller:
#   disable-access-log: 'true'

## Clean metrics indices in Elasticsearch older than this number of days
# metrics_max_age: 1

## Clean application log indices in Elasticsearch older than this number of days
# logs_maxage: 1

## Uncomment the line below to install Kibana as a managed service.
# kibana_install: true


# STARTING_CLOUDANT

# cloudant:
#   namespace: kube-system
#   pullPolicy: IfNotPresent
#   pvPath: /opt/ibm/cfc/cloudant
#   database:
#     password: fdrreedfddfreeedffde
#     federatorCommand: hostname
#     federationIdentifier: "-0"
#     readinessProbePeriodSeconds: 2
#     readinessProbeInitialDelaySeconds: 90

# END_CLOUDANT

我的目标是在我的本地计算机(单节点)上设置ICP,我非常感谢有关此问题的任何帮助。

3 个答案:

答案 0 :(得分:2)

所以我通过取消注释并将# calico_ipip_enabled: true设置为false来解决此错误。

之后虽然因为我的环回ip而出现了另一个错误:

fatal: [127.0.0.1] => A loopback IP is used in your DNS server configuration. For more details, see https://ibm.biz/dns-fails.

但是通过设置链接中提到的loopback_dns: true可以解决问题/解决方法。

我无法在此解决此问题,但这就是我解决问题的方法。

答案 1 :(得分:0)

IBM Cloud私有支持的操作系统是ubuntu 16.04。请检查以下网址 https://www.ibm.com/support/knowledgecenter/SSBS6K_2.1.0.3/supported_system_config/supported_os.html

请检查系统要求..

我也在尝试安装设置..我没有遇到这个问题。

答案 2 :(得分:0)

通常,我们不能在ICP主机文件中指定127.0.0.1作为ICP节点,谢谢。