openshift / openshift-ansible

Install and config an OpenShift 3.x cluster
https://try.openshift.com
Apache License 2.0
2.18k stars 2.31k forks source link

kubectl conflict error #2155

Closed balakrishnangithub closed 8 years ago

balakrishnangithub commented 8 years ago

Ansible hosts file:

# 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_sudo must be set to true
#ansible_sudo=true

deployment_type=origin

# 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]
localhost

# host group for nodes, includes region info
[nodes]
localhost openshift_node_labels="{'region': 'infra', 'zone': 'default'}"

Install: # ansible-playbook openshift-ansible/playbooks/byo/config.yml

Ansible Error:

TASK [openshift_common : Install the base package for versioning] **************
fatal: [localhost]: FAILED! => {"changed": true, "failed": true, "msg": "warning: /var/cache/yum/x86_64/7/centos-openshift-origin/packages/origin-clients-1.2.0-4.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 2f297ecc: NOKEY\nImporting GPG key 0x2F297ECC:\n Userid     : \"CentOS PaaS SIG (https://wiki.centos.org/SpecialInterestGroup/PaaS) <security@centos.org>\"\n Fingerprint: c5e8 ab44 6fa7 893d 7490 51f1 c34c 5bd4 2f29 7ecc\n From       : /etc/pki/rpm-gpg/openshift-ansible-CentOS-SIG-PaaS\n\n\nTransaction check error:\n  file /usr/bin/kubectl from install of origin-clients-1.2.0-4.el7.x86_64 conflicts with file from package kubernetes-client-1.2.0-0.12.gita4463d9.el7.x86_64\n\nError Summary\n-------------\n\n", "rc": 1, "results": ["Loaded plugins: fastestmirror\nLoading mirror speeds from cached hostfile\n * base: ftp.iitm.ac.in\n * extras: ftp.iitm.ac.in\n * updates: ftp.iitm.ac.in\nResolving Dependencies\n--> Running transaction check\n---> Package origin.x86_64 0:1.2.0-4.el7 will be installed\n--> Processing Dependency: origin-clients = 1.2.0-4.el7 for package: origin-1.2.0-4.el7.x86_64\n--> Running transaction check\n---> Package origin-clients.x86_64 0:1.2.0-4.el7 will be installed\n--> Finished Dependency Resolution\n\nDependencies Resolved\n\n================================================================================\n Package           Arch      Version           Repository                  Size\n================================================================================\nInstalling:\n origin            x86_64    1.2.0-4.el7       centos-openshift-origin     22 M\nInstalling for dependencies:\n origin-clients    x86_64    1.2.0-4.el7       centos-openshift-origin    9.8 M\n\nTransaction Summary\n================================================================================\nInstall  1 Package (+1 Dependent package)\n\nTotal download size: 32 M\nInstalled size: 183 M\nDownloading packages:\nPublic key for origin-clients-1.2.0-4.el7.x86_64.rpm is not installed\n--------------------------------------------------------------------------------\nTotal                                              3.2 MB/s |  32 MB  00:10     \nRetrieving key from file:///etc/pki/rpm-gpg/openshift-ansible-CentOS-SIG-PaaS\nRunning transaction check\nRunning transaction test\n"]}

NO MORE HOSTS LEFT *************************************************************
        to retry, use: --limit @openshift-ansible/playbooks/byo/config.retry

PLAY RECAP *********************************************************************
localhost                  : ok=83   changed=16   unreachable=0    failed=1
detiber commented 8 years ago

@bkmagnetron I'm not sure this is a bug, the origin-clients package ships a kubectl binary just as the kubernetes-client package does.

We could potentially make the error message friendlier, but they are two conflicting packages.

balakrishnangithub commented 8 years ago

@detiber My bad!!! I forgot that I've installed Cockpit with Kubernetes. I removed it then there was no error in installation. Even though installation was successfully I'm facing issue when deploying application. I'm getting error like no node is available for the pod. I think there is something to do with Kubernetes.

Do I have to close this issue and create a new issue for that?

detiber commented 8 years ago

@bkmagnetron That might be a better discussion for the mailing lists: https://lists.openshift.redhat.com/openshiftmm/listinfo

That said, you should be able to do an oc describe dc <name of dc> and oc describe pod <name of pod> to get further information about why the scheduling is failing.