kubevirt / kubevirt-ansible

Set of Ansible roles & playbooks for KubeVirt deployment
Apache License 2.0
91 stars 72 forks source link

Cannot access storage file '/var/run/kubevirt-private/vm-disks/pvcvolume/disk.img' (as uid:107, gid:107): No such file or directory' #287

Closed shiywang closed 6 years ago

shiywang commented 6 years ago

with datevolume introduced, seems the pvc created without using importer pod ? but create a vm failed

apiVersion: v1
items:
- apiVersion: kubevirt.io/v1alpha1
  kind: VirtualMachine
  metadata:
    annotations:
      presets.virtualmachines.kubevirt.io/presets-applied: kubevirt.io/v1alpha1
    clusterName: ""
    creationTimestamp: 2018-06-14T09:45:40Z
    finalizers:
    - foregroundDeleteVirtualMachine
    generation: 1
    labels:
      kubevirt.io/nodeName: cnv-executor-shiywang-node2.example.com
    name: test-vm
    namespace: golden-images
    resourceVersion: "18642"
    selfLink: /apis/kubevirt.io/v1alpha1/namespaces/golden-images/virtualmachines/test-vm
    uid: b2b071af-6fb7-11e8-97e1-fa163ecad8f5
  spec:
    domain:
      devices:
        disks:
        - disk:
            bus: sata
          name: mydisk
          volumeName: pvcvolume
        interfaces:
        - bridge: {}
          name: default
      features:
        acpi:
          enabled: true
      firmware:
        uuid: e69d63b5-fc3a-4d29-bac9-222433e6e4f4
      machine:
        type: q35
      resources:
        requests:
          memory: 64M
    networks:
    - name: default
      pod: {}
    terminationGracePeriodSeconds: 0
    volumes:
    - name: pvcvolume
      persistentVolumeClaim:
        claimName: golden-pvc
  status:
    interfaces:
    - ipAddress: 10.130.0.17
    nodeName: cnv-executor-shiywang-node2.example.com
    phase: Failed
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""
[cnv-qe-jenkins@cnv-executor-shiywang kubevirt-ansible]$ 
[cnv-qe-jenkins@cnv-executor-shiywang kubevirt-ansible]$ oc describe vms
Name:         test-vm
Namespace:    golden-images
Labels:       kubevirt.io/nodeName=cnv-executor-shiywang-node2.example.com
Annotations:  presets.virtualmachines.kubevirt.io/presets-applied=kubevirt.io/v1alpha1
API Version:  kubevirt.io/v1alpha1
Kind:         VirtualMachine
Metadata:
  Cluster Name:        
  Creation Timestamp:  2018-06-14T09:45:40Z
  Finalizers:
    foregroundDeleteVirtualMachine
  Generation:        1
  Resource Version:  18642
  Self Link:         /apis/kubevirt.io/v1alpha1/namespaces/golden-images/virtualmachines/test-vm
  UID:               b2b071af-6fb7-11e8-97e1-fa163ecad8f5
Spec:
  Domain:
    Devices:
      Disks:
        Disk:
          Bus:        sata
        Name:         mydisk
        Volume Name:  pvcvolume
      Interfaces:
        Bridge:
        Name:  default
    Features:
      Acpi:
        Enabled:  true
    Firmware:
      Uuid:  e69d63b5-fc3a-4d29-bac9-222433e6e4f4
    Machine:
      Type:  q35
    Resources:
      Requests:
        Memory:  64M
  Networks:
    Name:  default
    Pod:
  Termination Grace Period Seconds:  0
  Volumes:
    Name:  pvcvolume
    Persistent Volume Claim:
      Claim Name:  golden-pvc
Status:
  Interfaces:
    Ip Address:  10.130.0.17
  Node Name:     cnv-executor-shiywang-node2.example.com
  Phase:         Failed
Events:
  Type     Reason              Age                 From                                                   Message
  ----     ------              ----                ----                                                   -------
  Normal   SuccessfulCreate    39m                 virtualmachine-controller                              Created virtual machine pod virt-launcher-test-vm-q2ztl
  Normal   SuccessfulHandOver  38m                 virtualmachine-controller                              Pod owner ship transferred to the node virt-launcher-test-vm-q2ztl
  Warning  SyncFailed          38m (x25 over 38m)  virt-handler, cnv-executor-shiywang-node2.example.com  server error. command Launcher.Sync failed: virError(Code=38, Domain=18, Message='Cannot access storage file '/var/run/kubevirt-private/vm-disks/pvcvolume/disk.img' (as uid:107, gid:107): No such file or directory')
  Warning  Stopped             27m                 virt-handler, cnv-executor-shiywang-node2.example.com  The VM crashed.
shiywang commented 6 years ago

@davidvossel so I check the pr description, seems the workflow is not about create a pvc and let the importer-controller scan pvc and using importer pod to write data anymore, Do you have any docs about how to use data volume to operate ?

davidvossel commented 6 years ago

@shiywang DataVolume integration with KubeVirt is incomplete. We are still defining this workflow.

More information on that can be found in this google doc. https://docs.google.com/document/d/1hFS7w_z_Y6xkqBTijDZs172o-TxWsvfPT2JLiQIMPPM/edit?usp=sharing

nellyc commented 6 years ago

closing it for now as we are testing a partial solution. @shiywang once the integration will be done, we can reopen if this is still an issue