kubevirt: virt-handler: Failure to detect socket of containerdisk

What happened: The following recurring error could be seen in our CI system (on multiple lanes):

A snippet from the virt-handler’s log:

{"component":"virt-handler","kind":"","level":"info","msg":"VMI is in phase: Scheduled | Domain does not exist","name":"testvmi-dgg82","namespace":"kubevirt-test-default1","pos":"vm.go:1759","timestamp":"2023-05-30T05:14:59.863919Z","uid":"704114f4-a4dc-4a87-94b1-cfd9e29cf688"}
{"component":"virt-handler","kind":"","level":"error","msg":"Could not get owner Pid of socket /pods/6562a5b0-7d70-4a76-afc2-c6f42b7c1e87/volumes/kubernetes.io~empty-dir/container-disks/disk_0.sock","name":"testvmi-dgg82","namespace":"kubevirt-test-default1","pos":"detector.go:93","reason":"dial unix /pods/6562a5b0-7d70-4a76-afc2-c6f42b7c1e87/volumes/kubernetes.io~empty-dir/container-disks/disk_0.sock: connect: connection refused","timestamp":"2023-05-30T05:14:59.866551Z","uid":"704114f4-a4dc-4a87-94b1-cfd9e29cf688"}
{"component":"virt-handler","kind":"","level":"error","msg":"Synchronizing the VirtualMachineInstance failed.","name":"testvmi-dgg82","namespace":"kubevirt-test-default1","pos":"vm.go:1905","reason":"failed to detect socket for containerDisk disk0: dial unix /pods/6562a5b0-7d70-4a76-afc2-c6f42b7c1e87/volumes/kubernetes.io~empty-dir/container-disks/disk_0.sock: connect: connection refused","timestamp":"2023-05-30T05:14:59.866627Z","uid":"704114f4-a4dc-4a87-94b1-cfd9e29cf688"}

Here is a link to the source code producing these errors.

What you expected to happen: Expected the VMI to spin-up.

How to reproduce it (as minimally and precisely as possible): Unknown at the moment.

Additional context: Add any other context about the problem here.

Environment:

  • KubeVirt version (use virtctl version): latest main
  • Kubernetes version (use kubectl version): 1.25
  • VM or VMI specifications:
---
kind: VirtualMachineInstance
apiVersion: kubevirt.io/v1
metadata:
  name: testvmi-dgg82
  namespace: kubevirt-test-default1
  uid: 704114f4-a4dc-4a87-94b1-cfd9e29cf688
  resourceVersion: '105219'
  generation: 9
  creationTimestamp: '2023-05-30T05:14:50Z'
  labels:
    kubevirt.io/nodeName: node02
  annotations:
    kubevirt.io/latest-observed-api-version: v1
    kubevirt.io/storage-observed-api-version: v1
  finalizers:
  - foregroundDeleteVirtualMachine
  managedFields:
  - manager: Go-http-client
    operation: Update
    apiVersion: kubevirt.io/v1
    time: '2023-05-30T05:15:01Z'
    fieldsType: FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          ".": {}
          f:kubevirt.io/latest-observed-api-version: {}
          f:kubevirt.io/storage-observed-api-version: {}
        f:labels:
          ".": {}
          f:kubevirt.io/nodeName: {}
      f:spec:
        ".": {}
        f:domain:
          ".": {}
          f:devices:
            ".": {}
            f:disks: {}
            f:interfaces: {}
          f:resources:
            ".": {}
            f:requests:
              ".": {}
              f:memory: {}
        f:networks: {}
        f:nodeSelector:
          ".": {}
          f:kubernetes.io/hostname: {}
        f:terminationGracePeriodSeconds: {}
        f:volumes: {}
      f:status:
        ".": {}
        f:activePods:
          ".": {}
          f:6562a5b0-7d70-4a76-afc2-c6f42b7c1e87: {}
        f:conditions: {}
        f:guestOSInfo: {}
        f:interfaces: {}
        f:launcherContainerImageVersion: {}
        f:machine:
          ".": {}
          f:type: {}
        f:migrationMethod: {}
        f:migrationTransport: {}
        f:nodeName: {}
        f:phase: {}
        f:phaseTransitionTimestamps: {}
        f:qosClass: {}
        f:runtimeUser: {}
        f:selinuxContext: {}
        f:volumeStatus: {}
spec:
  domain:
    resources:
      requests:
        memory: 128Mi
    cpu:
      cores: 1
      sockets: 1
      threads: 1
      model: host-model
    machine:
      type: q35
    firmware:
      uuid: 1f9e10b8-5ca4-4d41-8a8c-3b559f983ac9
    features:
      acpi:
        enabled: true
    devices:
      disks:
      - name: disk0
        disk:
          bus: virtio
      - name: testdisk
        disk:
          bus: virtio
      interfaces:
      - name: default
        masquerade: {}
  nodeSelector:
    kubernetes.io/hostname: node02
  terminationGracePeriodSeconds: 0
  volumes:
  - name: disk0
    containerDisk:
      image: registry:5000/kubevirt/alpine-container-disk-demo:devel
      imagePullPolicy: IfNotPresent
  - name: testdisk
    emptyDisk:
      capacity: 1Gi
  networks:
  - name: default
    pod: {}
  architecture: amd64
status:
  nodeName: node02
  conditions:
  - type: Ready
    status: 'True'
    lastProbeTime:
    lastTransitionTime: '2023-05-30T05:14:59Z'
  - type: LiveMigratable
    status: 'True'
    lastProbeTime:
    lastTransitionTime:
  phase: Running
  phaseTransitionTimestamps:
  - phase: Pending
    phaseTransitionTimestamp: '2023-05-30T05:14:50Z'
  - phase: Scheduling
    phaseTransitionTimestamp: '2023-05-30T05:14:50Z'
  - phase: Scheduled
    phaseTransitionTimestamp: '2023-05-30T05:14:59Z'
  - phase: Running
    phaseTransitionTimestamp: '2023-05-30T05:15:01Z'
  interfaces:
  - ipAddress: 10.244.140.109
    mac: 52:54:00:e1:bb:da
    name: default
    ipAddresses:
    - 10.244.140.109
    - fd10:244::8c6b
    infoSource: domain
    queueCount: 1
  guestOSInfo: {}
  migrationMethod: BlockMigration
  migrationTransport: Unix
  qosClass: Burstable
  launcherContainerImageVersion: registry:5000/kubevirt/virt-launcher@sha256:6689b0c360763b935017b9eca3733cbc2916844a6297366ce6528a291958545b
  activePods:
    6562a5b0-7d70-4a76-afc2-c6f42b7c1e87: node02
  volumeStatus:
  - name: disk0
    target: vda
  - name: testdisk
    target: vdb
  runtimeUser: 107
  selinuxContext: system_u:object_r:container_file_t:s0:c598,c793
  machine:
    type: pc-q35-rhel9.2.0
  • Cloud provider or hardware configuration: N/A
  • OS (e.g. from /etc/os-release): N/A
  • Kernel (e.g. uname -a): N/A
  • Install tools: N/A
  • Others: N/A

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (13 by maintainers)

Most upvoted comments

@orelmisan kubenetes :1.25.6 kubevirt:1.1.1 kube-cdi:1.59.0 os:ubuntu22.04(physical machine)

install master

curl -sfL https://get-kk.kubesphere.io | VERSION=v3.0.13 sh -
 ./kk create cluster --with-kubernetes v1.26.5 --with-kubesphere v3.4.1 --container-manager containerd

add node

# make config
./kk create config --from-cluster

# add node
./kk add nodes -f sample.yaml

sample.yaml

···
spec:
  hosts:
  - {name: master1, address: 192.168.0.3, internalAddress: 192.168.0.3, user: root, password: Qcloud@123}
  - {name: node1, address: 192.168.0.4, internalAddress: 192.168.0.4, user: root, password: Qcloud@123}
  - {name: node2, address: 192.168.0.5, internalAddress: 192.168.0.5, user: root, password: Qcloud@123}
  roleGroups:
    etcd:
    - master1
    control-plane:
    - master1
    worker:
    - node1
    - node2
···

install kubevirt

export RELEASE=v1.1.1
wget https://github.com/kubevirt/kubevirt/releases/download/${RELEASE}/kubevirt-operator.yaml
kubectl apply -f kubevirt-operator.yaml
wget https://github.com/kubevirt/kubevirt/releases/download/${RELEASE}/kubevirt-cr.yaml
kubectl apply -f kubevirt-cr.yaml
kubectl -n kubevirt wait kv kubevirt --for condition=Available
wget https://github.com/kubevirt/kubevirt/releases/download/${RELEASE}/virtctl-${RELEASE}-linux-amd64
mv virtctl-${RELEASE}-linux-amd64 /usr/local/bin/virtctl
chmod +x /usr/local/bin/virtctl

export VERSION=v1.59.0
wget https://github.com/kubevirt/containerized-data-importer/releases/download/$VERSION/cdi-operator.yaml
wget https://github.com/kubevirt/containerized-data-importer/releases/download/$VERSION/cdi-cr.yaml
kubectl create -f cdi-operator.yaml
kubectl create -f cdi-cr.yaml

run vm

apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
  name: win11
spec:
  running: true
  template:
    metadata:
      labels:
        kubevirt.io/domain: win10
    spec:
      domain:
        cpu:
          cores: 8
          sockets: 8
          threads: 8
        devices:
          disks:
            - bootOrder: 1
              disk:
                bus: virtio
              name: win10-system-virtio
            - bootOrder: 2
              cdrom:
                bus: sata
              name: iso-win10
            - bootOrder: 3
              cdrom:
                bus: sata
              name: virtiocontainerdisk
          interfaces:
          - masquerade: {}
            name: default
        machine:
          type: q35
        resources:
          requests:
            memory: 16G

      networks:
      - name: default
        pod: {}

      volumes:
      - name: iso-win10
        persistentVolumeClaim:
          claimName: windows-server-2022-iso
      - name: win10-system-virtio
        persistentVolumeClaim:
            claimName:  win10-drive
      - containerDisk:
          image: kubevirt/virtio-container-disk
        name: virtiocontainerdisk

@web3creator Do you know how to reproduce it?

Hi @web3creator this issue was closed due to inactivity, I don’t know if it was actually solved.