diff --git a/core/mutex.class.inc.php b/core/mutex.class.inc.php index 82e67dd60..ea459d0bf 100644 --- a/core/mutex.class.inc.php +++ b/core/mutex.class.inc.php @@ -133,7 +133,9 @@ class iTopMutex } if (($res !== '1') && ($res !== '0')) { - IssueLog::Error('GET_LOCK('.$this->sName.', 0) returned: '.var_export($res, true).'. Expected values are: 0, 1 or null !!'); + $sMsg = 'GET_LOCK('.$this->sName.', 0) returned: '.var_export($res, true).'. Expected values are: 0, 1 or null'; + IssueLog::Error($sMsg); + throw new Exception($sMsg); } return ($res !== '0'); } diff --git a/datamodels/2.x/itop-backup/ajax.backup.php b/datamodels/2.x/itop-backup/ajax.backup.php index 24020c7b5..6e92249fc 100644 --- a/datamodels/2.x/itop-backup/ajax.backup.php +++ b/datamodels/2.x/itop-backup/ajax.backup.php @@ -1,5 +1,5 @@ Lock(); + IssueLog::Info('Backup Restore - LOCK acquired, executing...'); try { set_time_limit(0); @@ -144,6 +146,7 @@ EOF $sBackupFile = $sBackupDir.$sFile; $sRes = $oDBRS->RestoreFromZip($sBackupFile, $sEnvironment); + IssueLog::Info('Backup Restore - Done, releasing the LOCK'); $oRestoreMutex->Unlock(); } catch (Exception $e) diff --git a/datamodels/2.x/itop-backup/main.itop-backup.php b/datamodels/2.x/itop-backup/main.itop-backup.php index 2ea3f914a..d2cc37afa 100644 --- a/datamodels/2.x/itop-backup/main.itop-backup.php +++ b/datamodels/2.x/itop-backup/main.itop-backup.php @@ -1,5 +1,5 @@ Set('access_mode', ACCESS_READONLY, 'itop-backup'); MetaModel::GetConfig()->Set('access_message', ' - '.dict::S('bkp-restore-running'), 'itop-backup'); } } catch(Exception $e) { - + IssueLog::Error(__class__.'::'.__function__.' Failed to check if a backup/restore is running: '.$e->getMessage()); } } }