Add status updates

feature/node-rewrite
Sven Slootweg 13 years ago
parent 4967e47a40
commit d5472da07e

@ -63,6 +63,9 @@ class Container extends CPHPDatabaseRecordClass
// TODO: set sensible values depending on container resource configuration // TODO: set sensible values depending on container resource configuration
// http://wiki.openvz.org/UBC_consistency_check // http://wiki.openvz.org/UBC_consistency_check
$this->uStatus = CVM_STATUS_CREATED;
$this->InsertIntoDatabase();
$command = shrink_command("vzctl set {$this->sInternalId} $command = shrink_command("vzctl set {$this->sInternalId}
--onboot yes --onboot yes
--setmode restart --setmode restart
@ -101,6 +104,9 @@ class Container extends CPHPDatabaseRecordClass
if($result->returncode == 0) if($result->returncode == 0)
{ {
$this->uStatus = CVM_STATUS_CONFIGURED;
$this->InsertIntoDatabase();
return true; return true;
} }
else else
@ -121,6 +127,8 @@ class Container extends CPHPDatabaseRecordClass
if($result->returncode == 0) if($result->returncode == 0)
{ {
$this->uStatus = CVM_STATUS_STARTED;
$this->InsertIntoDatabase();
return true; return true;
} }
else else

Loading…
Cancel
Save