<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style='font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif;'>Hi,<br>I have got the image status as "Rdy" in oneimage list, while the image was actually not copied properly and was in error state.<br>Steps to reproduce:<br>1. Have two VMDK files [ Ubuntu1010-i386-flat.vmdk and Ubuntu1010-i386.vmdk]  and store them in /var/images/ubuntu1010 folder. <span style="color: rgb(0, 76, 153);">[Please note that I forgot to rename the Ubuntu1010-i386.vmdk to disk.vmdk. So don't rename now]</span><br>2. create a image template with following contents and save it as ubuntu1010.img<br><div style="margin-left: 40px;">      NAME = Ubuntu_1010<br>      PATH = /var/images/ubuntu1010<br>      TYPE = OS<br></div>3. upload the image to datastore using following command<br>      oneimage create ~/templates/ubuntu1010.img --datastore 100<br>4. You will get the following errors in oned.log and image moves to "Err" state<br><div style="margin-left: 40px;">      Apr 30 23:59:17 2012 [ImG][D]: Message received: LOG I 5 cp: Copying local disk folder /var/images/ubuntu1010 to the image repository<br>      Mon Apr 30 23:59:17 2012 [ImM][I]: cp: Copying local disk folder /var/images/ubuntu1010 to the image repository<br>      Mon Apr 30 23:59:17 2012 [ImG][D]: Message received: LOG E 5 cp: Command "mv -f /var/lib/one/var/datastores/100/033af89b33c36b478aaf9ff7d2624aae/Ubuntu1010-  i386-flat.vmdk<br><br>      Mon Apr 30 23:59:17 2012 [ImM][E]: cp: Command "mv -f /var/lib/one/var/datastores/100/033af89b33c36b478aaf9ff7d2624aae/Ubuntu1010-i386-flat.vmdk<br>      Mon Apr 30 23:59:17 2012 [ImG][D]: Message received: LOG I 5 Ubuntu1010-i386.vmdk /var/lib/one/var/datastores/100/033af89b33c36b478aaf9ff7d2624aae/disk.vmdk" failed: mv: target `/var/lib/one/var/datastores/100/033af89b33c36b478aaf9ff7d2624aae/disk.vmdk' is not a directory<br><br>      <span style="color: rgb(255, 0, 0);">Mon Apr 30 23:59:17 2012 [ImM][I]: Ubuntu1010-i386.vmdk /var/lib/one/var/datastores/100/033af89b33c36b478aaf9ff7d2624aae/disk.vmdk" failed: mv: target `/var/lib/one/var/datastores/100/033af89b33c36b478aaf9ff7d2624aae/disk.vmdk' is not a directory</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">      Mon Apr 30 23:59:17 2012 [ImG][D]: Message received: LOG E 5 Error renaming disk file Ubuntu1010-i386-flat.vmdk</span><br><br>      <span style="color: rgb(255, 0, 0);">Mon Apr 30 23:59:17 2012 [ImM][E]: Error renaming disk file Ubuntu1010-i386-flat.vmdk</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">      Mon Apr 30 23:59:17 2012 [ImG][D]: Message received: LOG E 5 Ubuntu1010-i386.vmdk to disk.vmdk</span><br style="color: rgb(255, 0, 0);"><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">      Mon Apr 30 23:59:17 2012 [ImM][E]: Ubuntu1010-i386.vmdk to disk.vmdk</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">      Mon Apr 30 23:59:17 2012 [ImG][D]: Message received: LOG I 5 ExitCode: 1</span><br style="color: rgb(255, 0, 0);"><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">      Mon Apr 30 23:59:17 2012 [ImM][I]: ExitCode: 1</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">      Mon Apr 30 23:59:17 2012 [ImG][D]: Message received: CP FAILURE 5 Error renaming disk file Ubuntu1010-i386-flat.vmdk</span><br style="color: rgb(255, 0, 0);"><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">      Mon Apr 30 23:59:17 2012 [ImM][E]: Error copying image in the repository: Error renaming disk file Ubuntu1010-i386-flat.vmdk</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">      Mon Apr 30 23:59:17 2012 [ImG][D]: Message received: Ubuntu1010-i386.vmdk to disk.vmdk</span><br style="color: rgb(255, 0, 0);"></div>5. Now oneimage list shows Err state.<br><br>oneadmin@OneHost:/var/images/ubuntu1010$ oneimage list<br><div style="margin-left: 40px;">  ID USER     GROUP    NAME         DATASTORE     SIZE TYPE PER STAT  RVMS<br>   5 oneadmin oneadmin Ubuntu_1010  production      0M     OS  No  <span style="font-weight: bold; color: rgb(0, 204, 0);">Err</span>      0<br></div>6. Rename Ubuntu1010-i386.vmdk to disk.vmdk in the folder /var/images/ubuntu1010<br>7. Provide the following command [I know this is not the correct command at this time]<br style="font-weight: bold;"><div style="margin-left: 40px;"><span style="font-weight: bold;">      oneimage enable 5</span><br></div><span style="font-weight: bold; color: rgb(255, 0, 0);">8. Image now moved to ready state without doing anything.......</span> <span style="color: rgb(0, 0, 255); font-weight: bold;">I think, this is a misleading state for an image which is actually in "Err" state.</span><br style="color: rgb(0, 0, 255);"><br>9. oneimage list shows <br><div style="margin-left: 40px;">oneadmin@OneHost:/var/images/ubuntu1010$ oneimage list<br>  ID USER     GROUP    NAME         DATASTORE     SIZE TYPE PER STAT  RVMS<br>   5 oneadmin oneadmin Ubuntu_1010  production      0M   OS  No  <span style="font-weight: bold; color: rgb(255, 0, 0);">rdy </span>    0<br></div>10. However oneimage show 5 - shows the correct error message, howerver with a misleading "State" value.<br><br>oneadmin@OneHost:/var/images/ubuntu1010$ oneimage show 5<br><div style="margin-left: 40px;">IMAGE 5 INFORMATION<br>ID             : 5<br>NAME           : Ubuntu_1010<br>USER           : oneadmin<br>GROUP          : oneadmin<br>DATASTORE      : production<br>TYPE           : OS<br>REGISTER TIME  : 04/30 23:58:17<br>PERSISTENT     : No<br>SOURCE         :<br>PATH           : /var/images/ubuntu1010<br>SIZE           : 0<br><span style="font-weight: bold; color: rgb(255, 0, 0);">STATE          : rdy</span><br>RUNNING_VMS    : 0<br><br>PERMISSIONS<br>OWNER          : um-<br>GROUP          : ---<br>OTHER          : ---<br><br>IMAGE TEMPLATE<br>DEV_PREFIX="hd"<br>ERROR=[<br> <span style="font-weight: bold; color: rgb(204, 0, 0);"> MESSAGE="Error copying image in the repository: Error renaming disk file Ubuntu1010-i386-flat.vmdk",</span><br style="font-weight: bold; color: rgb(204, 0, 0);"><span style="font-weight: bold; color: rgb(204, 0, 0);">  TIMESTAMP="Mon Apr 30 23:59:17 2012" ]</span><br>oneadmin@OneHost:/var/images/ubuntu1010$<br></div><br><br><br><br>Regards,<br><blockquote style="border-left: 1px solid #0000FF; padding-left: 6px;"><div><div style="font-size:10pt;font-family:verdana,arial,helvetica,sans-serif;"><blockquote style="border-left: 1px solid #0000ff; padding-left: 6px;"><div><div style="font-size:10pt;font-family:verdana,arial,helvetica,sans-serif;">Anil Kumar A.N.<br>[cloud-b-lab]<br></div></div></blockquote><br></div></div></blockquote><br></div></body></html>