Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
$dom->get_block_job_info can not get correct value for type and end
Version-Release number of selected component (if applicable):
perl-Sys-Virt-1.1.1-2.el7.x86_64
How reproducible:
100%
Steps to Reproduce:
1.cat test.pl
#!/usr/bin/perl
use warnings;
use strict;
use Sys::Virt;
my $uri = "qemu:///system";
my $domname = "tck";
my $con = Sys::Virt->new(address => $uri, readonly => 0);
my $dom = $con->get_domain_by_name($domname);
my $jobinfo;
my $pathmain = "/var/cache/libvirt-tck/storage-fs/tck/tck-main";
$jobinfo = $dom->get_block_job_info($pathmain, 0);
while(my ($k, $v) = each %{$jobinfo}) {
print "$k => $v\n";
}
2. Start a guest with xml
<domain type="kvm">
<name>tck</name>
<memory>65536</memory>
<currentMemory>65536</currentMemory>
<os>
<type>hvm</type>
<kernel>/var/cache/libvirt-tck/os-x86_64-hvm/vmlinuz</kernel>
<initrd>/var/cache/libvirt-tck/os-x86_64-hvm/initrd</initrd>
</os>
<features>
<acpi />
<apic />
</features>
<devices>
<disk type="file">
<source file="/var/cache/libvirt-tck/os-x86_64-hvm/disk.img" />
<target dev="vda" />
</disk>
<disk type="file">
<driver name="qemu" type="qcow2" />
<source file="/var/cache/libvirt-tck/storage-fs/tck/tck-main" />
<target dev="vdb" />
</disk>
<console type="pty" />
</devices>
</domain>
3. run #perl test.pl
Actual results:
cur => 0
bandwidth => 16302096
type => 18577664
end => 16746808
Expected results:
"type" and "end" should be 0 when no block job, and not sure if bandwidth is right because it is different from rhel6 test result
Additional info:
In libvirt-1.1.1-13.el7.x86_64, the get_block_job_info will output random numbers, even if there is no block job performed:
# while true; do perl test.pl; sleep 1;done
cur => 0
bandwidth => 30175248
type => 31177832
end => 30738240
cur => 0
bandwidth => 21766160
type => 22768744
end => 22329152
cur => 0
bandwidth => 26107920
type => 27110504
end => 26670912
cur => 0
bandwidth => 10289168
type => 11291752
end => 10852160
And this bug is fixed in libvirt-1.1.1-14.el7. The job info will show the right number when block copy occurs, like:
cur => 0
bandwidth => 0
type => 0
end => 0
cur => 9346875392
bandwidth => 0
type => 2
end => 10737418240
cur => 9438035968
bandwidth => 0
type => 2
end => 10737418240
cur => 9591455744
bandwidth => 0
type => 2
end => 10737418240
So I will set this bug as VERIFIED.
This request was resolved in Red Hat Enterprise Linux 7.0.
Contact your manager or support representative in case you have further questions about the request.
Description of problem: $dom->get_block_job_info can not get correct value for type and end Version-Release number of selected component (if applicable): perl-Sys-Virt-1.1.1-2.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1.cat test.pl #!/usr/bin/perl use warnings; use strict; use Sys::Virt; my $uri = "qemu:///system"; my $domname = "tck"; my $con = Sys::Virt->new(address => $uri, readonly => 0); my $dom = $con->get_domain_by_name($domname); my $jobinfo; my $pathmain = "/var/cache/libvirt-tck/storage-fs/tck/tck-main"; $jobinfo = $dom->get_block_job_info($pathmain, 0); while(my ($k, $v) = each %{$jobinfo}) { print "$k => $v\n"; } 2. Start a guest with xml <domain type="kvm"> <name>tck</name> <memory>65536</memory> <currentMemory>65536</currentMemory> <os> <type>hvm</type> <kernel>/var/cache/libvirt-tck/os-x86_64-hvm/vmlinuz</kernel> <initrd>/var/cache/libvirt-tck/os-x86_64-hvm/initrd</initrd> </os> <features> <acpi /> <apic /> </features> <devices> <disk type="file"> <source file="/var/cache/libvirt-tck/os-x86_64-hvm/disk.img" /> <target dev="vda" /> </disk> <disk type="file"> <driver name="qemu" type="qcow2" /> <source file="/var/cache/libvirt-tck/storage-fs/tck/tck-main" /> <target dev="vdb" /> </disk> <console type="pty" /> </devices> </domain> 3. run #perl test.pl Actual results: cur => 0 bandwidth => 16302096 type => 18577664 end => 16746808 Expected results: "type" and "end" should be 0 when no block job, and not sure if bandwidth is right because it is different from rhel6 test result Additional info: