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

VM Config Disk resides in same datastore of template even when we provide storagepolicy in spec. #1858

Closed
phogatsachin opened this issue Apr 4, 2023 · 4 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@phogatsachin
Copy link

phogatsachin commented Apr 4, 2023

/kind bug

When vm are created by cluster api provider vsphere with datastore mentioned, hard disk is located in mentioned datastore but Configuration Disk for the vm is stored in same datastore as template used to clone the vm.

VSphereMachine Spec:

spec:
  additionalDisksGiB: 100
  cloneMode: fullClone
  datacenter: DELDC1
  diskGiB: 100
  memoryMiB: 4096
  network:
    devices:
    - gateway4: 100.65.27.97
      ipAddrs:
      - 100.65.27.121/27
      nameservers:
      - 8.8.8.8
      networkName: P-95
  numCPUs: 2
  providerID: vsphere://421dab89-a309-ccf2-f8e0-ed5e2c9191ad
  storagePolicyName: NA-SSD-StoragePolicy
  template: rhel-7-kube-v1.22.15

image
As we can see the Configuration Disk resides in the datastore of template and Hard Disk are located in mentioned datastore. This is causing template datastore to fill up over period of time causing datastore being completely filled over period of time and all the vms running with that datastore to go into hung state.

What did you expect to happen:
All VM disk should be in the mentioned datastore.

  • Cluster-api-provider-vsphere version: v1.5.1
  • Kubernetes version: (use kubectl version): 1.22.15
  • OS (e.g. from /etc/os-release): Rhel-7
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Apr 4, 2023
@phogatsachin phogatsachin changed the title VM Config Disk resides in same datastore of template even when we provide Datastore in spec. VM Config Disk resides in same datastore of template even when we provide storagepolicy in spec. Apr 4, 2023
@phogatsachin
Copy link
Author

I have tested a fix locally. We have to make changes in pkg/services/govmomi/vcenter/clone.go file. Basically we need to set "spec.Location.Datastore = datastoreRef" not only for datastore use case, we should set this for all the cases, be it storagepolicy selected datastore or default datastore.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 5, 2023
@chrischdi
Copy link
Member

This should be fixed via #2134 .

/close

Feel free to reopen if there are still issues with this.

@k8s-ci-robot
Copy link
Contributor

@chrischdi: Closing this issue.

In response to this:

This should be fixed via #2134 .

/close

Feel free to reopen if there are still issues with this.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

4 participants