<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<br>
<div class="moz-cite-prefix">Le 23/09/2015 05:24, Zhenyu Zheng a
écrit :<br>
</div>
<blockquote
cite="mid:CAO0b__-38=aj2+rDd1POEsQkJ+_dGUAnskD8LzKjKKCKoMicRg@mail.gmail.com"
type="cite">
<div dir="ltr">Hi, all
<div><br>
</div>
<div>I have a question about availability zones when performing
live-migration.</div>
<div><br>
</div>
<div>Currently, when performing live-migration the AZ of the
instance didn't update. In usecase like this:</div>
<div>Instance_1 is in host1 which is in az1, we live-migrate it
to host2 (provide host2 in API request) which is in az2. The
operation will secusess but the availability zone data stored
in instance1 is still az1, this may cause inconsistency with
the az data stored in instance db and the actual az. I think
update the az information in instance using the host az can
solve this.</div>
<div><br>
</div>
</div>
</blockquote>
<br>
Well, no. Instance.AZ is only the reflect of what the user asked,
not what the current AZ is from the host the instance belongs to. In
other words, instance.az is set once forever by taking the --az hint
from the API request and persisting it in DB.<br>
<br>
That means that if you want to create a new VM without explicitly
specifying one AZ in the CLI, it will take the default value of
CONF.default_schedule_az which is None (unless you modify that
flag).<br>
<br>
Consequently, when it will go to the scheduler, the AZFilter will
not check the related AZs from any host because you didn't asked for
an AZ. That means that the instance is considered "AZ-free".<br>
<br>
Now, when live-migrating, *if you specify a destination*, you
totally bypass the scheduler and thus the AZFilter. By doing that,
you can put your instance to another host without really checking
the AZ.<br>
<br>
That said, if you *don't specify a destination*, then the scheduler
will be called and will enforce the instance.az field with regards
to the host AZ. That should still work (again, depending on whether
you explicitly set an AZ at the boot time)<br>
<br>
To be clear, there is no reason of updating that instance AZ field.
We can tho consider it's a new "request"' field and could be
potentially moved to the RequestSpec object, but for the moment,
this is a bit too early since we don't really use that new
RequestSpec object yet.<br>
<br>
<br>
<br>
<blockquote
cite="mid:CAO0b__-38=aj2+rDd1POEsQkJ+_dGUAnskD8LzKjKKCKoMicRg@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>Also, I have heard from my collegue that in the future we
are planning to use host az information for instances. I
couldn't find informations about this, could anyone provide me
some information about it if thats true?</div>
<div><br>
</div>
</div>
</blockquote>
<br>
See my point above, I'd rather prefer to fix how live-migrations
check the scheduler (and not bypass it when specifying a
destination) and possibly move the instance AZ field to the
RequestSpec object once that object is persisted, but I don't think
we should check the host instead of the instance in the AZFilter.<br>
<br>
<br>
I assume all of that can be very confusing and mostly tribal
knowledge, that's why we need to document that properly and one
first shot is <a class="moz-txt-link-freetext" href="https://review.openstack.org/#/c/223802/">https://review.openstack.org/#/c/223802/</a><br>
<br>
-Sylvain<br>
<br>
<blockquote
cite="mid:CAO0b__-38=aj2+rDd1POEsQkJ+_dGUAnskD8LzKjKKCKoMicRg@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>Thanks,</div>
<div><br>
</div>
<div>Best Regards,</div>
<div><br>
</div>
<div>Zheng</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: <a class="moz-txt-link-abbreviated" href="mailto:OpenStack-dev-request@lists.openstack.org?subject:unsubscribe">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a>
<a class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>