Revert "Bug 1234: OSM reports successful deployment when a charm relation fails"...
[osm/LCM.git] / osm_lcm / ns.py
index b7df0b6..3e6bafc 100644 (file)
@@ -2044,16 +2044,13 @@ class NsLcm(LcmBase):
             )
 
             # add relations for this VCA (wait for other peers related with this VCA)
-            is_relation_added = await self._add_vca_relations(
+            await self._add_vca_relations(
                 logging_text=logging_text,
                 nsr_id=nsr_id,
                 vca_type=vca_type,
                 vca_index=vca_index,
             )
 
-            if not is_relation_added:
-                raise LcmException("Relations could not be added to VCA.")
-
             # if SSH access is required, then get execution environment SSH public
             # if native charm we have waited already to VM be UP
             if vca_type in ("k8s_proxy_charm", "lxc_proxy_charm", "helm", "helm-v3"):
@@ -2248,7 +2245,7 @@ class NsLcm(LcmBase):
             self._write_configuration_status(
                 nsr_id=nsr_id, vca_index=vca_index, status="BROKEN"
             )
-            raise LcmException("{}. {}".format(step, e)) from e
+            raise LcmException("{} {}".format(step, e)) from e
 
     def _write_ns_status(
         self,
@@ -3216,14 +3213,11 @@ class NsLcm(LcmBase):
                 requirer_vca_id,
                 relation.requirer.endpoint,
             )
-            try:
-                await self.vca_map[vca_type].add_relation(
-                    provider=provider_relation_endpoint,
-                    requirer=requirer_relation_endpoint,
-                )
-            except N2VCException as exception:
-                self.logger.error(exception)
-                raise LcmException(exception)
+            await self.vca_map[vca_type].add_relation(
+                provider=provider_relation_endpoint,
+                requirer=requirer_relation_endpoint,
+            )
+            # remove entry from relations list
             return True
         return False