public function check_consistency(EtvaNode $etva_node, $sync_node_vgs)
 {
     $errors = array();
     $etva_node->getId();
     $etva_cluster = $etva_node->getEtvaCluster();
     // get node database VGs
     $node_vgs = $etva_node->getEtvaNodeVolumegroups();
     // get shared database VGs
     $shared_vgs = $etva_cluster->getSharedVgs();
     $node_inconsistent = 0;
     foreach ($node_vgs as $rvg) {
         $vg = $rvg->getEtvaVolumegroup();
         $error = array();
         $uuid = $vg->getUuid();
         $vgname = $vg->getVg();
         // init
         $inconsistent = 0;
         // look at volume groups list
         $found_lvm = 0;
         foreach ($sync_node_vgs as $hvg) {
             $arr_hvg = (array) $hvg;
             if ($arr_hvg[EtvaVolumegroup::STORAGE_TYPE_MAP] == $vg->getStorageType()) {
                 if (isset($arr_hvg[EtvaVolumegroup::UUID_MAP])) {
                     if ($arr_hvg[EtvaVolumegroup::UUID_MAP] == $uuid) {
                         $found_lvm = 1;
                     }
                 } else {
                     if ($arr_hvg[EtvaVolumegroup::VG_MAP] == $vgname) {
                         $found_lvm = 1;
                     }
                 }
             }
         }
         $inconsistent = $inconsistent || !$found_lvm;
         if (!$found_lvm) {
             $error['not_found_lvm'] = 1;
         }
         $found_shared_lvm = 0;
         $inconsistent_shared_vgs = 0;
         foreach ($shared_vgs as $s_vg) {
             $s_uuid = $s_vg->getUuid();
             if ($s_uuid == $uuid) {
                 if ($s_vg->getStorageType() != $vg->getStorageType()) {
                     $inconsistent_shared_vgs = 1;
                 } else {
                     $found_shared_lvm = 1;
                 }
             } else {
                 if ($s_vg->getStorageType() == $vg->getStorageType()) {
                     if ($arr_hvg[EtvaVolumegroup::VG_MAP] == $vgname) {
                         $found_shared_lvm = 1;
                     }
                 }
             }
         }
         if ($vg->getStorageType() != EtvaVolumegroup::STORAGE_TYPE_LOCAL_MAP) {
             $inconsistent = $inconsistent || !$found_shared_lvm;
             if (!$found_shared_lvm) {
                 $error['not_found_shared_lvm'] = 1;
             }
         }
         $inconsistent = $inconsistent || $inconsistent_shared_vgs;
         if ($inconsistent_shared_vgs) {
             $error['diff_storage_type'] = 1;
         }
         // update data-base
         $etva_volumegroup = EtvaVolumegroupPeer::retrieveByNodeTypeUUIDVg($etva_node->getId(), $vg->getStorageType(), $vg->getUuid(), $vg->getVg());
         if ($etva_volumegroup) {
             $etva_volumegroup->setInconsistent($inconsistent);
             $etva_volumegroup->save();
         }
         $etva_node_volumegroup = EtvaNodeVolumegroupPeer::retrieveByPK($etva_node->getId(), $vg->getId());
         if ($etva_node_volumegroup) {
             $etva_node_volumegroup->setInconsistent($inconsistent);
             $etva_node_volumegroup->save();
         }
         if ($inconsistent) {
             $message = sfContext::getInstance()->getI18N()->__(EtvaVolumegroupPeer::_ERR_INCONSISTENT_, array('%info%' => sprintf('volume group "%s" with uuid "%s"', $vg->getVg(), $vg->getUuid())));
             if ($error['not_found_shared_lvm'] || $error['diff_storage_type']) {
                 $message = sfContext::getInstance()->getI18N()->__(EtvaVolumegroupPeer::_ERR_SHARED_INCONSISTENT_, array('%info%' => sprintf('volume group "%s" with uuid "%s"', $vg->getVg(), $vg->getUuid())));
             }
             sfContext::getInstance()->getEventDispatcher()->notify(new sfEvent($etva_node->getName(), 'event.log', array('message' => $message, 'priority' => EtvaEventLogger::ERR)));
             $error['node'] = array('name' => $etva_node->getName(), 'id' => $etva_node->getId(), 'uuid' => $etva_node->getUuid());
             $error['volumegroup'] = $vg->getVg();
             $error['uuid'] = $vg->getUuid();
             $error['message'] = $message;
         }
         if (!empty($error)) {
             $errors[] = $error;
         }
         $node_inconsistent = $node_inconsistent || $inconsistent;
     }
     // check consistency for shared Volume groups
     foreach ($shared_vgs as $vg) {
         $error = array();
         $uuid = $vg->getUuid();
         $vgname = $vg->getVg();
         // init
         $inconsistent = 0;
         // look at physical volumes list
         $found_lvm = 0;
         foreach ($sync_node_vgs as $hvg) {
             $arr_hvg = (array) $hvg;
             if ($arr_hvg[EtvaVolumegroup::STORAGE_TYPE_MAP] == $vg->getStorageType()) {
                 if (isset($arr_hvg[EtvaVolumegroup::UUID_MAP])) {
                     if ($arr_hvg[EtvaVolumegroup::UUID_MAP] == $uuid) {
                         $found_lvm = 1;
                     }
                 } else {
                     if ($arr_hvg[EtvaVolumegroup::VG_MAP] == $vgname) {
                         $found_lvm = 1;
                     }
                 }
             }
         }
         $inconsistent = $inconsistent || !$found_lvm;
         if (!$found_lvm) {
             $error['not_found_lvm'] = 1;
         }
         // update data-base
         $etva_volumegroup = EtvaVolumegroupPeer::retrieveByNodeTypeUUIDVg($etva_node->getId(), $vg->getStorageType(), $vg->getUuid(), $vg->getVg());
         if ($etva_volumegroup) {
             $etva_volumegroup->setInconsistent($inconsistent);
             $etva_volumegroup->save();
         }
         $etva_node_volumegroup = EtvaNodeVolumegroupPeer::retrieveByPK($etva_node->getId(), $vg->getId());
         if ($etva_node_volumegroup) {
             $etva_node_volumegroup->setInconsistent($inconsistent);
             $etva_node_volumegroup->save();
         }
         if ($inconsistent) {
             $message = sfContext::getInstance()->getI18N()->__(EtvaVolumegroupPeer::_ERR_SHARED_INCONSISTENT_, array('%info%' => sprintf('volumegroup "%s" with uuid "%s"', $vg->getVg(), $vg->getUuid())));
             sfContext::getInstance()->getEventDispatcher()->notify(new sfEvent($etva_node->getName(), 'event.log', array('message' => $message, 'priority' => EtvaEventLogger::ERR)));
             $error['node'] = array('name' => $etva_node->getName(), 'id' => $etva_node->getId(), 'uuid' => $etva_node->getUuid());
             $error['volumegroup'] = $vg->getVg();
             $error['uuid'] = $vg->getUuid();
             $error['message'] = $message;
         }
         if (!empty($error)) {
             $errors[] = $error;
         }
         $node_inconsistent = $node_inconsistent || $inconsistent;
     }
     $return = array();
     if ($node_inconsistent) {
         $etva_node->setErrorMessage(self::VGINIT);
         $return = array('success' => false, 'errors' => $errors);
     } else {
         $etva_node->clearErrorMessage(self::VGINIT);
         $return = array('success' => true);
     }
     return $return;
 }
 public function check_consistency(EtvaNode $etva_node, $sync_node_pvs)
 {
     $errors = array();
     $etva_node->getId();
     $etva_cluster = $etva_node->getEtvaCluster();
     // get node database PVs
     //$node_pvs = $etva_node->getEtvaPhysicalvolumes();
     $node_pvs = $etva_node->getEtvaNodePhysicalvolumes();
     // get shared database PVs
     $shared_pvs = $etva_cluster->getSharedPvs();
     $node_inconsistent = 0;
     foreach ($node_pvs as $rpv) {
         $pv = $rpv->getEtvaPhysicalvolume();
         $error = array();
         $uuid = $pv->getUuid();
         $device = $pv->getDevice();
         // init
         $inconsistent = 0;
         // look at physical volumes list
         $found_lvm = 0;
         foreach ($sync_node_pvs as $hpv) {
             $arr_hpv = (array) $hpv;
             if ($arr_hpv[EtvaPhysicalvolume::STORAGE_TYPE_MAP] == $pv->getStorageType()) {
                 if (isset($arr_hpv[EtvaPhysicalvolume::UUID_MAP])) {
                     if ($arr_hpv[EtvaPhysicalvolume::UUID_MAP] == $uuid) {
                         $found_lvm = 1;
                     }
                 } else {
                     if ($arr_hpv[EtvaPhysicalvolume::DEVICE_MAP] == $device) {
                         $found_lvm = 1;
                     }
                 }
             }
         }
         $inconsistent = $inconsistent || !$found_lvm;
         if (!$found_lvm) {
             $error['not_found_lvm'] = 1;
         }
         /* TODO
          *   check when have multipath
          */
         $found_shared_lvm = 0;
         $inconsistent_shared_pvs = 0;
         foreach ($shared_pvs as $s_pv) {
             $s_uuid = $s_pv->getUuid();
             $s_device = $s_pv->getDevice();
             if ($s_uuid == $uuid) {
                 if ($s_pv->getStorageType() != $pv->getStorageType()) {
                     $inconsistent_shared_pvs = 1;
                 } else {
                     $found_shared_lvm = 1;
                 }
             } else {
                 if ($s_pv->getStorageType() == $pv->getStorageType()) {
                     if ($arr_hpv[EtvaPhysicalvolume::DEVICE_MAP] == $device) {
                         $found_shared_lvm = 1;
                     }
                 }
             }
         }
         if ($pv->getStorageType() != EtvaPhysicalvolume::STORAGE_TYPE_LOCAL_MAP) {
             $inconsistent = $inconsistent || !$found_shared_lvm;
             if (!$found_shared_lvm) {
                 $error['not_found_shared_lvm'] = 1;
             }
         }
         $inconsistent = $inconsistent || $inconsistent_shared_pvs;
         if ($inconsistent_shared_pvs) {
             $error['diff_storage_type'] = 1;
         }
         // update data-base
         $etva_physicalvol = EtvaPhysicalvolumePeer::retrieveByNodeTypeUUIDDevice($etva_node->getId(), $pv->getStorageType(), $pv->getUuid(), $pv->getDevice());
         if ($etva_physicalvol) {
             $etva_physicalvol->setInconsistent($inconsistent);
             $etva_physicalvol->save();
         }
         $etva_node_physicalvol = EtvaNodePhysicalvolumePeer::retrieveByPK($etva_node->getId(), $pv->getId());
         if ($etva_node_physicalvol) {
             $etva_node_physicalvol->setInconsistent($inconsistent);
             $etva_node_physicalvol->save();
         }
         if ($inconsistent) {
             $message = sfContext::getInstance()->getI18N()->__(EtvaPhysicalvolumePeer::_ERR_INCONSISTENT_, array('%info%' => sprintf('device "%s" with uuid "%s"', $pv->getDevice(), $pv->getUuid())));
             if ($error['not_found_shared_lvm'] || $error['diff_storage_type']) {
                 $message = sfContext::getInstance()->getI18N()->__(EtvaPhysicalvolumePeer::_ERR_SHARED_INCONSISTENT_, array('%info%' => sprintf('device "%s" with uuid "%s"', $pv->getDevice(), $pv->getUuid())));
             }
             sfContext::getInstance()->getEventDispatcher()->notify(new sfEvent($etva_node->getName(), 'event.log', array('message' => $message, 'priority' => EtvaEventLogger::ERR)));
             $error['node'] = array('name' => $etva_node->getName(), 'id' => $etva_node->getId(), 'uuid' => $etva_node->getUuid());
             $error['device'] = $pv->getDevice();
             $error['device_id'] = $pv->getId();
             $error['uuid'] = $pv->getUuid();
             $error['message'] = $message;
         }
         if (!empty($error)) {
             $errors[] = $error;
         }
         $node_inconsistent = $node_inconsistent || $inconsistent;
     }
     // check consistency for shared PVs
     foreach ($shared_pvs as $pv) {
         $error = array();
         $uuid = $pv->getUuid();
         $device = $pv->getDevice();
         // init
         $inconsistent = 0;
         // look at physical volumes list
         $found_lvm = 0;
         foreach ($sync_node_pvs as $hpv) {
             $arr_hpv = (array) $hpv;
             if ($arr_hpv[EtvaPhysicalvolume::STORAGE_TYPE_MAP] == $pv->getStorageType()) {
                 if (isset($arr_hpv[EtvaPhysicalvolume::UUID_MAP])) {
                     if ($arr_hpv[EtvaPhysicalvolume::UUID_MAP] == $uuid) {
                         $found_lvm = 1;
                     }
                 } else {
                     if ($arr_hpv[EtvaPhysicalvolume::DEVICE_MAP] == $device) {
                         $found_lvm = 1;
                     }
                 }
             }
         }
         $inconsistent = $inconsistent || !$found_lvm;
         if (!$found_lvm) {
             $error['not_found_lvm'] = 1;
         }
         /* TODO
          *   check when have multipath
          */
         // update data-base
         $etva_physicalvol = EtvaPhysicalvolumePeer::retrieveByNodeTypeUUIDDevice($etva_node->getId(), $pv->getStorageType(), $pv->getUuid(), $pv->getDevice());
         if ($etva_physicalvol) {
             $etva_physicalvol->setInconsistent($inconsistent);
             $etva_physicalvol->save();
         }
         $etva_node_physicalvol = EtvaNodePhysicalvolumePeer::retrieveByPK($etva_node->getId(), $pv->getId());
         if ($etva_node_physicalvol) {
             $etva_node_physicalvol->setInconsistent($inconsistent);
             $etva_node_physicalvol->save();
         }
         if ($inconsistent) {
             $message = sfContext::getInstance()->getI18N()->__(EtvaPhysicalvolumePeer::_ERR_SHARED_INCONSISTENT_, array('%info%' => sprintf('device "%s" with uuid "%s"', $pv->getDevice(), $pv->getUuid())));
             sfContext::getInstance()->getEventDispatcher()->notify(new sfEvent($etva_node->getName(), 'event.log', array('message' => $message, 'priority' => EtvaEventLogger::ERR)));
             $error['node'] = array('name' => $etva_node->getName(), 'id' => $etva_node->getId(), 'uuid' => $etva_node->getUuid());
             $error['device'] = $pv->getDevice();
             $error['device_id'] = $pv->getId();
             $error['uuid'] = $pv->getUuid();
             $error['message'] = $message;
         }
         if (!empty($error)) {
             $errors[] = $error;
         }
         $node_inconsistent = $node_inconsistent || $inconsistent;
     }
     $return = array();
     if ($node_inconsistent) {
         $etva_node->setErrorMessage(self::PVINIT);
         $return = array('success' => false, 'errors' => $errors);
     } else {
         $etva_node->clearErrorMessage(self::PVINIT);
         $return = array('success' => true);
     }
     return $return;
     //($node_inconsistent) ? false : true;
 }
Example #3
0
 private function check_vgs(EtvaNode $etva_node)
 {
     $node_response = $etva_node->soapSend('getvgs_arr', array('force' => 1));
     if (!$node_response['success']) {
         $errors = $node_response['error'];
         Etva::getLogMessage(array('info' => ''), EtvaVolumegroupPeer::_ERR_INCONSISTENT_);
         $etva_node->setErrorMessage(EtvaVolumegroup_VA::LVINIT);
         $message = Etva::getLogMessage(array('info' => $node_response['info']), EtvaVolimegroupPeer::_ERR_SOAPUPDATE_);
         sfContext::getInstance()->getEventDispatcher()->notify(new sfEvent($etva_node->getName(), 'event.log', array('message' => $message, 'priority' => EtvaEventLogger::ERR)));
         $response = array('success' => false, 'error' => $errors);
         $return = $this->setJsonError($response);
         return $this->renderText($return);
     }
     //verify if cluster has any logical volume that belongs to another cluster...
     $cluster_id = $etva_node->getClusterId();
     $my_vgs = $node_response['response'];
     $my_vgs = (array) $my_vgs;
     foreach ($my_vgs as $my_vg) {
         $vg_info = (array) $my_vg;
         //ignore in case of a local device
         if ($vg_info['type'] == EtvaVolumegroup::STORAGE_TYPE_LOCAL_MAP) {
             continue;
         }
         $c_uuid = new criteria();
         $c_uuid->add(EtvaVolumegroupPeer::UUID, $vg_info['uuid']);
         $c_uuid->addAnd(EtvaVolumegroupPeer::CLUSTER_ID, $cluster_id, Criteria::NOT_EQUAL);
         $e_vg = EtvaVolumegroupPeer::doSelectOne($c_uuid);
         if ($e_vg) {
             $c_c = new Criteria();
             $c_c->add(EtvaClusterPeer::ID, $e_vg->getClusterId());
             $etva_cluster = EtvaClusterPeer::doSelectOne($c_c);
             $msg_i18n = $this->getContext()->getI18N()->__(EtvaVolumegroupPeer::_ERR_INIT_OTHER_CLUSTER_, array('%name%' => $etva_cluster->getName()));
             // $res = "Volume group exists on cluster ".$etva_cluster->getName();
             $response = array('success' => false, 'agent' => sfConfig::get('config_acronym'), 'error' => $msg_i18n, 'info' => $msg_i18n);
             $return = $this->setJsonError($response);
             return $this->renderText($return);
         }
     }
 }
 public function check_consistency(EtvaNode $etva_node, $sync_node_lvs, $sync_node_dtable, $sync_bulk_dtable)
 {
     $errors = array();
     $etva_node->getId();
     $etva_cluster = $etva_node->getEtvaCluster();
     // get node database LVs
     $node_lvs = $etva_node->getEtvaLogicalvolumes();
     $node_inconsistent = 0;
     foreach ($node_lvs as $lv) {
         $error = array();
         $uuid = $lv->getUuid();
         $device = $lv->getLvdevice();
         $etva_vg = $lv->getEtvaVolumegroup();
         $vgname = $etva_vg->getVg();
         $is_FileDiskVG = $vgname == sfConfig::get('app_volgroup_disk_flag') ? true : false;
         // init
         $inconsistent = 0;
         // look at logical volumes list
         $found_lvm = 0;
         foreach ($sync_node_lvs as $hlv) {
             $arr_hlv = (array) $hlv;
             if ($arr_hlv[EtvaLogicalvolume::STORAGE_TYPE_MAP] == $lv->getStorageType()) {
                 if ($arr_hlv[EtvaLogicalvolume::UUID_MAP]) {
                     if ($arr_hlv[EtvaLogicalvolume::UUID_MAP] == $uuid) {
                         $found_lvm = 1;
                     }
                 } else {
                     if ($arr_hlv[EtvaLogicalvolume::LVDEVICE_MAP] == $device) {
                         $found_lvm = 1;
                     }
                 }
             }
         }
         $inconsistent = $inconsistent || !$found_lvm;
         if (!$found_lvm) {
             $error['not_found_lvm'] = 1;
         }
         if (!$is_FileDiskVG) {
             // if not file disk volume
             // look at devices table
             $clvdev = $device;
             $clvdev = str_replace("/dev/", "", $clvdev);
             $clvdev = str_replace("-", "--", $clvdev);
             $clvdev = str_replace("/", "-", $clvdev);
             $re_clvdev = "/" . $clvdev . ":/";
             // found device table of node
             $node_lv_dtable_aux = preg_grep($re_clvdev, $sync_node_dtable);
             // ignore snapshots
             $node_lv_dtable = preg_grep("/(?:(?! snapshot ).)/", $node_lv_dtable_aux);
             // check if found
             $found_node_dt = empty($node_lv_dtable) ? 0 : 1;
             $inconsistent = $inconsistent || !$found_node_dt;
             if (!$found_node_dt) {
                 $error['not_found_node_device_table'] = 1;
             }
         }
         // update data-base
         $etva_logicalvol = EtvaLogicalvolumePeer::retrieveByNodeTypeUUIDLv($etva_node->getId(), $lv->getStorageType(), $lv->getUuid(), $lv->getLv());
         if ($etva_logicalvol) {
             $etva_logicalvol->setInconsistent($inconsistent);
             $etva_logicalvol->save();
         }
         $etva_node_logicalvol = EtvaNodeLogicalvolumePeer::retrieveByPK($etva_node->getId(), $lv->getId());
         if ($etva_node_logicalvol) {
             $etva_node_logicalvol->setInconsistent($inconsistent);
             $etva_node_logicalvol->save();
         }
         if ($inconsistent) {
             $message = sfContext::getInstance()->getI18N()->__(EtvaLogicalvolumePeer::_ERR_INCONSISTENT_, array('%info%' => sprintf('device "%s" with uuid "%s"', $lv->getLvdevice(), $lv->getUuid())));
             sfContext::getInstance()->getEventDispatcher()->notify(new sfEvent($etva_node->getName(), 'event.log', array('message' => $message, 'priority' => EtvaEventLogger::ERR)));
             $error['node'] = array('name' => $etva_node->getName(), 'id' => $etva_node->getId(), 'uuid' => $etva_node->getUuid());
             $error['device'] = $lv->getLvdevice();
             $error['uuid'] = $lv->getUuid();
             $error['message'] = $message;
         }
         if (!empty($error)) {
             $errors[] = $error;
         }
         $node_inconsistent = $node_inconsistent || $inconsistent;
     }
     // get shared database LVs
     $shared_lvs = $etva_cluster->getSharedLvs();
     // check consistency for shared LVs
     foreach ($shared_lvs as $lv) {
         $error = array();
         $uuid = $lv->getUuid();
         $device = $lv->getLvdevice();
         $etva_vg = $lv->getEtvaVolumegroup();
         $vgname = $etva_vg->getVg();
         // init
         $inconsistent = 0;
         // look at logical volumes list
         $found_lvm = 0;
         foreach ($sync_node_lvs as $hlv) {
             $arr_hlv = (array) $hlv;
             if ($arr_hlv[EtvaLogicalvolume::STORAGE_TYPE_MAP] == $lv->getStorageType()) {
                 if (isset($arr_hlv[EtvaLogicalvolume::UUID_MAP])) {
                     if ($arr_hlv[EtvaLogicalvolume::UUID_MAP] == $uuid) {
                         $found_lvm = 1;
                     }
                 } else {
                     if ($arr_hlv[EtvaLogicalvolume::LVDEVICE_MAP] == $device) {
                         $found_lvm = 1;
                     }
                 }
             }
         }
         $inconsistent = $inconsistent || !$found_lvm;
         if (!$found_lvm) {
             $error['not_found_lvm'] = 1;
         }
         // look at devices table
         $clvdev = $device;
         $clvdev = str_replace("/dev/", "", $clvdev);
         $clvdev = str_replace("-", "--", $clvdev);
         $clvdev = str_replace("/", "-", $clvdev);
         $re_clvdev = "/" . $clvdev . ":/";
         // found device table of node
         $node_lv_dtable_aux = preg_grep($re_clvdev, $sync_node_dtable);
         // ignore snapshots
         $node_lv_dtable = preg_grep("/(?:(?! snapshot ).)/", $node_lv_dtable_aux);
         // check if found
         $found_node_dt = empty($node_lv_dtable) ? 0 : 1;
         $inconsistent = $inconsistent || !$found_node_dt;
         if (!$found_node_dt) {
             $error['not_found_node_device_table'] = 1;
         }
         // look at all nodes devices table
         $found_all_nodes_dt = 1;
         foreach ($sync_bulk_dtable as $e_id => $e_response) {
             if ($e_response['success']) {
                 //response received ok
                 $dtable = (array) $e_response['response'];
                 // found device table of node
                 $lv_dtable = preg_grep($re_clvdev, $dtable);
                 $found = empty($lv_dtable) ? 0 : 1;
                 $is_eq = count($lv_dtable) == count($node_lv_dtable) ? 1 : 0;
                 if ($is_eq) {
                     foreach ($lv_dtable as $e_line) {
                         // TODO fix this
                         if (!in_array($e_line, $node_lv_dtable)) {
                             $is_eq = 0;
                         }
                     }
                 }
                 $found_all_nodes_dt = $found_all_nodes_dt && $found && $is_eq;
             }
         }
         $inconsistent = $inconsistent || !$found_all_nodes_dt;
         if (!$found_all_nodes_dt) {
             $error['not_found_all_nodes_device_table'] = 1;
         }
         // update data-base
         $etva_logicalvol = EtvaLogicalvolumePeer::retrieveByNodeTypeUUIDLv($etva_node->getId(), $lv->getStorageType(), $lv->getUuid(), $lv->getLv());
         if ($etva_logicalvol) {
             $etva_logicalvol->setInconsistent($inconsistent);
             $etva_logicalvol->save();
         }
         $etva_node_logicalvol = EtvaNodeLogicalvolumePeer::retrieveByPK($etva_node->getId(), $lv->getId());
         if ($etva_node_logicalvol) {
             $etva_node_logicalvol->setInconsistent($inconsistent);
             $etva_node_logicalvol->save();
         }
         if ($inconsistent) {
             $message = sfContext::getInstance()->getI18N()->__(EtvaLogicalvolumePeer::_ERR_SHARED_INCONSISTENT_, array('%info%' => sprintf('device "%s" with uuid "%s"', $lv->getLvdevice(), $lv->getUuid())));
             sfContext::getInstance()->getEventDispatcher()->notify(new sfEvent($etva_node->getName(), 'event.log', array('message' => $message, 'priority' => EtvaEventLogger::ERR)));
             $error['node'] = array('name' => $etva_node->getName(), 'id' => $etva_node->getId(), 'uuid' => $etva_node->getUuid());
             $error['device'] = $lv->getLvdevice();
             $error['uuid'] = $lv->getUuid();
             $error['message'] = $message;
         }
         if (!empty($error)) {
             $errors[] = $error;
         }
         $node_inconsistent = $node_inconsistent || $inconsistent;
     }
     $return = array();
     if ($node_inconsistent) {
         $etva_node->setErrorMessage(self::LVINIT);
         $return = array('success' => false, 'errors' => $errors);
     } else {
         $etva_node->clearErrorMessage(self::LVINIT);
         $return = array('success' => true);
     }
     return $return;
 }