fabric8io / gofabric8

CLI used when working with fabric8 running on Kubernetes or OpenShift
https://fabric8.io/
Apache License 2.0
147 stars 72 forks source link

`gofabric8 volumes` then lose ability to run commands #366

Open magick93 opened 7 years ago

magick93 commented 7 years ago

This is going to sound strange, but it has happened twice in a row now.

I have setup a new server, the host is running Centos 7, and I install OpenShift v1.5.0-rc.0+49a4a7a using OpenShift-ansible.

I then install Fabric8.

I then run gofabric8 volumes. After running this I lose the ability to run basically all commands on the server. The only command that still works is cd.

For example:

# ls
-bash: ls: command not found
[root@CentOS-73-64-minimal examples]# oc 
-bash: oc: command not found
[root@CentOS-73-64-minimal examples]# whereis oc
-bash: whereis: command not found
[root@CentOS-73-64-minimal examples]# cd ..
[root@CentOS-73-64-minimal ~]# ls
-bash: ls: command not found
[root@CentOS-73-64-minimal ~]# 
# ls
-bash: ls: command not found
[root@CentOS-73-64-minimal ~]# top
-bash: top: command not found
[root@CentOS-73-64-minimal ~]# yum
-bash: yum: command not found
[root@CentOS-73-64-minimal ~]# ps
-bash: ps: command not found
[root@CentOS-73-64-minimal ~]# 
jstrachan commented 7 years ago

gofabric8 volumes tries to run minishift ssh to execute commands inside the VM (such as making directories and chmodding - wonder if something goes wrong with the gofabric8 volumes command? Any chance of seeing its output?

BTW gofabric8 volumes is only intended for minikube and minishift. For real clusters you need to either setup a Storage class or setup some PVs. https://docs.openshift.com/container-platform/3.4/install_config/persistent_storage/dynamically_provisioning_pvs.html

magick93 commented 7 years ago

BTW gofabric8 volumes is only intended for minikube and minishift.

Why is that? Its so useful! While I can set them using a volume json file, it is so easy to be able to run one command.

magick93 commented 7 years ago

Any chance of seeing its output?

# gofabric8 volumes
             ▄▄▄▄▄▄▄         
             ███████         
     ▄▄▄▄▄▄▄ ▄▄▄▄▄▄█         
     ███████ ▀▀▀▀▀▀▀ ▄▄▄▄▄▄  
     ▄▄▄▄▄▄▄         ██████  
   ▄▄▄▄▄             ▄▄▄▄▄▄  
   ▀▄▄▄▄▄      ▄▄▄       ▄▄▄ 
    ▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄   ▄▄▄▄▄▀
      ▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█▄▄▀ 
        ▀▀▄█▄▄▄▄▄▄▄▄▄▄▄▄▄▀   
          ▄█▄▄▄█▄▄▄█▄▄▄      
          ▄█▄▄▄▄▄▄▄▄▄▄▄      
           ▄▄█▄▄▄▄▄▄▄▄       
            ▄▄▄▄▀▀▄█▄        
         ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄     
         ▀▀▀▀▀▀▀▀▀▀▀▀▀▀      
PersistentVolume name priceinsight-postgresql will be created on host path /data/priceinsight/postgresql
Recreating PVC postgresql

Any idea how I can get control (run commands) on my server again?

jstrachan commented 7 years ago

the problem trying to implement gofabric8 volumes on anything else than a single node cluster is there are a large number of different Volume providers; each with completely different custom configuration. So its hard to tool that OOTB.

The better approach is for kubernetes & openshift clusters to come pre-configured with a StorageClass so that PVCs automatically bind to the OOTB storage implementation for the cluster (e.g. gluster/ceph for openshift on premise or EBS for on AWS and google file system for GKE etc). Most kubernetes clusters you create now come with a StorageClass configured OOTB so there's no need for gofabric8 volumes at all.

So really the fix for this is for your OpenShift cluster to be configured with a proper StorageClass using whatever persistence provider you want your cluster to use; then fabric8 can just reuse PVCs on it

magick93 commented 7 years ago

Yes, I understand that there are situations where it does not make sense to use gofabric8 volumes but in the case of a single node cluster, it does.

Nonetheless, it would be nice if it degrades gracefully, or at leasts gives some kind of feedback, as opposed to breaking the ability to interact with the host.

On 12 April 2017 at 09:15, James Strachan notifications@github.com wrote:

the problem trying to implement gofabric8 volumes on anything else than a single node cluster is there are a large number of different Volume providers; each with completely different custom configuration. So its hard to tool that OOTB.

The better approach is for kubernetes & openshift clusters to come pre-configured with a StorageClass so that PVCs automatically bind to the OOTB storage implementation for the cluster (e.g. gluster/ceph for openshift on premise or EBS for on AWS and google file system for GKE etc). Most kubernetes clusters you create now come with a StorageClass configured OOTB so there's no need for gofabric8 volumes at all.

So really the fix for this is for your OpenShift cluster to be configured with a proper StorageClass using whatever persistence provider you want your cluster to use; then fabric8 can just reuse PVCs on it

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fabric8io/gofabric8/issues/366#issuecomment-293494261, or mute the thread https://github.com/notifications/unsubscribe-auth/ACEpHb9cCbRag_aa1t0_vyOujGqaBdhBks5rvHoZgaJpZM4M6NsN .