Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install fails with oc: command not found #140

Open
Kyle-Payne opened this issue Jan 27, 2019 · 10 comments
Open

install fails with oc: command not found #140

Kyle-Payne opened this issue Jan 27, 2019 · 10 comments

Comments

@Kyle-Payne
Copy link

I tried installing this a number of times tonight but I keep getting errors that it can't find the OC command. I saw other posts about this which said it was fixed in 3.11. but I'm running 3.11. I'm attaching the install text output.

I see I get this very early on.

TASK [Run variable sanity checks] *****************************************************************************************************
fatal: [10.10.10.139]: FAILED! => {"msg": "last_checked_host: 10.10.10.139, last_checked_var: openshift_master_identity_providers;Found removed variables: openshift_node_kubelet_args is replaced by openshift_node_groups[].edits; "}
to retry, use: --limit @/root/installcentos/openshift-ansible/playbooks/prerequisites.retry
install-output.txt

@albertolaley
Copy link

I have the same issue

@DarkMukke
Copy link
Contributor

Since 3.10, openshift_node_kubelet_args is deprecated.
Personally i commented it out, since it will fall back to the defaults and I can always set my nodes per host later, first 2 command are to clean the server of what it tried to install (from the official docs)

Also make sure SELinux is enabled or the install will fail.

yum -y remove openshift openshift-* etcd docker
rm -rf /etc/openshift /var/lib/openshift /etc/etcd \
    /var/lib/etcd /etc/sysconfig/openshift* /etc/sysconfig/docker* \
    /root/.kube/config /etc/ansible/facts.d /usr/share/openshift
export SCRIPT_REPO=https://raw.githubusercontent.com/DarkMukke/installcentos/master
cd ~/installcentos && ./install-openshift.sh

I also found that the client is no longer shipped with the server:
openshift/origin#4773

wget -qO- https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz | tar xzv
cd openshift-origin-client-*
cp kubectl /usr/local/bin/ && cp oc /usr/local/bin/

But you might not need to install the oc manually if the installer runs completely.
After all that the install went fine

Although for whatever reasont he ansible-playbook for logging returned a non-zero, so i reran if afer:

ansible-playbook -i inventory.ini openshift-ansible/playbooks/openshift-logging/config.yml

And the second time it ran just fine. No idea what happened there

@andloh
Copy link

andloh commented Jan 28, 2019

same issue

@faisalwaseem
Copy link

faisalwaseem commented Jan 29, 2019

Since 3.10, openshift_node_kubelet_args is deprecated.
Personally i commented it out, since it will fall back to the defaults and I can always set my nodes per host later, first 2 command are to clean the server of what it tried to install (from the official docs)

Also make sure SELinux is enabled or the install will fail.

yum -y remove openshift openshift-* etcd docker
rm -rf /etc/openshift /var/lib/openshift /etc/etcd \
    /var/lib/etcd /etc/sysconfig/openshift* /etc/sysconfig/docker* \
    /root/.kube/config /etc/ansible/facts.d /usr/share/openshift
export SCRIPT_REPO=https://raw.githubusercontent.com/DarkMukke/installcentos/master
cd ~/installcentos && ./install-openshift.sh

I also found that the client is no longer shipped with the server:
openshift/origin#4773

wget -qO- https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz | tar xzv
cd openshift-origin-client-*
cp kubectl /usr/local/bin/ && cp oc /usr/local/bin/

But you might not need to install the oc manually if the installer runs completely.
After all that the install went fine

Although for whatever reasont he ansible-playbook for logging returned a non-zero, so i reran if afer:

ansible-playbook -i inventory.ini openshift-ansible/playbooks/openshift-logging/config.yml

And the second time it ran just fine. No idea what happened there

For some reason its sitting at docker setting for me.

Sorry figured out Docker was having issues. Sorted thanks again for the update.

@wrohandi
Copy link

@DarkMukke thanks, it works.

This issue was also confirmed on openshift-ansible project (openshift/openshift-ansible#11069).

In conclusion, what I did was:

DarkMukke added a commit to DarkMukke/installcentos that referenced this issue Jan 29, 2019
@be4ndr
Copy link

be4ndr commented Jan 30, 2019

Since 3.10, openshift_node_kubelet_args is deprecated.
Personally i commented it out, since it will fall back to the defaults and I can always set my nodes per host later, first 2 command are to clean the server of what it tried to install (from the official docs)
Also make sure SELinux is enabled or the install will fail.

yum -y remove openshift openshift-* etcd docker
rm -rf /etc/openshift /var/lib/openshift /etc/etcd \
    /var/lib/etcd /etc/sysconfig/openshift* /etc/sysconfig/docker* \
    /root/.kube/config /etc/ansible/facts.d /usr/share/openshift
export SCRIPT_REPO=https://raw.githubusercontent.com/DarkMukke/installcentos/master
cd ~/installcentos && ./install-openshift.sh

I also found that the client is no longer shipped with the server:
openshift/origin#4773

wget -qO- https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz | tar xzv
cd openshift-origin-client-*
cp kubectl /usr/local/bin/ && cp oc /usr/local/bin/

But you might not need to install the oc manually if the installer runs completely.
After all that the install went fine
Although for whatever reasont he ansible-playbook for logging returned a non-zero, so i reran if afer:

ansible-playbook -i inventory.ini openshift-ansible/playbooks/openshift-logging/config.yml

And the second time it ran just fine. No idea what happened there

For some reason its sitting at docker setting for me.

Sorry figured out Docker was having issues. Sorted thanks again for the update.

I have the same issue.
What did you do to fix the issue with the Docker?

@faisalwaseem
Copy link

Since 3.10, openshift_node_kubelet_args is deprecated.
Personally i commented it out, since it will fall back to the defaults and I can always set my nodes per host later, first 2 command are to clean the server of what it tried to install (from the official docs)
Also make sure SELinux is enabled or the install will fail.

yum -y remove openshift openshift-* etcd docker
rm -rf /etc/openshift /var/lib/openshift /etc/etcd \
    /var/lib/etcd /etc/sysconfig/openshift* /etc/sysconfig/docker* \
    /root/.kube/config /etc/ansible/facts.d /usr/share/openshift
export SCRIPT_REPO=https://raw.githubusercontent.com/DarkMukke/installcentos/master
cd ~/installcentos && ./install-openshift.sh

I also found that the client is no longer shipped with the server:
openshift/origin#4773

wget -qO- https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz | tar xzv
cd openshift-origin-client-*
cp kubectl /usr/local/bin/ && cp oc /usr/local/bin/

But you might not need to install the oc manually if the installer runs completely.
After all that the install went fine
Although for whatever reasont he ansible-playbook for logging returned a non-zero, so i reran if afer:

ansible-playbook -i inventory.ini openshift-ansible/playbooks/openshift-logging/config.yml

And the second time it ran just fine. No idea what happened there

For some reason its sitting at docker setting for me.
Sorry figured out Docker was having issues. Sorted thanks again for the update.

I have the same issue.
What did you do to fix the issue with the Docker?

I un-installed docker. Cleaned up the directories. Rebooted OS and clean installed Docker manually to ensure it started properly. Just monitor the logs on docker startup to see if you have any wonky errors being thrown.

@marpe4k
Copy link

marpe4k commented Jan 31, 2019

I had the same issue;
TASK [Run variable sanity checks]
fatal: [x.x.x.x] FAILED ...

I was able to run the installation with the informations above :-)

my solution:
forked the repo: gshipley/installcentos

in myrepo changed
inventory.ini
removed line 27 "openshift_node_kubelet_args={'pods-per-core': ['10']}"

install-openshift.sh
changed SCRIPT_REPO to "myrepo"
export SCRIPT_REPO=${SCRIPT_REPO:="https://raw.githubusercontent.com/myrepo/installcentos/master"}

made a new CentOS7 install
cloned my git repo
run the installation with
./install-openshift.sh

install is working again, hope this helps
Thanks to all :-)

@DarkMukke
Copy link
Contributor

no need to fork, i already forked you can use my repo, there is also a PR open to remove the like as 10 pods per core has been the default since OKD/Openshift 3.3

marekjelen pushed a commit that referenced this issue Jan 31, 2019
* Replaced variable removed

last_checked_var: openshift_master_identity_providers;Found removed variables: openshift_node_kubelet_args is replaced by openshift_node_groups[<item>].edits;

Since the install fails ont he above and the inventory.ini file is downloaded every time fromt eh configured repo I had to fork and commit this.
without the node_groups, it will all back to the default.

* Update inventory.ini
@albertolaley
Copy link

Since 3.10, openshift_node_kubelet_args is deprecated.
Personally i commented it out, since it will fall back to the defaults and I can always set my nodes per host later, first 2 command are to clean the server of what it tried to install (from the official docs)

Also make sure SELinux is enabled or the install will fail.

yum -y remove openshift openshift-* etcd docker
rm -rf /etc/openshift /var/lib/openshift /etc/etcd \
    /var/lib/etcd /etc/sysconfig/openshift* /etc/sysconfig/docker* \
    /root/.kube/config /etc/ansible/facts.d /usr/share/openshift
export SCRIPT_REPO=https://raw.githubusercontent.com/DarkMukke/installcentos/master
cd ~/installcentos && ./install-openshift.sh

I also found that the client is no longer shipped with the server:
openshift/origin#4773

wget -qO- https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz | tar xzv
cd openshift-origin-client-*
cp kubectl /usr/local/bin/ && cp oc /usr/local/bin/

But you might not need to install the oc manually if the installer runs completely.
After all that the install went fine

Although for whatever reasont he ansible-playbook for logging returned a non-zero, so i reran if afer:

ansible-playbook -i inventory.ini openshift-ansible/playbooks/openshift-logging/config.yml

And the second time it ran just fine. No idea what happened there

It works.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants