z-image-resize-used-pers.patch
opennebula-3.8.1.resize-used-pers/src/image/ImageManagerActions.cc 2013-01-15 17:34:46.000000000 -0500 | ||
---|---|---|
769 | 769 |
return -1; |
770 | 770 |
} |
771 | 771 |
|
772 |
if (img->get_state() != Image::READY ) |
|
772 |
if ( img->get_state() != Image::READY && |
|
773 |
img->get_state() != Image::USED && |
|
774 |
img->get_state() != Image::USED_PERS ) |
|
773 | 775 |
{ |
774 | 776 |
oss << "Cannot resize image in state: " |
775 | 777 |
<< Image::state_to_str(img->get_state()); |
opennebula-3.8.1.resize-used-pers/src/image/ImageManagerDriver.cc 2013-01-15 17:34:46.000000000 -0500 | ||
---|---|---|
556 | 556 |
goto error; |
557 | 557 |
} |
558 | 558 |
|
559 |
image->set_state(Image::READY); |
|
559 |
if ( image->get_running() == 0 ) { |
|
560 |
image->set_state(Image::READY); |
|
561 |
} else if ( image->isPersistent() ) { |
|
562 |
image->set_state(Image::USED_PERS); |
|
563 |
} else { |
|
564 |
image->set_state(Image::USED); |
|
565 |
} |
|
560 | 566 |
|
561 | 567 |
ipool->update(image); |
562 | 568 |
|