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