Bug 1869527 - VM disk io can't worked if namespace have label kubemacpool
Summary: VM disk io can't worked if namespace have label kubemacpool
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Networking
Version: 2.4.1
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: 2.5.0
Assignee: Ram Lavi
QA Contact: Meni Yakove
URL:
Whiteboard:
: 1876475 (view as bug list)
Depends On:
Blocks: 1869645 1901480
TreeView+ depends on / blocked
 
Reported: 2020-08-18 08:26 UTC by zhe peng
Modified: 2020-12-07 09:54 UTC (History)
7 users (show)

Fixed In Version: 2.5.0
Doc Type: Known Issue
Doc Text:
Cause: When KubeMacPool sets an allocated MAC on a VM, it may overwrite some of the newly added attributes. Consequence: VM disk `io` attribute is not kept on VMs if KubeMacPool is enabled on given namespace. Workaround (if any): Don't use `io` or disable KubeMacPool on the namespace. Result:
Clone Of:
: 1869645 1876475 1901480 (view as bug list)
Environment:
Last Closed: 2020-12-07 09:54:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
namespace (1.82 KB, text/plain)
2020-08-18 08:34 UTC, zhe peng
no flags Details
vm yaml file (662 bytes, text/plain)
2020-08-18 08:36 UTC, zhe peng
no flags Details
ns-virt-disk-io.yaml (523 bytes, text/plain)
2020-10-12 12:59 UTC, Yossi Segev
no flags Details

Description zhe peng 2020-08-18 08:26:08 UTC
Description of problem:
Disk io can't worked if namespace have label
mutatevirtualmachines.kubemacpool.io: allocate

Version-Release number of selected component (if applicable):
2.4.1

How reproducible:
always

Steps to Reproduce:
1. create a namespace with label kubemacpool
$ oc describe namespace virt-general-disk-io-option
Name:         virt-general-disk-io-option
Labels:       mutatevirtualmachines.kubemacpool.io=allocate
Annotations:  openshift.io/description:
              openshift.io/display-name:
              openshift.io/requester: unprivileged-user
              openshift.io/sa.scc.mcs: s0:c25,c10
              openshift.io/sa.scc.supplemental-groups: 1000620000/10000
              openshift.io/sa.scc.uid-range: 1000620000/10000
Status:       Active

No resource quota.

No LimitRange resource.

2. create a vm with disk io configuration
$cat vm.yaml
....
        devices:
          disks:
          - disk:
              bus: virtio
            io: native
            name: containerdisk
....
$oc create -f vm.yaml
3.check vm 
$oc get vm -o yaml
....
            - disk:
                bus: virtio
              name: containerdisk
          machine:
            type: pc-q35-rhel8.2.0
....
Actual results:
no disk io configuration

Expected results:
should have disk io
...
            - disk:
                bus: virtio
              io: native
              name: containerdisk
          machine:
            type: pc-q35-rhel8.2.0
...
Additional info:
if remove the label of namespace and create vm, disk io worked well.

Comment 1 zhe peng 2020-08-18 08:34:58 UTC
Created attachment 1711703 [details]
namespace

Comment 2 zhe peng 2020-08-18 08:36:11 UTC
Created attachment 1711704 [details]
vm yaml file

Comment 3 Petr Horáček 2020-08-18 08:56:05 UTC
Targeting for 2.5. In 2.4.1, we should keep a release note describing the issue.

Comment 5 Lavanya Mandavilli 2020-08-19 18:27:27 UTC
@phoracek @ipinto - please complete your review of the PR for this defect:

https://github.com/openshift/openshift-docs/pull/24904

Comment 8 Lavanya Mandavilli 2020-08-21 12:34:09 UTC
SME review was completed for this PR by @phoracek:

https://github.com/openshift/openshift-docs/pull/24904

Currently the PR is in peer review.

Comment 9 Lavanya Mandavilli 2020-08-21 15:36:02 UTC
@dcritch, @phoracek, @ipinto,

Please see the PR:
https://github.com/openshift/openshift-docs/pull/24904

The peer reviewer has requested this info - why should the io attribute not be used? What is the reason?

Comment 10 Lavanya Mandavilli 2020-08-21 18:14:29 UTC
I have updated the PR with the workaround noted by Petr, therefore the previous query that I posted above can be ignored. Thank you.

Comment 14 Petr Horáček 2020-09-07 10:04:08 UTC
*** Bug 1876475 has been marked as a duplicate of this bug. ***

Comment 16 Ram Lavi 2020-09-21 13:33:08 UTC
should be fixed by https://github.com/k8snetworkplumbingwg/kubemacpool/pull/244

Comment 17 Yossi Segev 2020-10-12 12:57:51 UTC
Verified in CNV version v2.5.0, with the following scenario;

1. Create a namespace using the attached ns-virt-disk-io.yaml.
This namespace spec was extracted from the namespace originally attached to this bug (comment #1), after removing the redundant fields (e.g. managedFields, UIDs, creation timestamps).
$ oc apply -f ns-virt-disk-io.yaml

2. Move to the new namespace
$ oc project virt-general-disk-io-option

3. Create the VM using the VM spec was attached to this bug in comment #2.

4. Check the created VM spec.
$ oc get vm vm-cirros-hpp -o yaml | less
spec:
  running: false
  template:
  ...
    spec:
      domain:
        devices:
          disks:
          - disk:
              bus: virtio
            io: native
            name: containerdisk

Disk IO configuration exists.

Comment 18 Yossi Segev 2020-10-12 12:59:09 UTC
Created attachment 1720960 [details]
ns-virt-disk-io.yaml


Note You need to log in before you can comment on or make changes to this bug.