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

feature-gates: add support for VolumeSnapshotDataSource #8343

Closed
asoltesz opened this issue Jun 1, 2020 · 2 comments · Fixed by #8461
Closed

feature-gates: add support for VolumeSnapshotDataSource #8343

asoltesz opened this issue Jun 1, 2020 · 2 comments · Fixed by #8461
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. kind/support Categorizes issue or PR as a support question. priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@asoltesz
Copy link

asoltesz commented Jun 1, 2020

Minikube does not seem to support volume snapshots even with the appropriate feature gate activated.

This makes it very hard to test functionality based on it (e.g.: VolumeSnapshot based backup in Stash or Velero)

Steps to reproduce the issue:

  1. Create new Minikube instance
minikube start \
    --feature-gates="VolumeSnapshotDataSource=true" \
    --driver="kvm2"

Startup log:

😄  minikube v1.11.0 on Ubuntu 20.04
✨  Using the kvm2 driver based on user configuration
💾  Downloading driver docker-machine-driver-kvm2:
    > docker-machine-driver-kvm2.sha256: 65 B / 65 B [-------] 100.00% ? p/s 0s
    > docker-machine-driver-kvm2: 13.88 MiB / 13.88 MiB  100.00% 2.92 MiB p/s 5
💿  Downloading VM boot image ...
    > minikube-v1.11.0.iso.sha256: 65 B / 65 B [-------------] 100.00% ? p/s 0s
    > minikube-v1.11.0.iso: 174.99 MiB / 174.99 MiB  100.00% 1.14 MiB p/s 2m34s
👍  Starting control plane node minikube in cluster minikube
💾  Downloading Kubernetes v1.18.3 preload ...
    > preloaded-images-k8s-v3-v1.18.3-docker-overlay2-amd64.tar.lz4: 526.01 MiB
🔥  Creating kvm2 VM (CPUs=2, Memory=2200MB, Disk=20000MB) ...
🐳  Preparing Kubernetes v1.18.3 on Docker 19.03.8 ...
🔎  Verifying Kubernetes components...
🌟  Enabled addons: default-storageclass, storage-provisioner
🏄  Done! kubectl is now configured to use "minikube"

❗  /usr/local/bin/kubectl is version 1.15.2, which may be incompatible with Kubernetes 1.18.3.
💡  You can also use 'minikube kubectl -- get pods' to invoke a matching version
  1. Check if minikube is ready
kubectl get nodes
NAME       STATUS   ROLES    AGE   VERSION
minikube   Ready    master   13m   v1.18.3
  1. Query VolumeSnapshots
kubectl get volumesnapshot

Full output of failed command:

error: the server doesn't have a resource type "volumesnapshot"

The full log with --alsologtostderr:

❯ minikube kubectl get volumesnapshot --alsologtostderr
I0601 12:48:20.192244 2462981 mustload.go:64] Loading cluster: minikube
I0601 12:48:20.194420 2462981 main.go:110] libmachine: Found binary path at /home/sola/.minikube/bin/docker-machine-driver-kvm2
I0601 12:48:20.194555 2462981 main.go:110] libmachine: Launching plugin server for driver kvm2
I0601 12:48:20.265075 2462981 main.go:110] libmachine: Plugin server listening at address 127.0.0.1:40307
I0601 12:48:20.266402 2462981 main.go:110] libmachine: () Calling .GetVersion
I0601 12:48:20.268004 2462981 main.go:110] libmachine: Using API Version  1
I0601 12:48:20.268103 2462981 main.go:110] libmachine: () Calling .SetConfigRaw
I0601 12:48:20.269193 2462981 main.go:110] libmachine: () Calling .GetMachineName
I0601 12:48:20.269705 2462981 main.go:110] libmachine: (minikube) Calling .GetState
I0601 12:48:20.274816 2462981 host.go:65] Checking if "minikube" exists ...
I0601 12:48:20.276546 2462981 main.go:110] libmachine: Found binary path at /home/sola/.minikube/bin/docker-machine-driver-kvm2
I0601 12:48:20.276864 2462981 main.go:110] libmachine: Launching plugin server for driver kvm2
I0601 12:48:20.341136 2462981 main.go:110] libmachine: Plugin server listening at address 127.0.0.1:33015
I0601 12:48:20.342434 2462981 main.go:110] libmachine: () Calling .GetVersion
I0601 12:48:20.344648 2462981 main.go:110] libmachine: Using API Version  1
I0601 12:48:20.344730 2462981 main.go:110] libmachine: () Calling .SetConfigRaw
I0601 12:48:20.345901 2462981 main.go:110] libmachine: () Calling .GetMachineName
I0601 12:48:20.346651 2462981 main.go:110] libmachine: (minikube) Calling .DriverName
I0601 12:48:20.347331 2462981 api_server.go:145] Checking apiserver status ...
I0601 12:48:20.347542 2462981 ssh_runner.go:148] Run: sudo pgrep -xnf kube-apiserver.*minikube.*
I0601 12:48:20.347618 2462981 main.go:110] libmachine: (minikube) Calling .GetSSHHostname
I0601 12:48:20.360787 2462981 main.go:110] libmachine: (minikube) Calling .GetSSHPort
I0601 12:48:20.361357 2462981 main.go:110] libmachine: (minikube) Calling .GetSSHKeyPath
I0601 12:48:20.361757 2462981 main.go:110] libmachine: (minikube) Calling .GetSSHUsername
I0601 12:48:20.362167 2462981 sshutil.go:44] new ssh client: &{IP:192.168.39.85 Port:22 SSHKeyPath:/home/sola/.minikube/machines/minikube/id_rsa Username:docker}
I0601 12:48:20.634288 2462981 ssh_runner.go:148] Run: sudo egrep ^[0-9]+:freezer: /proc/3218/cgroup
I0601 12:48:20.658027 2462981 api_server.go:161] apiserver freezer: "2:freezer:/kubepods.slice/kubepods-burstable.slice/kubepods-burstable-pod53d7a7ff031a824e2ec4f5c5864c09b2.slice/docker-3c1e9218222569135d4767776afe8fc0374bef0519a342156a623aecc2f2dfa6.scope"
I0601 12:48:20.658332 2462981 ssh_runner.go:148] Run: sudo cat /sys/fs/cgroup/freezer/kubepods.slice/kubepods-burstable.slice/kubepods-burstable-pod53d7a7ff031a824e2ec4f5c5864c09b2.slice/docker-3c1e9218222569135d4767776afe8fc0374bef0519a342156a623aecc2f2dfa6.scope/freezer.state
I0601 12:48:20.687608 2462981 api_server.go:183] freezer state: "THAWED"
I0601 12:48:20.687702 2462981 api_server.go:193] Checking apiserver healthz at https://192.168.39.85:8443/healthz ...
I0601 12:48:20.717078 2462981 api_server.go:213] https://192.168.39.85:8443/healthz returned 200:
ok
I0601 12:48:20.717267 2462981 binary.go:56] Not caching binary, using https://storage.googleapis.com/kubernetes-release/release/v1.18.3/bin/linux/amd64/kubectl?checksum=file:https://storage.googleapis.com/kubernetes-release/release/v1.18.3/bin/linux/amd64/kubectl.sha256
I0601 12:48:20.717306 2462981 kubectl.go:51] Running  [get volumesnapshot]
error: the server doesn't have a resource type "volumesnapshot"

Full output of minikube start command used, if not already included:

included above

Optional: Full output of minikube logs command:

@RA489 RA489 added the kind/support Categorizes issue or PR as a support question. label Jun 3, 2020
@medyagh medyagh added the kind/feature Categorizes issue or PR as related to a new feature. label Jun 8, 2020
@medyagh medyagh changed the title No VolumeSnapshot support in minikube feature-gates: add support for VolumeSnapshotDataSource Jun 8, 2020
@medyagh medyagh added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. priority/backlog Higher priority than priority/awaiting-more-evidence. labels Jun 8, 2020
@medyagh
Copy link
Member

medyagh commented Jun 8, 2020

I would be happy to review any PR that adds this feature.

@11janci
Copy link
Contributor

11janci commented Jun 12, 2020

Pls see my PR above (still in progress as I want to test it a bit more thoroughly, however it appears to be working). The volume snaphots feature is an addon and installed by default during minikube start (similarly as in k8s from v1.17). I still need to check if the feature gate is turned on by default or not. However explicitly setting it through cmdline should work.

Any comments are welcome.

EDIT: verified the flag is enabled by default, was able to test the snapshots. The PR is ready for review now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. kind/support Categorizes issue or PR as a support question. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants