Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-65267

The max boundary of interface inbound average is inconsistent between 'virsh domiftune' and 'virsh update-device'

    • No
    • None
    • rhel-sst-virtualization
    • ssg_virtualization
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • x86_64
    • None

      What were you trying to do that didn't work?

      The max boundary of interface inbound average is inconsistent between 'virsh domiftune' and 'virsh update-device'

      What is the impact of this issue to you?

      Please provide the package NVR for which the bug is seen:

      libvirt-10.8.0-3.el10.x86_64

      How reproducible is this bug?:

      100%

      Steps to reproduce

      1. Update interface inbound average speed with 'virsh domiftune':
       # /bin/virsh domiftune avocado-vt-vm1 vnet14  --inbound 4096,4096,4096  --current
      

            2.Check the interface inbound setting in guest live xml:

       # virsh dumpxml avocado-vt-vm1 --xpath //interface
      <interface type="network">
        <mac address="52:54:00:96:fd:1b"/>
        <source network="default" portid="b3ebfc92-2b0d-464f-9401-aad525e77499" bridge="virbr0"/>
        <bandwidth>
          ***<inbound average="4096" peak="4096" burst="4096"/>***
        </bandwidth>
        <target dev="vnet14"/>
        <model type="virtio"/>
        <driver queues="2"/>
        <alias name="net0"/>
        <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
      </interface>
      

      3. Update interface inbound average to a huge value with 'virsh domiftune', it reports the inbound rate should <=4294967295 :

      # /bin/virsh domiftune avocado-vt-vm1 vnet14  --inbound 1000000000000000000,4096,4096  --current
      error: inbound rate larger than maximum 4294967295
       

      4.Prepare a interface xml with bandwidth inbound setting and inbound average value > 4294967295 :

      #cat if10.xml
      <interface type="network">
        <mac address="52:54:00:96:fd:1b"/>
        <source network="default" portid="966a0427-2da4-43dd-b4b3-8b02bc451d13" bridge="virbr0"/>
        <bandwidth>
          ****<inbound average="4294967296" peak="4096" burst="4096"/>****
        </bandwidth>
        <target dev="vnet14"/>
        <model type="virtio"/>
        <driver queues="2"/>
        <alias name="net0"/>
        <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
      </interface> 

      5.Update the interface device with 'virsh update-device':

       # virsh update-device avocado-vt-vm1 if10.xml
      Device updated successfully

      6.Check the interface inbound setting in guest live xml, the setting takes effect:

      # virsh dumpxml avocado-vt-vm1 --xpath //interface
      <interface type="network">
        <mac address="52:54:00:96:fd:1b"/>
        <source network="default" portid="966a0427-2da4-43dd-b4b3-8b02bc451d13" bridge="virbr0"/>
        <bandwidth>
          ***<inbound average="4294967296" peak="4096" burst="4096"/>***
        </bandwidth>
        <target dev="vnet14"/>
        <model type="virtio"/>
        <driver queues="2"/>
        <alias name="net0"/>
        <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
      </interface>
       

      7.Modify the interface xml in step 4 with a huge inbound average value:

       # cat if10.xml 
      <interface type="network">
        <mac address="52:54:00:96:fd:1b"/>
        <source network="default" portid="531f32c0-bc7d-4785-b79c-739b71caaf57" bridge="virbr0"/>
        <bandwidth>
          <inbound average="10000000000000000000" peak="4096" burst="4096"/>
        </bandwidth>
        <target dev="vnet14"/>
        <model type="virtio"/>
        <driver queues="2"/>
        <alias name="net0"/>
        <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
      </interface>
      

      8. Update the interface device with 'virsh update-device':

      # virsh update-device avocado-vt-vm1 if10.xml  error: Failed to update device from if10.xml
      error: Failed to update device from if10.xml
      error: numerical overflow: value '10000000000000000000' is too big for 'average' parameter, maximum is ***'18014398509481984'***

      Expected results

      The max boundary of interface inbound average should be consistent between 'virsh domiftune' and 'virsh update-device'.

      Actual results

      The max boundary of interface inbound average is inconsistent between 'virsh domiftune' and 'virsh update-device'.

              lstump@redhat.com Laine Stump
              rhn-support-yafu Yan Fu
              Laine Stump Laine Stump
              Yanqiu Zhang Yanqiu Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated: