Bug #4781

Delete new image when mkimage/mkswap fails

Added by Javi Fontan almost 5 years ago. Updated almost 5 years ago.

Status:ClosedStart date:09/15/2016
Priority:NormalDue date:
Assignee:Javi Fontan% Done:

0%

Category:Drivers - Storage
Target version:Release 5.2
Resolution: Pull request:
Affected Versions:OpenNebula 5.0

Description

If the mkimage is able to create the a new image but fails initializing it the image should be deleted.

mkimage (4.57 KB) Javi Fontan, 09/16/2016 02:31 PM


Related issues

Duplicated by Bug #4784: Unsuccessful Hotplug of Volatile disks causes RBD to not ... Closed 09/15/2016

Associated revisions

Revision 5dc6f8c4
Added by Javi Fontan almost 5 years ago

B #4781: ceph delete image if it fails being created

Revision 12c6c793
Added by Javi Fontan almost 5 years ago

B #4781: move ssh_exec_and_log_no_exit to library

Revision 33b96e73
Added by Javi Fontan almost 5 years ago

B #4781: ceph delete image if it fails being created

Revision 098fe294
Added by Javi Fontan almost 5 years ago

B #4781: move ssh_exec_and_log_no_exit to library

Revision ab9dfbcb
Added by Jaime Melis almost 5 years ago

B #4781: Rollback for ssh, shared and qcow2

Revision 82b3c109
Added by Jaime Melis over 4 years ago

B #4781: Typo in the function name

History

#1 Updated by Javi Fontan almost 5 years ago

  • Duplicated by Bug #4784: Unsuccessful Hotplug of Volatile disks causes RBD to not be cleared upon VM termination added

#2 Updated by Javi Fontan almost 5 years ago

  • Description updated (diff)

#3 Updated by Javi Fontan almost 5 years ago

We have found and patched the problem. You can apply it placing the file attached in /var/lib/one/remotes/tm/ceph/mkimage.

Daemon restart is not needed.

There's going to a final patch that moves some functionality to libraries and other drivers are also checked for this problem.

#4 Updated by Anton Todorov almost 5 years ago

Hi Javi,

Is it possible to add `exec_and_log_no_exit()` too?

In our addon there is an option to run the mkfs command on the front-end, so i am using exec_and_log() there...

Kind Regards,
Anton Todorov

#5 Updated by Anton Todorov almost 5 years ago

Hi Javi,

Quick update :)
I've just rethink the issue and solved it with a trap() hook.

So it is nice to have both versions of exec_and_log but not in a hurry ;)

Kind Regards,
Anton Todorov

#6 Updated by Ruben S. Montero almost 5 years ago

  • Assignee set to Javi Fontan
  • Target version set to Release 5.2

#7 Updated by Jaime Melis almost 5 years ago

  • Status changed from Pending to Closed

Also available in: Atom PDF