<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi, all,<br>
<br>
Please help to review this BP.<br>
<br>
<a class="moz-txt-link-freetext" href="https://blueprints.launchpad.net/nova/+spec/live-migration-state-machine">https://blueprints.launchpad.net/nova/+spec/live-migration-state-machine</a><br>
<br>
<br>
Currently, the migration_status field in Migration object is
indicating the <br>
status of migration process. But in the current code, it is
represented <br>
by pure string, like 'migrating', 'finished', and so on.<br>
<br>
The strings could be confusing to different developers, e.g. there
are 3 <br>
statuses representing the migration process is over successfully: <br>
'finished', 'completed' and 'done'. <br>
And 2 for migration in process: 'running' and 'migrating'.<br>
<br>
So I think we should use constants or enum for these statuses.<br>
<br>
<br>
Furthermore, Nikola has proposed to create a state machine for the
statuses, <br>
which is part of another abandoned BP. And this is also the work I'd
like to go <br>
on with. Please refer to:<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<a rel="nofollow" href="https://review.openstack.org/#/c/197668/"
style="color: rgb(0, 51, 170); text-decoration: none; font-family:
sans-serif; font-size: 12px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
18px; orphans: auto; text-align: left; text-indent: 0px;
text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255);">https:/<wbr>/review.<wbr>openstack.<wbr>org/#/c/<wbr>197668/</a><br
style="color: rgb(51, 51, 51); font-family: sans-serif; font-size:
12px; font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: 18px; orphans: auto;
text-align: left; text-indent: 0px; text-transform: none;
white-space: normal; widows: 1; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255);">
<a rel="nofollow" href="https://review.openstack.org/#/c/197669/"
style="color: rgb(0, 51, 170); text-decoration: none; font-family:
sans-serif; font-size: 12px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
18px; orphans: auto; text-align: left; text-indent: 0px;
text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255);">https:/<wbr>/review.<wbr>openstack.<wbr>org/#/c/<wbr>197669/</a><br>
<br>
<br>
Another proposal is: introduce a new member named "state" into
Migration.<br>
Use a state machine to handle this Migration.state, and leave
migration_status <br>
field a
descriptive human readable free-form. <br>
<br>
<br>
So how do you think ?<br>
<br>
Thanks.<br>
</body>
</html>