XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • MTC 1.7.8
    • MTC 1.7.7
    • None
    • None

      When trying to run MTC 1.7.7 on OCP 4.12, the customer is hitting one issue caused by a typo in the MigrationController playbook.

      This is the error they get:

      TASK [Check for existing restic-restore-action-config configmap from MTC <1.7.0] ********************************
      An exception occurred during task execution. To see the full traceback, use -vvv. The error was: RecursionError: maximum recursion depth exceeded while calling a Python object
      fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n  File \"/opt/ansible/.ansible/tmp/ansible-tmp-1678833702.0394745-240-37530372911095/AnsiballZ__k8s_facts.py\", line 102, in <module>\n    _ansiballz_main()\n  File \"/opt/ansible/.ansible/tmp/ansible-tmp-1678833702.0394745-240-37530372911095/AnsiballZ__k8s_facts.py\", line 94, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/opt/ansible/.ansible/tmp/ansible-tmp-1678833702.0394745-240-37530372911095/AnsiballZ__k8s_facts.py\", line 40, in invoke_module\n    runpy.run_module(mod_name='ansible.modules.clustering.k8s._k8s_facts', init_globals=None, run_name='__main__', alter_sys=True)\n  File \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\n    mod_name, mod_spec, pkg_name, script_name)\n  File \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_k8s_facts_payload_wayezmv5/ansible_k8s_facts_payload.zip/ansible/modules/clustering/k8s/_k8s_facts.py\", line 179, in <module>\n  File \"/tmp/ansible_k8s_facts_payload_wayezmv5/ansible_k8s_facts_payload.zip/ansible/modules/clustering/k8s/_k8s_facts.py\", line 175, in main\n  File \"/tmp/ansible_k8s_facts_payload_wayezmv5/ansible_k8s_facts_payload.zip/ansible/modules/clustering/k8s/_k8s_facts.py\", line 156, in execute_module\n  File \"/tmp/ansible_k8s_facts_payload_wayezmv5/ansible_k8s_facts_payload.zip/ansible/module_utils/k8s/common.py\", line 220, in kubernetes_facts\n  File \"/tmp/ansible_k8s_facts_payload_wayezmv5/ansible_k8s_facts_payload.zip/ansible/module_utils/k8s/common.py\", line 210, in find_resource\n  File \"/usr/lib/python3.6/site-packages/openshift/dynamic/discovery.py\", line 230, in get\n    results = self.search(**kwargs)\n  File \"/usr/lib/python3.6/site-packages/openshift/dynamic/discovery.py\", line 275, in search\n    results = self.__search(self.__build_search(**kwargs), self.__resources, [])\n  File \"/usr/lib/python3.6/site-packages/openshift/dynamic/discovery.py\", line 317, in __search\n    matches.extend(self.__search([key] + parts[1:], resources, reqParams))\n  File \"/usr/lib/python3.6/site-packages/openshift/dynamic/discovery.py\", line 303, in __search\n    return self.__search(parts[1:], resourcePart, reqParams + [part] )\n  File \"/usr/lib/python3.6/site-packages/openshift/dynamic/discovery.py\", line 317, in __search\n    matches.extend(self.__search([key] + parts[1:], resources, reqParams))\n  File \"/usr/lib/python3.6/site-packages/openshift/dynamic/discovery.py\", line 303, in __search\n    return self.__search(parts[1:], resourcePart, reqParams + [part] )\n  File \"/usr/lib/python3.6/site-packages/openshift/dynamic/discovery.py\", line 299, in __search\n    return self.__search(parts[1:], resourcePart.resources, reqParams)\n  File \"/usr/lib/python3.6/site-packages/openshift/dynamic/discovery.py\", line 317, in __search\n    matches.extend(self.__search([key] + parts[1:], resources, reqParams))\n  File \"/usr/lib/python3.6/site-packages/openshift/dynamic/discovery.py\", line 308, in __search\n    if getattr(_resource, term) == value:\n  File \"/usr/lib/python3.6/site-packages/openshift/dynamic/resource.py\", line 213, in __getattr__\n    if self.base_resource():\n  File \"/usr/lib/python3.6/site-packages/openshift/dynamic/resource.py\", line 109, in base_resource\n    self.__base_resource = self.client.resources.get(**self.base_resource_lookup)\n  File \"/usr/lib/python3.6/site-packages/openshift/dynamic/discovery.py\", line 230, in get\n    results = self.search(**kwargs)\n  File \"/usr/lib/python3.6/site-packages/openshift/dynamic/discovery.py\", line 275, in search\n    results = self.__search(self.__build_search(**kwargs), self.__resources, [])\n  File \"/usr/lib/python3.6/site-packages/openshift/dynamic/discovery.py\", line 303, in __search\n    return self.__search(parts[1:], resourcePart, reqParams + [part] )\n  File \"/usr/lib/python3.6/site-packages/openshift/dynamic/discovery.py\", line 303, in __search\n    return self.__search(parts[1:], resourcePart, reqParams + [part] )\n  File \"/usr/lib/python3.6/site-packages/openshift/dynamic/discovery.py\", line 299, in __search\n    return self.__search(parts[1:], resourcePart.resources, reqParams)\n  File \"/usr/lib/python3.6/site-packages/openshift/dynamic/discovery.py\", line 317, in __search\n    matches.extend(self.__search([key] + parts[1:], resources, reqParams))\n  File \"/usr/lib/python3.6/site-packages/openshift/dynamic/discovery.py\", line 308, in __search\n    if getattr(_resource, term) == value:\n  File \"/usr/lib/python3.6/site-packages/openshift/dynamic/resource.py\", line 213, in __getattr__\n    if self.base_resource():\n  File \"/usr/lib/python3.6/site-packages/openshift/dynamic/resource.py\", line 109, in base_resource\n    self.__base_resource = self.client.resources.get(**self.base_resource_lookup)\n  File \"/usr/lib/python3.6/site-packages/openshift/dynamic/discovery.py\", line 230, in get\n    results = self.search(**kwargs)\n  File \"/usr/lib/python3.6/site-packages/openshift/dynamic/discovery.py\", line 275, in search\n    results 

      it seems that this is caused by a typo in this file[1] (Configmap vs ConfigMap).

      The customer was able to verify that using the k8s_facts module using Configmap makes the playbook crash.

      [1] https://github.com/migtools/mig-operator/blob/master/roles/migrationcontroller/tasks/main.yml#L96

       

              jmatthews John Matthews
              mavazque@redhat.com Mario Vazquez Cebrian
              mohamed idays mohamed idays
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: