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

[Bug]: dsm pod unresponsive, unless DISK_FMT set to QCOW #784

Open
SlavikCA opened this issue Jul 12, 2024 · 2 comments
Open

[Bug]: dsm pod unresponsive, unless DISK_FMT set to QCOW #784

SlavikCA opened this issue Jul 12, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@SlavikCA
Copy link
Contributor

SlavikCA commented Jul 12, 2024

Operating system

Harvester 1.3.1 with Longhorn

Description

I deploy virtual-dsm with Kubernetes manifest.
I added 2 discs:

  • 380GB of SSD
  • 2TB of HDD

And found, that dsm is unresponsive unless I set DISK_FMT to QCOW2.
If it's not set - I can't connect to dsm via the network.

Also, when I DISK_FMT is not set to QCOW2, the CPU usage is 100%.

Is it because dsm tried to write over 2TB upon start?

Kubernetes manifest

apiVersion: v1
kind: Pod
metadata:
  name: dsm
  labels:
    name: dsm
  namespace: dsm
  annotations:
    # https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/docs/how-to-use.md#launch-pod-with-json-annotation
    k8s.v1.cni.cncf.io/networks: '[ { "name": "untagged","namespace": "default","mac": "aa:fa:1b:fb:1a:54","interface": "net2" } ]'
spec:
  terminationGracePeriodSeconds: 120 # the Kubernetes default is 30 seconds and it may be not enough
  containers:
    - name: dsm
      image: vdsm/virtual-dsm
      resources:
        limits:
          devices.kubevirt.io/vhost-net: 1
          memory: "9Gi"
          cpu: "4"
        requests:
          cpu: 200m
          memory: "1Gi"
      securityContext:
        privileged: true
        capabilities:
          add: ["NET_ADMIN"]
      env:
        - name: RAM_SIZE
          value: 8G
        - name: CPU_CORES
          value: "4"
        - name: DISK_SIZE # shall be set to PVC size in Gi * 0.974
          value: "375G"
        - name: DISK2_SIZE
          value: "2000G"
        - name: DISK_FMT
          value: "qcow2" # qcow2 does not allocate the total disk size, but grows with the data
        - name: DHCP
          value: "Y"
        - name: VM_NET_DEV
          value: "net2"
      volumeMounts:
        - mountPath: /storage
          name: dsm-ssd
        - mountPath: /storage2
          name: dsm-hdd
        - mountPath: /dev/kvm
          name: dev-kvm
  volumes:
    - name: dsm-ssd
      persistentVolumeClaim:
        claimName: dsm-ssd-pvc
    - name: dsm-hdd
      persistentVolumeClaim:
        claimName: dsm-hdd-pvc
    - name: dev-kvm
      hostPath:
        path: /dev/kvm

Docker log

firstBootWithQCOW.txt

firstBootWithoutQCOW.txt

Screenshots (optional)

No response

@SlavikCA SlavikCA added the bug Something isn't working label Jul 12, 2024
@kroese
Copy link
Collaborator

kroese commented Aug 18, 2024

You can try to set

        - name: ALLOCATE
          value: "N"

This ALLOCATE flag will decide if all the diskspace is pre-allocated or not. That way you can still use RAW but not wait untill 2TB is reserved.

@SlavikCA
Copy link
Contributor Author

I would be curious to know more:

As far as I can see, setting DISK_FMT to qcow2 doesn't allocate space, and setting ALLOCATE can be used for the same goal in case if DISK_FMT not set. Right?

What the default value of DISK_FMT? Is it raw?

What's the technical difference between raw and qcow2?

Can switching to raw help with issues mentioned in #783 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants