Bug #762
Save image error after restarting oned 3.0
Status: | Closed | Start date: | 08/03/2011 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | Ruben S. Montero | % Done: | 0% | |
Category: | Core & System | |||
Target version: | Release 3.0 | |||
Resolution: | fixed | Pull request: | ||
Affected Versions: |
Description
I user NFS tm and persistent image.
Normally, when I shut down a vm (onevm shutdown id) image manager doesn't try to move disk image to repository:
Wed Aug 3 06:15:27 2011 [DiM][D]: Shutting down VM 482 Wed Aug 3 06:15:38 2011 [VMM][D]: Message received: LOG I 482 ExitCode: 0 Wed Aug 3 06:15:38 2011 [VMM][D]: Message received: SHUTDOWN SUCCESS 482 Domain one-482 is being shutdown Wed Aug 3 06:15:38 2011 [VMM][D]: Message received: Wed Aug 3 06:15:38 2011 [TM][D]: Message received: LOG I 482 tm_mv.sh: Moving /var/lib/one//482/images/disk.0 Wed Aug 3 06:15:38 2011 [TM][D]: Message received: LOG I 482 tm_mv.sh: Executed "mv /var/lib/one//482/images/disk.0 /var/lib/one/482/disk.0". Wed Aug 3 06:15:38 2011 [TM][D]: Message received: LOG I 482 ExitCode: 0 Wed Aug 3 06:15:38 2011 [TM][D]: Message received: LOG I 482 tm_delete.sh: Deleting /var/lib/one//482/images Wed Aug 3 06:15:38 2011 [TM][D]: Message received: LOG I 482 tm_delete.sh: Executed "rm -rf /var/lib/one//482/images". Wed Aug 3 06:15:38 2011 [TM][D]: Message received: LOG I 482 ExitCode: 0 Wed Aug 3 06:15:38 2011 [TM][D]: Message received: TRANSFER SUCCESS 482 - Wed Aug 3 06:15:38 2011 [ImM][I]: Moving disk /var/lib/one/482/disk.0 to repository image 39 Wed Aug 3 06:15:38 2011 [ImG][D]: Message received: LOG I 39 mv: Moving local image /var/lib/one/482/disk.0 to the image repository Wed Aug 3 06:15:38 2011 [ImM][I]: mv: Moving local image /var/lib/one/482/disk.0 to the image repository Wed Aug 3 06:15:38 2011 [ImG][D]: Message received: LOG I 39 mv: Not moving files to image repo, they are the same Wed Aug 3 06:15:38 2011 [ImM][I]: mv: Not moving files to image repo, they are the same Wed Aug 3 06:15:38 2011 [ImG][D]: Message received: LOG I 39 mv: Executed "chmod 0660 /var/lib/one//images/18f4a1501dc79affd175222bd479c700d592f53f". Wed Aug 3 06:15:38 2011 [ImM][I]: mv: Executed "chmod 0660 /var/lib/one//images/18f4a1501dc79affd175222bd479c700d592f53f". Wed Aug 3 06:15:38 2011 [ImG][D]: Message received: LOG I 39 ExitCode: 0 Wed Aug 3 06:15:38 2011 [ImM][I]: ExitCode: 0 Wed Aug 3 06:15:38 2011 [ImG][D]: Message received: MV SUCCESS 39 /var/lib/one//images/18f4a1501dc79affd175222bd479c700d592f53f Wed Aug 3 06:15:38 2011 [ImM][I]: Image saved and ready to use.
After restarting opennebula I get error:
Wed Aug 3 06:03:05 2011 [DiM][D]: Shutting down VM 481 Wed Aug 3 06:03:15 2011 [VMM][D]: Message received: LOG I 481 ExitCode: 0 Wed Aug 3 06:03:15 2011 [VMM][D]: Message received: SHUTDOWN SUCCESS 481 Domain one-481 is being shutdown Wed Aug 3 06:03:15 2011 [VMM][D]: Message received: Wed Aug 3 06:03:15 2011 [TM][D]: Message received: LOG I 481 tm_mv.sh: Will not move, source and destination are equal Wed Aug 3 06:03:15 2011 [TM][D]: Message received: LOG I 481 ExitCode: 0 Wed Aug 3 06:03:15 2011 [TM][D]: Message received: LOG I 481 tm_delete.sh: Deleting Wed Aug 3 06:03:15 2011 [TM][D]: Message received: LOG I 481 tm_delete.sh: Executed "rm -rf ". Wed Aug 3 06:03:15 2011 [TM][D]: Message received: LOG I 481 ExitCode: 0 Wed Aug 3 06:03:15 2011 [TM][D]: Message received: TRANSFER SUCCESS 481 - Wed Aug 3 06:03:15 2011 [ImM][I]: Moving disk /disk.0 to repository image 39 Wed Aug 3 06:03:15 2011 [ImG][D]: Message received: LOG I 39 Command execution fail: /var/lib/one/remotes/image/fs/mv /disk.0 /var/lib/one//images/18f4a1501dc79affd175222bd479c700d592f53f 39 Wed Aug 3 06:03:15 2011 [ImM][I]: Command execution fail: /var/lib/one/remotes/image/fs/mv /disk.0 /var/lib/one//images/18f4a1501dc79affd175222bd479c700d592f53f 39 Wed Aug 3 06:03:15 2011 [ImG][D]: Message received: LOG I 39 mv: Moving local image /disk.0 to the image repository Wed Aug 3 06:03:15 2011 [ImM][I]: mv: Moving local image /disk.0 to the image repository Wed Aug 3 06:03:15 2011 [ImG][D]: Message received: LOG E 39 mv: Command "mv -f /disk.0 /var/lib/one//images/18f4a1501dc79affd175222bd479c700d592f53f" failed. Wed Aug 3 06:03:15 2011 [ImM][E]: mv: Command "mv -f /disk.0 /var/lib/one//images/18f4a1501dc79affd175222bd479c700d592f53f" failed. Wed Aug 3 06:03:15 2011 [ImG][D]: Message received: LOG E 39 mv: mv: cannot stat `/disk.0': No such file or directory Wed Aug 3 06:03:15 2011 [ImM][E]: mv: mv: cannot stat `/disk.0': No such file or directory Wed Aug 3 06:03:15 2011 [ImG][D]: Message received: LOG E 39 Could not move /disk.0 to /var/lib/one//images/18f4a1501dc79affd175222bd479c700d592f53f Wed Aug 3 06:03:15 2011 [ImM][E]: Could not move /disk.0 to /var/lib/one//images/18f4a1501dc79affd175222bd479c700d592f53f Wed Aug 3 06:03:15 2011 [ImG][D]: Message received: LOG I 39 ExitCode: 1 Wed Aug 3 06:03:15 2011 [ImM][I]: ExitCode: 1 Wed Aug 3 06:03:15 2011 [ImG][D]: Message received: MV FAILURE 39 Could not move /disk.0 to /var/lib/one//images/18f4a1501dc79affd175222bd479c700d592f53f
and image is in ERR state, I have to manually enable it.
Related issues
Associated revisions
History
#1 Updated by Grzegorz Kocur almost 10 years ago
Same problem when deleting vm (onevm delete <id>)
#2 Updated by Grzegorz Kocur almost 10 years ago
The problem is:
/var/lib/one/remotes/image/fs/mv gets /disk.0 as $1 instead of /var/lib/one/<vmid>/disk.0.
I haven't figured out why yet...
#3 Updated by Grzegorz Kocur almost 10 years ago
IMO there are two cases:
- When deleting VM with persistent image:
The image should be moved from/var/lib/one/<vid>/images/disk.0
to/var/lib/one/<vid>disk.0
first, but it's not. It's causes error:Tue Aug 9 07:49:06 2011 [ReM][D]: VirtualMachineAction method invoked Tue Aug 9 07:49:06 2011 [DiM][D]: Finalizing VM 542 Tue Aug 9 07:49:06 2011 [VMM][D]: Message received: LOG I 542 Driver command for 542 cancelled Tue Aug 9 07:49:06 2011 [ReM][D]: ImageInfo method invoked Tue Aug 9 07:49:06 2011 [ImM][I]: Moving disk /var/lib/one/542/disk.0 to repository image 151 Tue Aug 9 07:49:07 2011 [ImG][D]: Message received: LOG I 151 Command execution fail: /var/lib/one/remotes/image/fs/mv /var/lib/one/542/disk.0 /var/lib/one/images/f63e 8a2c425cc8c70d6eab31968ff787 151 Tue Aug 9 07:49:07 2011 [ImM][I]: Command execution fail: /var/lib/one/remotes/image/fs/mv /var/lib/one/542/disk.0 /var/lib/one/images/f63e8a2c425cc8c70d6eab31968ff787 151 Tue Aug 9 07:49:07 2011 [ImG][D]: Message received: LOG I 151 mv: Moving local image /var/lib/one/542/disk.0 to the image repository Tue Aug 9 07:49:07 2011 [ImM][I]: mv: Moving local image /var/lib/one/542/disk.0 to the image repository Tue Aug 9 07:49:07 2011 [ImG][D]: Message received: LOG E 151 mv: Command "mv -f /var/lib/one/542/disk.0 /var/lib/one/images/f63e8a2c425cc8c70d6eab31968ff787" failed. Tue Aug 9 07:49:07 2011 [ImM][E]: mv: Command "mv -f /var/lib/one/542/disk.0 /var/lib/one/images/f63e8a2c425cc8c70d6eab31968ff787" failed. Tue Aug 9 07:49:07 2011 [ImG][D]: Message received: LOG E 151 mv: mv: cannot stat `/var/lib/one/542/disk.0': No such file or directory Tue Aug 9 07:49:07 2011 [ImM][E]: mv: mv: cannot stat `/var/lib/one/542/disk.0': No such file or directory Tue Aug 9 07:49:07 2011 [ImG][D]: Message received: LOG E 151 Could not move /var/lib/one/542/disk.0 to /var/lib/one/images/f63e8a2c425cc8c70d6eab31968ff787 Tue Aug 9 07:49:07 2011 [ImM][E]: Could not move /var/lib/one/542/disk.0 to /var/lib/one/images/f63e8a2c425cc8c70d6eab31968ff787 Tue Aug 9 07:49:07 2011 [ImG][D]: Message received: LOG I 151 ExitCode: 1 Tue Aug 9 07:49:07 2011 [ImM][I]: ExitCode: 1 Tue Aug 9 07:49:07 2011 [ImG][D]: Message received: MV FAILURE 151 Could not move /var/lib/one/542/disk.0 to /var/lib/one/images/f63e8a2c425cc8c70d6eab31968ff787
- After restarting opennebula similar problem at SHUTDOWN: the src path is corrupted (see log above)
#4 Updated by Ruben S. Montero almost 10 years ago
- Category set to Core & System
- Assignee set to Ruben S. Montero
- Target version set to Release 3.0
#5 Updated by Ruben S. Montero almost 10 years ago
- Status changed from New to Closed
- Resolution set to fixed
This was indeed the same problem as #771. It should be fixed in master now: