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

PetSets PV controller Error #524

Closed
Nalum opened this issue Aug 25, 2016 · 7 comments
Closed

PetSets PV controller Error #524

Nalum opened this issue Aug 25, 2016 · 7 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@Nalum
Copy link

Nalum commented Aug 25, 2016

Minikube version: v0.8.0
Environment:

  • OS:

PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

  • VM Driver: virtualbox
  • Docker version: Docker version 1.12.1, build 23cf638

What happened:
Create a PetSet with volumeClaimTemplates, a PVC was created but a host path PV was not created.

$ kuDEVn describe pvc mongodb-node-0
Name:       mongodb-node-0
Namespace:  dev-nalum
Status:     Pending
Volume:     
Labels:     name=node
        role=mongodb
        version=3.2
Capacity:   
Access Modes:   
Events:
  FirstSeen LastSeen    Count   From                SubobjectPath   Type        Reason          Message
  --------- --------    -----   ----                -------------   --------    ------          -------
  5m        12s     25  {persistentvolume-controller }          Warning     ProvisioningFailed  No provisioner plugin found for the claim!

What you expected to happen:
Expected a host path PV to be created to fill the PVC based on this: https://github.com/kubernetes/kubernetes/blob/v1.3.5/examples/experimental/persistent-volume-provisioning/README.md

Specifically:

A fourth provisioner is included for testing and development only. It creates HostPath volumes, which will never work outside of a single node cluster. It is not supported in any way except for local for testing and development.

Perhaps this only means for testing and development of kubernetes?

To enable it requires setting the kubernetes flag --enable-hostpath-provisioner=true

How to reproduce it:
Create the following PetSet:

---

apiVersion: apps/v1alpha1
kind: PetSet
metadata:
  name: node
  labels:
    name: node
    version: "3.2"
    role: mongodb
spec:
  replicas: 1
  serviceName: mongodb
  template:
    metadata:
      name: node
      labels:
        version: "3.2"
        name: node
        role: mongodb
      annotations:
        prometheus.io/scrape: "true"
        prometheus.io/port: "9001"
        pod.alpha.kubernetes.io/initialized: "true"
    spec:
      terminationGracePeriodSeconds: 0
      containers:
      - name: node
        image: mongo:3.2
        env:
        - name: NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        command:
        - mongod
        args:
        - --replSet
        - dev
        - --bind_ip
        - 0.0.0.0
        ports:
        - containerPort: 27017
          name: node
        volumeMounts:
        - name: mongodb
          mountPath: /data
  volumeClaimTemplates:
  - metadata:
      name: mongodb
      annotations:
        volume.alpha.kubernetes.io/storage-class: anything
    spec:
      accessModes: [ "ReadWriteOnce" ]
      resources:
        requests:
          storage: 6Gi
@dlorenc
Copy link
Contributor

dlorenc commented Aug 25, 2016

Seems like we can enable this flag in the controller-manager with something like this:

config.VolumeConfiguration.EnableDynamicProvisioning = true

Does anyone know if there are downsides to just enabling this always?

@dlorenc dlorenc added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 25, 2016
@Nalum
Copy link
Author

Nalum commented Aug 26, 2016

It would also be good to make sure that the directory the PV creates are persisted.

I'm not sure if there is a way to specify a path for the Dynamic Provisioning to use.

@dlorenc
Copy link
Contributor

dlorenc commented Aug 26, 2016

@Nalum good idea. Do you know where it typically creates the PVs?

@Nalum
Copy link
Author

Nalum commented Aug 26, 2016

I do not. I've only started looking at petsets. If I get a bit of time I'll find out over the weekend.

@r2d4
Copy link
Contributor

r2d4 commented Sep 14, 2016

Needs this commit to be cherry picked kubernetes/kubernetes#32582

@dlorenc
Copy link
Contributor

dlorenc commented Sep 14, 2016

Or we can change the config we pass to localkube now to include all the strings we need.

@dlorenc dlorenc removed this from the 0.10 Release milestone Sep 15, 2016
@dlorenc
Copy link
Contributor

dlorenc commented Oct 7, 2016

This should now be available on 1.4 which is defailt in 0.11

@dlorenc dlorenc closed this as completed Oct 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

4 participants