mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-25 02:50:08 +03:00
Feature #1291: Fix Image state transition from READY to USED/USED_PERS
This commit is contained in:
parent
24db7e7527
commit
37a816d4a4
@ -92,7 +92,16 @@ int ImageManager::acquire_image(Image *img, string& error)
|
||||
{
|
||||
case Image::READY:
|
||||
img->inc_running();
|
||||
img->set_state(Image::USED);
|
||||
|
||||
if ( img->isPersistent() )
|
||||
{
|
||||
img->set_state(Image::USED_PERS);
|
||||
}
|
||||
else
|
||||
{
|
||||
img->set_state(Image::USED);
|
||||
}
|
||||
|
||||
ipool->update(img);
|
||||
break;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user