summaryrefslogtreecommitdiffstats
path: root/share/starlingx_base/registration/registration.py
diff options
context:
space:
mode:
Diffstat (limited to 'share/starlingx_base/registration/registration.py')
-rw-r--r--share/starlingx_base/registration/registration.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/share/starlingx_base/registration/registration.py b/share/starlingx_base/registration/registration.py
index 6064b5ee..9fb0f57d 100644
--- a/share/starlingx_base/registration/registration.py
+++ b/share/starlingx_base/registration/registration.py
@@ -245,6 +245,17 @@ class RegistryHelper(newton_registration.RegistryHelper):
new_vimid = extsys.encode_vim_id(
cloud_owner, gen_cloud_region_id)
super(RegistryHelper, self).registryV0(new_vimid, project_idorname)
+ # update k8s connectivity
+ try:
+ newviminfo = VimDriverUtils.get_vim_info(new_vimid)
+ sess = VimDriverUtils.get_session(
+ newviminfo, tenant_name=newviminfo.get('tenant', None))
+ self._update_k8s_info(cloud_owner, gen_cloud_region_id, newviminfo, sess)
+ except Exception as e:
+ self.__logger.debug(
+ "update k8s info failes for cloud region:%s,%s, %s"
+ % (cloud_owner, gen_cloud_region_id, str(e)))
+ # continue the registration without reporting error
except Exception as e:
self._logger.debug("registryV0 fails %s" % str(e))
@@ -255,7 +266,9 @@ class RegistryHelper(newton_registration.RegistryHelper):
#re-fetch viminfo
viminfo = VimDriverUtils.get_vim_info(vimid)
except Exception as e:
- self._logger.debug("update cloud region fails %s" % str(e))
+ self._logger.debug(
+ "update cloud region fails for cloud region: %s,%s, %s"
+ % (cloud_owner, cloud_region_id, str(e)))
# update k8s connectivity
try: