Ansible Automation Operator database migration fails in task Stream backup from pg_dump to the new postgresql container

Solution Verified - Updated -

Issue

  • Ansible Automation Platform Operator fails during migration of database with error:

    TASK [Stream backup from pg_dump to the new postgresql container] ********************************
    fatal: [localhost]: FAILED! => {"msg": "The conditional check ''Successful' not in data_migration.stdout' failed. The error was: error while evaluating conditional ('Successful' not in data_migration.stdout): 'dict object' has no attribute 'stdout'"}
    

    or:

    TASK [Stream backup from pg_dump to the new postgresql container] ********************************
    ^[[0;31mfatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "/usr/lib/python3.6/site-packages/kubernetes/client/apis/__init__.py:12: DeprecationWarning: The package kubernetes.client.apis is renamed and deprecated, use kubernetes.client.api instead (please note that the trailing s was removed).\n  DeprecationWarning\nTraceback (most recent call last):\n  File \"/opt/ansible/.ansible/tmp/ansible-tmp-1691861465.596653-104216-61430950301091/AnsiballZ_k8s_exec.py\", line 102, in <module>\n    _ansiballz_main()\n  File \"/opt/ansible/.ansible/tmp/ansible-tmp-1691861465.596653-104216-61430950301091/AnsiballZ_k8s_exec.py\", line 94, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/opt/ansible/.ansible/tmp/ansible-tmp-1691861465.596653-104216-61430950301091/AnsiballZ_k8s_exec.py\", line 40, in invoke_module\n    runpy.run_module(mod_name='ansible_collections.kubernetes.core.plugins.modules.k8s_exec', 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_kubernetes.core.k8s_exec_payload__jq3ewij/ansible_kubernetes.core.k8s_exec_payload.zip/ansible_collections/kubernetes/core/plugins/modules/k8s_exec.py\", line 207, in <module>\n  File \"/tmp/ansible_kubernetes.core.k8s_exec_payload__jq3ewij/ansible_kubernetes.core.k8s_exec_payload.zip/ansible_collections/kubernetes/core/plugins/modules/k8s_exec.py\", line 203, in main\n  File \"/tmp/ansible_kubernetes.core.k8s_exec_payload__jq3ewij/ansible_kubernetes.core.k8s_exec_payload.zip/ansible_collections/kubernetes/core/plugins/modules/k8s_exec.py\", line 181, in execute_module\n  File \"/usr/lib/python3.6/site-packages/kubernetes/stream/ws_client.py\", line 192, in update\n    op_code, frame = self.sock.recv_data_frame(True)\n  File \"/usr/lib/python3.6/site-packages/websocket/_core.py\", line 340, in recv_data_frame\n    frame = self.recv_frame()\n  File \"/usr/lib/python3.6/site-packages/websocket/_core.py\", line 374, in recv_frame\n    return self.frame_buffer.recv_frame()\n  File \"/usr/lib/python3.6/site-packages/websocket/_abnf.py\", line 361, in recv_frame\n    self.recv_header()\n  File \"/usr/lib/python3.6/site-packages/websocket/_abnf.py\", line 309, in recv_header\n    header = self.recv_strict(2)\n  File \"/usr/lib/python3.6/site-packages/websocket/_abnf.py\", line 396, in recv_strict\n    bytes_ = self.recv(min(16384, shortage))\n  File \"/usr/lib/python3.6/site-packages/websocket/_core.py\", line 449, in _recv\n    return recv(self.sock, bufsize)\n  File \"/usr/lib/python3.6/site-packages/websocket/_socket.py\", line 94, in recv\n    \"Connection is already closed.\")\nwebsocket._exceptions.WebSocketConnectionClosedException: Connection is already closed.\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
    

Environment

  • Ansible Automation Platform Operator 2.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content