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

Failed to configure the host path when deploying to plain kubernetes cluster (not minishift) #124

Open rawlingsj opened 8 years ago

rawlingsj commented 8 years ago

By habit I just ran gofabric8 deploy on a new kubernetes cluster without the --no-pvc and received the errors below. What's odd is the hostpath PVs were actually created though.

I wonder if we have more than 1 node, we could also check to see if there's existing PVs available which suggests the user or a service has already set them. If not prompt to ask if they plan to create them and if not warn them about lack of persistence and default to EmptyDir?

PersistentVolume name jenkins-workspace will be created on host path /data/jenkins-workspace
About to modify host paths on the VM via the command: vagrant
A Vagrant environment or target machine is required to run this
command. Run `vagrant init` to create a new Vagrant environment. Or,
get an ID of a target machine from `vagrant global-status` to run
this command on. A final option is to change to a directory with a
Vagrantfile and to try again.
exit status 1
1Failed to configure the host path /data/nexus-storage with error exit status 1
PersistentVolume name nexus-storage will be created on host path /data/nexus-storage
jimmidyson commented 8 years ago

Host path volumes are only useful on single node clusters so if there's more than one node we should advise that PVs are required for persistence & point then to docs.

We should warn the user about lack of persistence & give them the option to use empty dir, but not use empty dir without their confirmation as that could lead to confused users when they lose state.

rawlingsj commented 8 years ago

Yeah thats what I was suggesting with this:

I wonder if we have more than 1 node, we could also check to see if there's existing PVs available which suggests the user or a service has already set them. If not prompt to ask if they plan to create them and if not warn them about lack of persistence and default to EmptyDir?

I'll add that in then if we're all happy.

jimmidyson commented 8 years ago

Then we're agreed! But don't default to empty dir without user agreeing to it is my point really.