The tcamigctl deploy topology-output-tca-m.json command fails with KeyError: 'Formatters'
search cancel

The tcamigctl deploy topology-output-tca-m.json command fails with KeyError: 'Formatters'

book

Article ID: 373357

calendar_today

Updated On:

Products

VMware Telco Cloud Automation

Issue/Introduction

TCA deployment fails when running the tcamigctl deploy input.json command

Error:

Traceback (most recent call last);
   File "/migration/tcamigctl", line 7, in module <module>
      import vm_cn_migration
   Filer "/migration/vm_cn_migration.py", line 10, in <module>
      util.app.init()
   File "/migration/util/util.py", line 70, in app_init
      logging.config.fileConfig(os.path.join(os.getenv(constraints.ENV_CONF_PATH, "./conf"), "logger.conf"), disable_excisting_loggers=False)
   File "usr/lib/python3.10/logging/config.py", line 105, in_create_formatters
      flist = cp["formatters"]["keys"]
   File "/usr/lib/python3.10/configparser.py", line 965, in__getitem__
      raise KeyError(key)
KeyError: 'Formatters'

Environment

3.1

Cause

Errors:

2024-07-16 02:17:48,670 - util.tca_api_utils - INFO - [MainThread] - Logout succeeded
2024-07-16 02:18:03,727 - cli.edit_template_cmd - INFO - [MainThread] - ========================= Edit Template details ============================
2024-07-16 02:30:48,907 - cli.edit_template_cmd - DEBUG - [Thread-4 (_wrap_start)] - Unable to close vCenter connection. 'Vcenter' object has no attribute '_service_instance'
2024-07-16 02:42:46,123 - cli.edit_template_cmd - DEBUG - [Thread-4 (_wrap_start)] -
Traceback (most recent call last):
  File "/usr/lib/python3.10/urllib/request.py", line 1505, in open_local_file
    stats = os.stat(localfile)
FileNotFoundError: [Errno 2] No such file or directory: '/data/migrationVolume/VMware-Telco-Cloud-Automation-3.1.0-23636884.ova'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/migration/cli/edit_template_cmd.py", line 1006, in __validate_url_or_template
    show_spinner(f"Validating URL '{url}'...", util.validate_url, url)
  File "/migration/cli/edit_template_cmd.py", line 103, in show_spinner
    return func(*args, **kwargs)
  File "/migration/util/util.py", line 864, in validate_url
    raise e
  File "/migration/util/util.py", line 858, in validate_url
    with contextlib.closing(urlopen(url, context=ssl_context)):
  File "/usr/lib/python3.10/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.10/urllib/request.py", line 519, in open
    response = self._open(req, data)
  File "/usr/lib/python3.10/urllib/request.py", line 536, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/usr/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.10/urllib/request.py", line 1483, in file_open
    return self.open_local_file(req)
  File "/usr/lib/python3.10/urllib/request.py", line 1522, in open_local_file
    raise URLError(exp)

Resolution

From the above error it means that VMware-Telco-Cloud-Automation-3.1.0-23636884.ova file is missing at the path /data/migrationVolume .

Make sure the information about the .ova file should be present at the /data/migrationVolume path and at the json file under the "ovaUrl".

Example of input file:

{
"tcaMgr":{
"name":"TCA Manager",
"vmEndpoint": "#.#.#.#",
"tcaWebUsername":"<tcaAdminUsername>",
"tcaWebPassword":"#####",
"tcaWebThumbprint":"##:##:##"
"appMgrPassword":"#####",
"appMgrThumbprint":"##:##:##",
"vcEndpoint":"#.#.#.#",
"vcUsername":"<vCenterAdminUsername>",
"vcPassword":"#####",
"vcThumbprint":"##:##:##",
"oldVmName":"TCAM-VM",
"ovaUrl":"http://<fileserver>/VMware-Telco-CloudAutomation-3.1.0-22803370.ova",
"deploymentOption":"Large"