Revision 0fa579fd src/rm/RequestManagerClone.cc

View differences:

src/rm/RequestManagerClone.cc
198 198
                goto error_images;
199 199
            }
200 200

  
201
            ec = img_persistent.request_execute(new_img_id, true, img_att);
202

  
203
            if (ec != SUCCESS)
201
            if ( (*disk)->is_managed() )
204 202
            {
205
                NebulaLog::log("ReM", Log::ERROR, failure_message(ec, img_att));
203
                ec = img_persistent.request_execute(new_img_id, true, img_att);
206 204

  
207
                img_delete.request_execute(img_id, img_att);
205
                if (ec != SUCCESS)
206
                {
207
                    NebulaLog::log("ReM",Log::ERROR,failure_message(ec,img_att));
208 208

  
209
                att.resp_msg = "Failed to clone images: " + img_att.resp_msg;
209
                    img_delete.request_execute(img_id, img_att);
210 210

  
211
                goto error_images;
211
                    att.resp_msg = "Failed to clone images: " + img_att.resp_msg;
212

  
213
                    goto error_images;
214
                }
212 215
            }
213 216

  
214 217
            (*disk)->remove("IMAGE");

Also available in: Unified diff