[libvirt] [Concern] Whether some clock element stability need to be check before migration?

Xuesong Zhang xuzhang at redhat.com
Tue Apr 16 03:02:57 UTC 2013


hi, 

This is xuesong from libvirt-QE, which is the feature owner of stable guest ABI in rhel7.
I met one issue, but didn't know whether it is one bug or not, since in Guest ABI , some aspects belong to "a host-side configuration parameter".
So, would you please kindly help to check it? Thanks.

Description
While check the guest clock ABI stability, some scenario fails.

version
kernel-3.8.0-0.43.el7.x86_64
qemu-kvm-1.3.0-6.el7.x86_64
libvirt-1.0.3-1.el7.x86_64

reproduced
100%

Steps
1. prepare migration env on two hosts.

2. prepare one guest with the parallel.
......
<clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup' track='guest'>
      <catchup threshold='123' slew='120' limit='10000'/>
    </timer>
    <timer name='pit' tickpolicy='delay'/>
  </clock>
....

3. start and dumpxml this gust
# virsh start mig
Domain mig started
# virsh dumpxml mig > mig.xml

4. Change "localtime" to "utc" in the generated xml "mig.xml".
......
<clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup' track='guest'>
      <catchup threshold='123' slew='120' limit='10000'/>
    </timer>
    <timer name='pit' tickpolicy='delay'/>
  </clock>
....

5. migration with the modified xml is successfully.------------------it is issue, should prompt error message.
# virsh migrate --live --xml mig.xml mig qemu+ssh://{$target host IP}/system 



6. run step3 again, then change timer name "pit" to "platform". Note, maker sure only one change point in the xml. then migration with the modified xml. ----------------this result is as expect
# virsh migrate mig --live  --xml mig.xml qemu+ssh://10.66.83.38/system
error: unsupported configuration: Target timer platform does not match source pit

7. run step3 again, then delete timer name "pit". Note, maker sure only one change point in the xml. then migration with the modified xml.-----------------the result is as expect
#virsh migrate mig --live  --xml mig.xml qemu+ssh://10.66.83.38/system
error: unsupported configuration: Target domain timers do not match source

8. run step3 again, then change timer track from "guest" to "wall". Note, maker sure only one change point in the xml. then migration with the modified xml.
The migration is succssful.------------------------------------------------------------------------------------------------------------------it is issue, should prompt error message.
# virsh migrate --live --xml mig.xml mig qemu+ssh://{$target host IP}/system 

9. run step3 again, then change timer tickpolicy from "catchup" to "delay". Note, maker sure only one change point in the xml. then migration with the modified xml.
The migration is succssful.------------------------------------------------------------------------------------------------------------------it is issue, should prompt error message.
# virsh migrate --live --xml mig.xml mig qemu+ssh://{$target host IP}/system 


Actual result
The result in step 6 and 7 is as expected, the result of step 5, 8 and 9 is wrong.

Expect result
The clock element stability in step 5, 8 and 9 need to be check before migration. 

Addtional info:

Below is all checks about clock in upstream 1.0.4 maint branch:
In timer check 
Function virDomainTimerDefCheckABIStability only check

1.NAME :src->name != dst->name
2.PRESENT :src->present != dst->present)
3.FREQUENCY :src->name == VIR_DOMAIN_TIMER_NAME_TSC) {
                if (src->frequency != dst->frequency)
             }

4.MODE src->mode != dst->mode

And in another function , check
timer's numbers
5.NUMBERS : src->clock.ntimers != dst->clock.ntimers




Best Regards,
Zhang Xuesong
IRC: xuzhang
internal phone: 88393




More information about the libvir-list mailing list