0

Attempting to recreate all my assets from a fresh openshift (except for my PVC), I deleted everything ($ oc delete all --all; oc delete configmap --all; oc delete secret -l namespace=visor). I did this so I could be certain my 'oc process -f template' did a complete job.

This deleted the glusterfs-dynamic Services that I didn't realize were required to mount PVCs (persistent volume claims).

Solution 1: Recreate the Services

  • I recreated the services so that they look just like similar glusterfs-dynamic services, but that's not enough; even if the IP address matches, the PVC are still not mountable ('endpoints "glusterfs-dynamic-xxx" not found')

Solution 2: Copy data from old PVC to new PVC

  • To copy, I need to be able to access the PVC from a pod--I can't mount the PVC...

My attempt at recreating the service:

      - apiVersion: v1
        kind: Service
        metadata:
          labels:
            gluster.kubernetes.io/provisioned-for-pvc: prom-a-pvc
            namespace: visor
          name: glusterfs-dynamic-615a9bfa-57d9-11e9-b511-001a4a195f6a
          namespace: visor
        spec:
          ports:
            - port: 1
              protocol: TCP
              targetPort: 1
          sessionAffinity: None
          type: ClusterIP

I want to be able to mount my PVCs.

But instead I get this error: MountVolume.NewMounter initialization failed for volume "pvc-89647bcb-6df4-11e9-bd79-001a4a195f6a" : endpoints "glusterfs-dynamic-89647bcb-6df4-11e9-bd79-001a4a195f6a" not found

Weston Greene
  • 43
  • 2
  • 8

1 Answers1

1

Figured it out. Woot. There was also an "endpoints" asset that got deleted that I had to recreate:

    - apiVersion: v1
      kind: Service
      metadata:
        labels:
          gluster.kubernetes.io/provisioned-for-pvc: prom-a-pvc
          namespace: visor
        name: glusterfs-dynamic-615a9bfa-57d9-11e9-b511-001a4a195f6a
        namespace: visor
      spec:
        ports:
          - port: 1
            protocol: TCP
            targetPort: 1
        sessionAffinity: None
        type: ClusterIP

    - apiVersion: v1
      kind: Endpoints
      metadata:
        labels:
          gluster.kubernetes.io/provisioned-for-pvc: prom-a-pvc
        name: glusterfs-dynamic-615a9bfa-57d9-11e9-b511-001a4a195f6a
        namespace: visor
      subsets:
      - addresses:
        - ip: 10.25.6.231
        - ip: 10.25.6.232
        - ip: 10.27.6.241
        - ip: 10.27.6.242
        - ip: 10.5.6.221
        - ip: 10.5.6.222
        ports:
        - port: 1
          protocol: TCP

I used theses commands to see what I needed to include in my yaml:

$ oc get endpoints

$ oc edit endpoints glusterfs-dynamic-820de1e7-6df6-11e9-bd79-001a4a195f6a

Links:

Weston Greene
  • 43
  • 2
  • 8