13394: regressions - FAIL
flight 13394 xen-unstable real [real]
http://www.chiark.greenend.org.uk/~xensrcts/logs/13394/
Regressions :-(
Tests which did not succeed and are blocking,
including tests which could not be run:
test-amd64-amd64-xl-qemuu-winxpsp3 9 guest-localmigrate fail REGR. vs. 13379
test-i386-i386-xl-qemuu-winxpsp3 9 guest-localmigrate fail REGR. vs. 13379
test-amd64-amd64-xl-qemuu-win7-amd64 9 guest-localmigrate fail REGR. vs. 13376
Regressions which are regarded as allowable (not blocking):
test-amd64-amd64-xl-sedf-pin 10 guest-saverestore fail REGR. vs. 13379
Tests which did not succeed, but are not blocking:
test-amd64-amd64-xl-pcipt-intel 9 guest-start fail never pass
test-amd64-i386-qemuu-rhel6hvm-amd 11 leak-check/check fail never pass
test-amd64-i386-rhel6hvm-amd 11 leak-check/check fail never pass
test-amd64-i386-qemuu-rhel6hvm-intel 11 leak-check/check fail never pass
test-amd64-i386-rhel6hvm-intel 11 leak-check/check fail never pass
test-amd64-i386-xend-winxpsp3 16 leak-check/check fail never pass test-amd64-amd64-win 16 leak-check/check fail never pass test-amd64-i386-win-vcpus1 16 leak-check/check fail never pass test-amd64-i386-win 16 leak-check/check fail never pass test-i386-i386-win 16 leak-check/check fail never pass test-amd64-amd64-xl-win7-amd64 13 guest-stop fail never pass test-amd64-amd64-xl-win 13 guest-stop fail never pass test-amd64-i386-xl-win7-amd64 13 guest-stop fail never pass test-i386-i386-xl-win 13 guest-stop fail never pass test-amd64-i386-xl-win-vcpus1 13 guest-stop fail never pass test-amd64-amd64-xl-winxpsp3 13 guest-stop fail never pass test-i386-i386-xl-winxpsp3 13 guest-stop fail never pass
test-amd64-i386-xl-winxpsp3-vcpus1 13 guest-stop fail never pass
version targeted for testing:
xen 0455d8317631
baseline version:
xen 4f92bdf3370c
------------------------------------------------------------
People who touched revisions under test:
Andres Lagar-Cavilla <[email protected]> Dario Faggioli <[email protected]> Dario Faggioli <[email protected]>
George Dunlap <[email protected]> Ian Campbell <[email protected]>
Ian Jackson <[email protected]>
Jan Beulich <[email protected]>
Keir Fraser <[email protected]>
Roger Pau Monne <[email protected]> Stefano Stabellini <[email protected]> Tim Deegan <[email protected]>
Yang Zhang <[email protected]>
------------------------------------------------------------
jobs:
build-amd64 pass build-i386 pass build-amd64-oldkern pass build-i386-oldkern pass build-amd64-pvops pass build-i386-pvops pass test-amd64-amd64-xl pass test-amd64-i386-xl pass test-i386-i386-xl pass test-amd64-i386-rhel6hvm-amd fail test-amd64-i386-qemuu-rhel6hvm-amd fail test-amd64-amd64-xl-qemuu-win7-amd64 fail test-amd64-amd64-xl-win7-amd64 fail test-amd64-i386-xl-win7-amd64 fail test-amd64-i386-xl-credit2 pass test-amd64-amd64-xl-pcipt-intel fail test-amd64-i386-rhel6hvm-intel fail test-amd64-i386-qemuu-rhel6hvm-intel fail test-amd64-i386-xl-multivcpu pass test-amd64-amd64-pair pass test-amd64-i386-pair pass test-i386-i386-pair pass test-amd64-amd64-xl-sedf-pin fail test-amd64-amd64-pv pass test-amd64-i386-pv pass test-i386-i386-pv pass test-amd64-amd64-xl-sedf pass test-amd64-i386-win-vcpus1 fail test-amd64-i386-xl-win-vcpus1 fail test-amd64-i386-xl-winxpsp3-vcpus1 fail test-amd64-amd64-win fail test-amd64-i386-win fail test-i386-i386-win fail test-amd64-amd64-xl-win fail test-i386-i386-xl-win fail test-amd64-amd64-xl-qemuu-winxpsp3 fail test-i386-i386-xl-qemuu-winxpsp3 fail test-amd64-i386-xend-winxpsp3 fail test-amd64-amd64-xl-winxpsp3 fail test-i386-i386-xl-winxpsp3 fail
------------------------------------------------------------
sg-report-flight on woking.cam.xci-test.com
logs: /home/xc_osstest/logs
images: /home/xc_osstest/images
Logs, config files, etc. are available at
http://www.chiark.greenend.org.uk/~xensrcts/logs
Test harness code can be found at
http://xenbits.xensource.com/gitweb?p=osstest.git;a=summary
Not pushing.
(No revision log; it would be 863 lines long.)
xen.org writes ("[xen-unstable test] 13394: regressions - FAIL"):
Quoted 3 lines
Tests which did not succeed and are blocking,
including tests which could not be run:
test-amd64-amd64-xl-qemuu-winxpsp3 9 guest-localmigrate fail REGR. vs. 13379
The logs show this:
libxl: error: libxl_dom.c:632:switch_logdirty_timeout: logdirty switch: wait for device model timed out
And in xenstore:
/local/domain/0/device-model/5/logdirty/cmd = "enable" (n0)
And in the source code:
$ grep -R logdirty qemu-upstream-unstable.git/* $
So the upstream qemu does not participate properly in the migration protocol. And anyway this protocol seems to involve xenstore and I would have expected it to do something with QMP. But there is no code in libxl to do this (and never has been) and no code in upstream qemu to do it either.
That means we'll get memory corruption in migrated guests with the new
qemu: any time qemu writes to guest memory, it needs to trigger a logdirty update so that the write is properly transferred to the migration target domain.
With the old libxl we didn't notice this apart from random failures. With my new migration code, particularly
25542:1883e5c71a87
libxl: wait for qemu to acknowledge logdirty command
this turns into a hard failure.
I will add this as an allowable test failure pending a proper fix.
Ian.
Quoted 29 lines · Ian Jackson
xen.org writes ("[xen-unstable test] 13394: regressions - FAIL"):
Quoted 3 lines
Tests which did not succeed and are blocking,
including tests which could not be run:
test-amd64-amd64-xl-qemuu-winxpsp3 9 guest-localmigrate fail REGR. vs. 13379The logs show this:
libxl: error: libxl_dom.c:632:switch_logdirty_timeout: logdirty switch: wait for device model timed out
And in xenstore:
/local/domain/0/device-model/5/logdirty/cmd = "enable" (n0)
And in the source code:
$ grep -R logdirty qemu-upstream-unstable.git/* $So the upstream qemu does not participate properly in the migration protocol. And anyway this protocol seems to involve xenstore and I would have expected it to do something with QMP. But there is no code in libxl to do this (and never has been) and no code in upstream qemu to do it either.
That means we'll get memory corruption in migrated guests with the new
qemu: any time qemu writes to guest memory, it needs to trigger a logdirty update so that the write is properly transferred to the migration target domain.
Quoted 7 lines
With the old libxl we didn't notice this apart from random failures. With my new migration code, particularly
25542:1883e5c71a87
libxl: wait for qemu to acknowledge logdirty command
this turns into a hard failure.I will add this as an allowable test failure pending a proper fix.
Thanks for investigating. It does appear that this has always been broken.
Do we think this is a blocker for 4.2?
It certainly prevents us from suggesting that we support HVM migration with the (non-default) upstream qemu.
If we can't fix this for 4.2 (e.g. because we need to get patches into upstream qemu or because the libxl side is too involved) we should at a minimum make libxl reject attempts to migrate such domains with an appropriate error message.
How does this impact the use of upstream qemu for PV guest backends vs migration? I *think* they don't require log-dirty support, but I'm not sure.
Ian.
Quoted 36 lines · Ian Campbell
Quoted 35 lines · Ian Jackson
xen.org writes ("[xen-unstable test] 13394: regressions - FAIL"):
Quoted 3 lines
Tests which did not succeed and are blocking,
including tests which could not be run:
test-amd64-amd64-xl-qemuu-winxpsp3 9 guest-localmigrate fail REGR. vs. 13379The logs show this:
libxl: error: libxl_dom.c:632:switch_logdirty_timeout: logdirty switch: wait for device model timed out
And in xenstore:
/local/domain/0/device-model/5/logdirty/cmd = "enable" (n0)
And in the source code:
$ grep -R logdirty qemu-upstream-unstable.git/* $So the upstream qemu does not participate properly in the migration protocol. And anyway this protocol seems to involve xenstore and I would have expected it to do something with QMP. But there is no code in libxl to do this (and never has been) and no code in upstream qemu to do it either.
That means we'll get memory corruption in migrated guests with the new
qemu: any time qemu writes to guest memory, it needs to trigger a logdirty update so that the write is properly transferred to the migration target domain.With the old libxl we didn't notice this apart from random failures. With my new migration code, particularly
25542:1883e5c71a87
libxl: wait for qemu to acknowledge logdirty command
this turns into a hard failure.
Quoted 6 lines
Quoted 1 line
I will add this as an allowable test failure pending a proper fix.
Thanks for investigating. It does appear that this has always been broken.
Do we think this is a blocker for 4.2?
I wouldn't consider it a blocker, given that upstream QEMU is not the default for HVM guests.
Quoted 7 lines
It certainly prevents us from suggesting that we support HVM migration with the (non-default) upstream qemu.
If we can't fix this for 4.2 (e.g. because we need to get patches into upstream qemu or because the libxl side is too involved) we should at a minimum make libxl reject attempts to migrate such domains with an appropriate error message.
We do need to get patches in QEMU to fix this but we could backport them in qemu-upstream-unstable (and ask for backports to the stable trees).
Quoted 3 lines
How does this impact the use of upstream qemu for PV guest backends vs migration? I *think* they don't require log-dirty support, but I'm not sure.
It does not affect qemu for PV guests.
Quoted 51 lines · Stefano Stabellini
Quoted 36 lines · Ian Campbell
Quoted 35 lines · Ian Jackson
xen.org writes ("[xen-unstable test] 13394: regressions - FAIL"):
Quoted 3 lines
Tests which did not succeed and are blocking,
including tests which could not be run:
test-amd64-amd64-xl-qemuu-winxpsp3 9 guest-localmigrate fail REGR. vs. 13379The logs show this:
libxl: error: libxl_dom.c:632:switch_logdirty_timeout: logdirty switch: wait for device model timed out
And in xenstore:
/local/domain/0/device-model/5/logdirty/cmd = "enable" (n0)
And in the source code:
$ grep -R logdirty qemu-upstream-unstable.git/* $So the upstream qemu does not participate properly in the migration protocol. And anyway this protocol seems to involve xenstore and I would have expected it to do something with QMP. But there is no code in libxl to do this (and never has been) and no code in upstream qemu to do it either.
That means we'll get memory corruption in migrated guests with the new
qemu: any time qemu writes to guest memory, it needs to trigger a logdirty update so that the write is properly transferred to the migration target domain.With the old libxl we didn't notice this apart from random failures. With my new migration code, particularly
25542:1883e5c71a87
libxl: wait for qemu to acknowledge logdirty command
this turns into a hard failure.Quoted 6 lines
Quoted 1 line
I will add this as an allowable test failure pending a proper fix.
Thanks for investigating. It does appear that this has always been broken.
Do we think this is a blocker for 4.2?
I wouldn't consider it a blocker, given that upstream QEMU is not the default for HVM guests.
Quoted 3 lines
It certainly prevents us from suggesting that we support HVM migration with the (non-default) upstream qemu.
Quoted 7 lines
Quoted 4 lines
If we can't fix this for 4.2 (e.g. because we need to get patches into upstream qemu or because the libxl side is too involved) we should at a minimum make libxl reject attempts to migrate such domains with an appropriate error message.
We do need to get patches in QEMU to fix this but we could backport them in qemu-upstream-unstable (and ask for backports to the stable trees).
Can we do that in time for 4.2? It's pretty late in the day.
I think we need to consider either achieving this or adding the appropriate error message as a blocker. Hopefully the former but falling back to the latter if it comes to it.
Quoted 5 lines
Quoted 3 lines
How does this impact the use of upstream qemu for PV guest backends vs migration? I *think* they don't require log-dirty support, but I'm not sure.
It does not affect qemu for PV guests.
Great.
Ian.
Quoted 57 lines · Ian Campbell
Quoted 56 lines · Stefano Stabellini
Quoted 36 lines · Ian Campbell
Quoted 35 lines · Ian Jackson
xen.org writes ("[xen-unstable test] 13394: regressions - FAIL"):
Quoted 3 lines
Tests which did not succeed and are blocking,
including tests which could not be run:
test-amd64-amd64-xl-qemuu-winxpsp3 9 guest-localmigrate fail REGR. vs. 13379The logs show this:
libxl: error: libxl_dom.c:632:switch_logdirty_timeout: logdirty switch: wait for device model timed out
And in xenstore:
/local/domain/0/device-model/5/logdirty/cmd = "enable" (n0)
And in the source code:
$ grep -R logdirty qemu-upstream-unstable.git/* $So the upstream qemu does not participate properly in the migration protocol. And anyway this protocol seems to involve xenstore and I would have expected it to do something with QMP. But there is no code in libxl to do this (and never has been) and no code in upstream qemu to do it either.
That means we'll get memory corruption in migrated guests with the new
qemu: any time qemu writes to guest memory, it needs to trigger a logdirty update so that the write is properly transferred to the migration target domain.With the old libxl we didn't notice this apart from random failures. With my new migration code, particularly
25542:1883e5c71a87
libxl: wait for qemu to acknowledge logdirty command
this turns into a hard failure.Quoted 6 lines
Quoted 1 line
I will add this as an allowable test failure pending a proper fix.
Thanks for investigating. It does appear that this has always been broken.
Do we think this is a blocker for 4.2?
I wouldn't consider it a blocker, given that upstream QEMU is not the default for HVM guests.
Quoted 7 lines
It certainly prevents us from suggesting that we support HVM migration with the (non-default) upstream qemu.
If we can't fix this for 4.2 (e.g. because we need to get patches into upstream qemu or because the libxl side is too involved) we should at a minimum make libxl reject attempts to migrate such domains with an appropriate error message.
Quoted 8 lines
Quoted 2 lines
We do need to get patches in QEMU to fix this but we could backport them in qemu-upstream-unstable (and ask for backports to the stable trees).
Can we do that in time for 4.2? It's pretty late in the day.
I think we need to consider either achieving this or adding the appropriate error message as a blocker. Hopefully the former but falling back to the latter if it comes to it.
I think we should add an appropriate error message as a blocker. We should also try to fix this on the QEMU side, but given that the QEMU 1.0 stable tree is pretty much unmaintaned, we won't be able to backport the fix there, so we cannot be sure that a distro will end up with a QEMU with or without the fix.
Quoted 67 lines · Stefano Stabellini
Quoted 57 lines · Ian Campbell
Quoted 56 lines · Stefano Stabellini
Quoted 36 lines · Ian Campbell
Quoted 35 lines · Ian Jackson
xen.org writes ("[xen-unstable test] 13394: regressions - FAIL"):
Quoted 3 lines
Tests which did not succeed and are blocking,
including tests which could not be run:
test-amd64-amd64-xl-qemuu-winxpsp3 9 guest-localmigrate fail REGR. vs. 13379The logs show this:
libxl: error: libxl_dom.c:632:switch_logdirty_timeout: logdirty switch: wait for device model timed out
And in xenstore:
/local/domain/0/device-model/5/logdirty/cmd = "enable" (n0)
And in the source code:
$ grep -R logdirty qemu-upstream-unstable.git/* $So the upstream qemu does not participate properly in the migration protocol. And anyway this protocol seems to involve xenstore and I would have expected it to do something with QMP. But there is no code in libxl to do this (and never has been) and no code in upstream qemu to do it either.
That means we'll get memory corruption in migrated guests with the new
qemu: any time qemu writes to guest memory, it needs to trigger a logdirty update so that the write is properly transferred to the migration target domain.With the old libxl we didn't notice this apart from random failures. With my new migration code, particularly
25542:1883e5c71a87
libxl: wait for qemu to acknowledge logdirty command
this turns into a hard failure.Quoted 6 lines
Quoted 1 line
I will add this as an allowable test failure pending a proper fix.
Thanks for investigating. It does appear that this has always been broken.
Do we think this is a blocker for 4.2?
I wouldn't consider it a blocker, given that upstream QEMU is not the default for HVM guests.
Quoted 7 lines
It certainly prevents us from suggesting that we support HVM migration with the (non-default) upstream qemu.
If we can't fix this for 4.2 (e.g. because we need to get patches into upstream qemu or because the libxl side is too involved) we should at a minimum make libxl reject attempts to migrate such domains with an appropriate error message.
Quoted 8 lines
Quoted 2 lines
We do need to get patches in QEMU to fix this but we could backport them in qemu-upstream-unstable (and ask for backports to the stable trees).
Can we do that in time for 4.2? It's pretty late in the day.
I think we need to consider either achieving this or adding the appropriate error message as a blocker. Hopefully the former but falling back to the latter if it comes to it.
Quoted 5 lines
I think we should add an appropriate error message as a blocker. We should also try to fix this on the QEMU side, but given that the QEMU 1.0 stable tree is pretty much unmaintaned, we won't be able to backport the fix there, so we cannot be sure that a distro will end up with a QEMU with or without the fix.
Agreed. I'll add this to the 4.2 TODO list.
If we can get support into the mainline qemu then as a stretch goal we can consider whether libxl can auto detect the availability of the feature and react accordingly.
Ian.
PATCH 1/1 Rlibxl: refuse to try and migrate an HVM guest using qemu-xen
In reply to Stefano StabelliniQuoted 5 lines
I think we should add an appropriate error message as a blocker. We should also try to fix this on the QEMU side, but given that the QEMU 1.0 stable tree is pretty much unmaintaned, we won't be able to backport the fix there, so we cannot be sure that a distro will end up with a QEMU with or without the fix.
How about this for the time being, we can always revert or enhance as necessary before 4.2.
8<----------------------
# HG changeset patch
# User Ian Campbell <[email protected]>
# Date 1340985595 -3600
# Node ID a0c1c8c585e03279f9ea149bc2951d0df900717e # Parent d849ca2ef197dbf0e731aa4726da0eb3e2801280
libxl: refuse to try and migrate an HVM guest using qemu-xen
libxl/qemu-upstream currently do not collude together to enable log-dirty mode and therefore migrations are unsafe. Refuse to even try for now.
tools/libxl/libxl.c +11 -0
@@ -746,6 +746,17 @@ int libxl_domain_suspend(libxl_ctx *ctx, goto out_err; } +libxl_device_model_version dm = +libxl__device_model_version_running (gc, domid); +if (type ==LIBXL_DOMAIN_TYPE_HVM && + dm ==LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN && + flags &LIBXL_SUSPEND_LIVE ) { +LOG (ERROR ,"cannot live migrate HVM domains with qemu-xen device-model" ); + rc =ERROR_FAIL ; + goto out_err; + + } +libxl__domain_suspend_state *dss;GCNEW (dss);
Re: [PATCH] Rlibxl: refuse to try and migrate an HVM guest using qemu-xen
Ian Campbell writes ("[PATCH] Rlibxl: refuse to try and migrate an HVM guest using qemu-xen"):
Quoted 8 lines
Quoted 5 lines
I think we should add an appropriate error message as a blocker. We should also try to fix this on the QEMU side, but given that the QEMU 1.0 stable tree is pretty much unmaintaned, we won't be able to backport the fix there, so we cannot be sure that a distro will end up with a QEMU with or without the fix.
How about this for the time being, we can always revert or enhance as necessary before 4.2.
...
tools/libxl/libxl.c int libxl_domain_suspend(libxl_ctx *ctx, · line 750
Quoted 2 lines
tools/libxl/libxl.c +2
-0+libxl_device_model_version dm = +libxl__device_model_version_running (gc, domid);
libxl__device_model_version_running can return -1. (Its error handling is pretty bad but that's no excuse for making matters worse.) I suggest we retcon it as returning a libxl error code.
Ian.
Re: [PATCH] Rlibxl: refuse to try and migrate an HVM guest using qemu-xen
Quoted 9 lines · Ian Jackson
Ian Campbell writes ("[PATCH] Rlibxl: refuse to try and migrate an HVM guest using qemu-xen"):
Quoted 8 lines
Quoted 5 lines
I think we should add an appropriate error message as a blocker. We should also try to fix this on the QEMU side, but given that the QEMU 1.0 stable tree is pretty much unmaintaned, we won't be able to backport the fix there, so we cannot be sure that a distro will end up with a QEMU with or without the fix.
How about this for the time being, we can always revert or enhance as necessary before 4.2.
Quoted 7 lines
...
Review
Quoted 2 lines
(quoted diff) +2
-0+ libxl_device_model_version dm = + libxl__device_model_version_running(gc, domid);
libxl__device_model_version_runningcan return -1. (Its error handling is pretty bad but that's no excuse for making matters worse.) I suggest we retcon it as returning a libxl error code.
the current callers all do something like
switch (libxl__device_model_version_running(gc, domid)) {
case LIBXL_DEVICE_MODEL...
...
default: return ERROR_INVAL;
}and would need some rejigging to support a switch to ERROR_*, and associated chance of triggering gcc's switch(enum) warnings.
I think fixing this properly can be left to 4.3 and for now I'll just follow this same pattern.
Ian.
# HG changeset patch
# User Ian Campbell <[email protected]>
# Date 1341227605 -3600
# Node ID c6a2abdee84d5ae0692728dc169327314991090a # Parent d29a88850da26424b52520a617ca449d49124143
libxl: refuse to try and migrate an HVM guest using qemu-xen
libxl/qemu-upstream currently do not collude together to enable log-dirty mode and therefore migrations are unsafe. Refuse to even try for now.
tools/libxl/libxl.c +16 -0
@@ -746,6 +746,22 @@ int libxl_domain_suspend(libxl_ctx *ctx, goto out_err; } +if (type ==LIBXL_DOMAIN_TYPE_HVM && flags &LIBXL_SUSPEND_LIVE ) { +switch (libxl__device_model_version_running (gc, domid)) { +case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN : +LOG (ERROR , +"cannot live migrate HVM domains with qemu-xen device-model" ); + rc =ERROR_FAIL ; + goto out_err; +case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL : +/* No problem */ +break ; +default : + rc =ERROR_FAIL ; + goto out_err; + } + } +libxl__domain_suspend_state *dss;GCNEW (dss);
Re: [PATCH] Rlibxl: refuse to try and migrate an HVM guest using qemu-xen
Ian Campbell writes ("Re: [PATCH] Rlibxl: refuse to try and migrate an HVM guest using qemu-xen"):
Quoted 4 lines
diff -r
d29a88850da2-rc6a2abdee84dtools/libxl/libxl.ctools/libxl/libxl.c +0
-0@@ -746,6 +746,22 @@ int libxl_domain_suspend(libxl_ctx *ctx,
...
tools/libxl/libxl.c int libxl_domain_suspend(libxl_ctx *ctx, · line 762
Quoted 13 lines
tools/libxl/libxl.c +13
-0+switch (libxl__device_model_version_running (gc, domid)) { +case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN : +LOG (ERROR , +"cannot live migrate HVM domains with qemu-xen device-model" ); + rc =ERROR_FAIL ; + goto out_err; +case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL : +/* No problem */ +break ; +default : + rc =ERROR_FAIL ; + goto out_err; + }
This last case should abort() or log something or not exist.
Ian.
Re: [PATCH] Rlibxl: refuse to try and migrate an HVM guest using qemu-xen
Quoted 20 lines · Ian Jackson
Ian Campbell writes ("Re: [PATCH] Rlibxl: refuse to try and migrate an HVM guest using qemu-xen"):
Quoted 4 lines
diff -r
d29a88850da2-rc6a2abdee84dtools/libxl/libxl.ctools/libxl/libxl.c +0
-0@@ -746,6 +746,22 @@ int libxl_domain_suspend(libxl_ctx *ctx,...
tools/libxl/libxl.c int libxl_domain_suspend(libxl_ctx *ctx, · line 762
Quoted 13 lines
tools/libxl/libxl.c +13
-0+switch (libxl__device_model_version_running (gc, domid)) { +case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN : +LOG (ERROR , +"cannot live migrate HVM domains with qemu-xen device-model" ); + rc =ERROR_FAIL ; + goto out_err; +case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL : +/* No problem */ +break ; +default : + rc =ERROR_FAIL ; + goto out_err; + }
Quoted 1 line
This last case should
abort()or log something or not exist.
I think
case -1: rc = ERROR_FAIL goto out_err; default: abort()
would be OK for 4.2. libxl__device_model_version_running either returns -1 (and logs) or a valid LIBXL_DEVICE_MODEL_VERSION_* so the only thing to catch is a new LIBXL_DEVICE_MODEL_VERSION_*, in which case an abort() seems appropriate since it would be a bug to not handle it here.
Possibly -1 ought to become LIBXL_DEVICE_MODEL_VERSION_INVALID too
Ian.
Re: [PATCH] Rlibxl: refuse to try and migrate an HVM guest using qemu-xen
Quoted 29 lines · Ian Campbell
Quoted 20 lines · Ian Jackson
Ian Campbell writes ("Re: [PATCH] Rlibxl: refuse to try and migrate an HVM guest using qemu-xen"):
Quoted 4 lines
diff -r
d29a88850da2-rc6a2abdee84dtools/libxl/libxl.ctools/libxl/libxl.c +0
-0@@ -746,6 +746,22 @@ int libxl_domain_suspend(libxl_ctx *ctx,...
tools/libxl/libxl.c
Quoted 13 lines
tools/libxl/libxl.c +13
-0+switch (libxl__device_model_version_running (gc, domid)) { +case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN : +LOG (ERROR , +"cannot live migrate HVM domains with qemu-xen device-model" ); + rc =ERROR_FAIL ; + goto out_err; +case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL : +/* No problem */ +break ; +default : + rc =ERROR_FAIL ; + goto out_err; + }Quoted 1 line
This last case should
abort()or log something or not exist.I think
case -1: rc = ERROR_FAIL goto out_err; default: abort()
Quoted 6 lines
would be OK for 4.2.
libxl__device_model_version_runningeither returns -1 (and logs) or a valid LIBXL_DEVICE_MODEL_VERSION_* so the only thing to catch is a new LIBXL_DEVICE_MODEL_VERSION_*, in which case anabort()seems appropriate since it would be a bug to not handle it here.Possibly -1 ought to become
LIBXL_DEVICE_MODEL_VERSION_INVALIDtoo
Actually I think -1 == INVALID would be wrong, the -1 here really means something went wrong internally to libxl. Anyway, I remember now that the reason I did it this was was to avoid the need to rewrite the other callsites for 4.2. In 4.3 we should make libxl__device_model_version_running return ERROR_foo or something valid, and perhaps add 0 == UNKNOWN as a member of the enum.
For now I think this will do:
8<------------------------------------------------
# HG changeset patch
# User Ian Campbell <[email protected]>
# Date 1343042178 -3600
# Node ID 11b539fb8400f163a871145aa20d7b4b2967e5b4 # Parent 21b166ed1e8765b75a2e90caa9e0e156ea4010d9
libxl: refuse to try and migrate an HVM guest using qemu-xen
libxl/qemu-upstream currently do not collude together to enable log-dirty mode and therefore migrations are unsafe. Refuse to even try for now.
tools/libxl/libxl.c +17 -0
@@ -746,6 +746,23 @@ int libxl_domain_suspend(libxl_ctx *ctx, goto out_err; } +if (type ==LIBXL_DOMAIN_TYPE_HVM && flags &LIBXL_SUSPEND_LIVE ) { +switch (libxl__device_model_version_running (gc, domid)) { +case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN : +LOG (ERROR , +"cannot live migrate HVM domains with qemu-xen device-model" ); + rc =ERROR_FAIL ; + goto out_err; +case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL : +/* No problem */ +break ; +case -1 : + rc =ERROR_FAIL ; + goto out_err; +default :abort (); + } + } +libxl__domain_suspend_state *dss;GCNEW (dss);
Ian Jackson
Acked-byRe: [PATCH] Rlibxl: refuse to try and migrate an HVM guest using qemu-xen
Ian Campbell writes ("Re: [Xen-devel] [PATCH] Rlibxl: refuse to try and migrate an HVM guest using qemu-xen"):
Quoted 6 lines
Actually I think -1 == INVALID would be wrong, the -1 here really means something went wrong internally to libxl. Anyway, I remember now that the reason I did it this was was to avoid the need to rewrite the other callsites for 4.2. In 4.3 we should make
libxl__device_model_version_runningreturnERROR_fooor something valid, and perhaps add 0 == UNKNOWN as a member of the enum.
Yes.
Quoted 1 line
For now I think this will do:
..
Quoted 4 lines
libxl: refuse to try and migrate an HVM guest using qemu-xen
libxl/qemu-upstream currently do not collude together to enable log-dirty mode and therefore migrations are unsafe. Refuse to even try for now.
Thanks,
Ian.
Ian Campbell
AppliedRe: [PATCH] Rlibxl: refuse to try and migrate an HVM guest using qemu-xen
Quoted 10 lines · Ian Jackson
Ian Campbell writes ("Re: [Xen-devel] [PATCH] Rlibxl: refuse to try and migrate an HVM guest using qemu-xen"):
Quoted 6 lines
Actually I think -1 == INVALID would be wrong, the -1 here really means something went wrong internally to libxl. Anyway, I remember now that the reason I did it this was was to avoid the need to rewrite the other callsites for 4.2. In 4.3 we should make
libxl__device_model_version_runningreturnERROR_fooor something valid, and perhaps add 0 == UNKNOWN as a member of the enum.Yes.
Quoted 8 lines
Quoted 1 line
For now I think this will do:
..
Quoted 4 lines
libxl: refuse to try and migrate an HVM guest using qemu-xen
libxl/qemu-upstream currently do not collude together to enable log-dirty mode and therefore migrations are unsafe. Refuse to even try for now.
Acked-by Ian Jackson <[email protected]>
Applied, thanks.
Quoted 3 lines
Thanks,
Ian.
Re: [PATCH] Rlibxl: refuse to try and migrate an HVM guest using qemu-xen
Quoted 13 lines · Ian Campbell
Quoted 12 lines · Ian Jackson
Ian Campbell writes ("Re: [Xen-devel] [PATCH] Rlibxl: refuse to try and migrate an HVM guest using qemu-xen"):
Quoted 6 lines
Actually I think -1 == INVALID would be wrong, the -1 here really means something went wrong internally to libxl. Anyway, I remember now that the reason I did it this was was to avoid the need to rewrite the other callsites for 4.2. In 4.3 we should make
libxl__device_model_version_runningreturnERROR_fooor something valid, and perhaps add 0 == UNKNOWN as a member of the enum.Yes.
Quoted 1 line
For now I think this will do:
..
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
libxl: refuse to try and migrate an HVM guest using qemu-xen
libxl/qemu-upstream currently do not collude together to enable log-dirty mode and therefore migrations are unsafe. Refuse to even try for now.
Acked-by Ian Jackson <[email protected]>Applied, thanks.
Right after I pushed I noticed that gcc 4.6.2 (which is not the one I
typically use for commit testing) fails with:libxl.c: In function ‘libxl_domain_suspend’:
libxl.c:778:9: error: case value ‘4294967295’ not in enumerated type ‘libxl_device_model_version’ [-Werror=switch]
Whereas 4.4.5 (which is my typical commit test and day to day gcc) does not.
I have pushed the following additional patch to fix this up, tested with 4.4.5 and 4.6.2.
8<---------------
From 365636cac708d4af0907503c07bec530b2dd3a03 Mon Sep 17 00:00:00 2001
From: Ian Campbell <[email protected]>
Date: Wed, 25 Jul 2012 17:52:12 +0100
Subject: [PATCH] libxl: libxl__device_model_version_running should return an int
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
On error it returns -1 and therefore it needs to return int and not libxl_device_model_enum. Otherwise gcc 4.6.2 complains:
libxl.c: In function ‘libxl_domain_suspend’:
libxl.c:778:9: error: case value ‘4294967295’ not in enumerated type ‘libxl_device_model_version’ [-Werror=switch]
--- tools/libxl/libxl_internal.c | 3 +-- tools/libxl/libxl_internal.h | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-)
tools/libxl/libxl_internal.c +1 -2
@@ -330,8 +330,7 @@ out:return rc; } -libxl_device_model_version libxl__device_model_version_running (libxl__gc *gc, -uint32_t domid) +int libxl__device_model_version_running (libxl__gc *gc,uint32_t domid) {char *path =NULL ;char *dm_version =NULL ;
tools/libxl/libxl_internal.h +1 -2
@@ -1515,8 +1515,7 @@ _hidden libxl__json_object *libxl__json_parse(libxl__gc *gc, const char *s);/* Based on /local/domain/$domid/dm-version xenstore key * default is qemu xen traditional */ -_hidden libxl_device_model_version -libxl__device_model_version_running (libxl__gc *gc,uint32_t domid); +_hidden int libxl__device_model_version_running(libxl__gc *gc, uint32_t domid);/*
Signature · 9 lines
1.7.2.5 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel