gluster / gluster-kubernetes

GlusterFS Native Storage Service for Kubernetes
Apache License 2.0
875 stars 389 forks source link

Unable to get gk-deploy-minikube to work #574

Open darkedges opened 5 years ago

darkedges commented 5 years ago

I am using https://github.com/gluster/gluster-kubernetes/blob/master/deploy/gk-deploy-minikube within a minikube 1.0.0 on windows (amd64) deployment via a git-bash command line to get bash support. It appears to have multiple problems.

Created using a default installation minikube start --cpus 2 --memory 8196

  1. crashes out with

    ./gk-deploy-minikube
    + minikube ssh '        sudo truncate -s 10G /mnt/vda1/heketi-bricks.img        && sudo losetup /dev/loop1 /mnt/vda1/heketi-bricks.img  && sudo pvcreate /dev/loop1 '
    truncate: cannot open '/mnt/vda1/heketi-bricks.img' for writing: No such file or directory
    ssh: Process exited with status 1

    can resolve this using

    minikube ssh 'sudo mkdir -p /mnt/vda1'
  2. crashes out with

    $ ./gk-deploy-minikube
    + minikube ssh '        sudo truncate -s 10G /mnt/vda1/heketi-bricks.img        && sudo losetup /dev/loop1 /mnt/vda1/heketi-bricks.img  && sudo pvcreate /dev/loop1 '
    Physical volume "/dev/loop1" successfully created.
    + /c/development/github/gluster/gluster-kubernetes/deploy/gk-deploy --yes --single-node --cli kubectl --deploy-gluster /c/development/github/gluster/gluster-kubernetes/deploy/topology-minikube.json
    Traceback (most recent call last):
    File "<stdin>", line 6, in <module>
    IOError: [Errno 2] No such file or directory: '/c/development/github/gluster/gluster-kubernetes/deploy/topology-minikube.json'
    Using Kubernetes CLI.
    Using namespace "default".
    Checking for pre-existing resources...
    GlusterFS pods ... not found.
    deploy-heketi pod ... not found.
    heketi pod ... not found.
    gluster-s3 pod ... not found.
    Creating initial resources ... serviceaccount/heketi-service-account created
    clusterrolebinding.rbac.authorization.k8s.io/heketi-sa-view created
    clusterrolebinding.rbac.authorization.k8s.io/heketi-sa-view labeled
    OK
    error: resource(s) were provided, but no name, label selector, or --all flag specified
    Failed to label node ''

I can fix this by changing https://github.com/gluster/gluster-kubernetes/blob/master/deploy/gk-deploy-minikube#L29 from ${SCRIPT_DIR}/gk-deploy --yes --single-node --cli ${CLI} --deploy-gluster ${SCRIPT_DIR}/${TOPOLOGY} to ${SCRIPT_DIR}/gk-deploy --yes --single-node --cli ${CLI} --deploy-gluster ./${TOPOLOGY}

  1. Timeout Waiting for GlusterFS pods to start ...

Seems that the service has failed to start within the pod

● glusterd.service                               loaded failed     failed          GlusterFS, a clustered file-system server

[root@minikube /]# systemctl status glusterd.service
● glusterd.service - GlusterFS, a clustered file-system server
   Loaded: loaded (/usr/lib/systemd/system/glusterd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sun 2019-03-31 01:16:17 UTC; 50s ago
  Process: 67 ExecStart=/usr/sbin/glusterd -p /var/run/glusterd.pid --log-level $LOG_LEVEL $GLUSTERD_OPTIONS (code=exited, status=255)

Mar 31 01:16:17 minikube systemd[1]: Starting GlusterFS, a clustered file-system server...
Mar 31 01:16:17 minikube glusterd[67]: USAGE: /usr/sbin/glusterd [options] [mountpoint]
Mar 31 01:16:17 minikube systemd[1]: glusterd.service: control process exited, code=exited status=255
Mar 31 01:16:17 minikube systemd[1]: Failed to start GlusterFS, a clustered file-system server.
Mar 31 01:16:17 minikube systemd[1]: Unit glusterd.service entered failed state.
Mar 31 01:16:17 minikube systemd[1]: glusterd.service failed.

Any ideas on what I am doing wrong?

I am trying to try out the CSI functionality, but need a base to start from.

Regards Nicholas Irving