xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>,
	"Ian.Campbell@citrix.com" <Ian.Campbell@citrix.com>,
	Wen Congyang <wency@cn.fujitsu.com>,
	xen devel <xen-devel@lists.xen.org>
Subject: Re: question about migration
Date: Mon, 4 Jan 2016 18:05:15 +0000	[thread overview]
Message-ID: <568AB45B.1080609@citrix.com> (raw)
In-Reply-To: <22154.45023.342526.976735@mariner.uk.xensource.com>

On 04/01/16 17:46, Ian Jackson wrote:
> Andrew Cooper writes ("Re: [Xen-devel] question about migration"):
>> On 04/01/16 15:31, Ian Jackson wrote:
>>> * It is not possible to resume the domain in the source after it has
>>>   suspended.
>> This functionality exists and is already used in several circumstances,
>> both by libxl, and other toolstacks.
> Oh!
>
>> xl has an added split-brain problem here that plain demonic toolstacks
>> don't have; specifically that there are two completely independent
>> processes playing with the domain state at the same time.
>>
>> The daemonic xl needs to ignore DOMAIN_SHUTDOWN and tidy up only after
>> DOMAIN_DEATH.  Under these circumstances, a failed migrate which resumes
>> the domain won't result in qemu being cleaned up.
> I think there is some kind of further underlying problem here.
>
> Suppose a domain goes into SHUTDOWN with reason code SUSPEND.  Then
> later it is resumed again (perhaps the migration failed).  And later
> it shuts down cleanly.
>
> Will this generate a second @releaseDomain ?  How is a toolstack
> supposed to discover this situation ?

By the looks of it in Xen, domain_resume() sets d->is_shut_down = 0,
which means a subsequent domain_shutdown() will generate a new VIRQ.

Therefore, a new @releaseDomain will arrive at a later point.

(Actually, there are 3 VIRQs on a standard shutdown path, but the final
two are very close together.  It is exceedingly likely that they are
amortised in the time it takes dom0 to respond to the evtchn for the
penultimate notification.)

>
> Should libxl simply treat domains in state SHUTDOWN/SUSPEND as if they
> were running, and not issue a notification to anyone ?

As far as libxl_evenable_domain_death() is concerned, yes.

In general however, no.  Consider a libxl user (such as a snapshotting
utility) which asks a domain to suspend to quiesce the disks and then
intends to resume the domain.

~Andrew

  reply	other threads:[~2016-01-04 18:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-24  2:29 question about migration Wen Congyang
2015-12-24 12:36 ` Andrew Cooper
2015-12-25  0:55   ` Wen Congyang
2015-12-29 10:57     ` Andrew Cooper
2015-12-25  1:45   ` Wen Congyang
2015-12-25  3:06     ` Wen Congyang
2015-12-29 12:46       ` Andrew Cooper
2016-01-04 15:31         ` Ian Jackson
2016-01-04 15:44           ` Ian Campbell
2016-01-04 15:48           ` Ian Campbell
2016-01-04 16:38           ` Andrew Cooper
2016-01-04 17:46             ` Ian Jackson
2016-01-04 18:05               ` Andrew Cooper [this message]
2016-01-05 15:40                 ` Ian Jackson
2016-01-05 17:39                   ` Andrew Cooper
2016-01-05 18:17                     ` Ian Jackson
2016-01-06 10:21                       ` Ian Campbell
2015-12-29 11:24     ` Andrew Cooper
2016-01-04 10:28       ` Paul Durrant
2016-01-04 10:36         ` Andrew Cooper
2016-01-04 11:08           ` Paul Durrant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=568AB45B.1080609@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=wency@cn.fujitsu.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).