Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TASK [deploy_hq : Migrate databases] *********************************************************************************************************************************************************************************
- failed: [10.3.0.4] (item=migrate_multi --noinput) => {"ansible_loop_var": "item", "changed": true, "cmd": ["./manage.py", "migrate_multi", "--noinput"], "delta": "0:00:21.275204", "end": "2025-09-21 10:29:47.373428", "item": "migrate_multi --noinput", "msg": "non-zero return code", "rc": 1, "start": "2025-09-21 10:29:26.098224", "stderr": "Traceback (most recent call last):\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/apps/es/client.py\", line 715, in scroll\n for result in self._scroll(query, scroll, size):\n ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/apps/es/client.py\", line 769, in _scroll\n result = self._search(query, **kwargs)\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/apps/es/client.py\", line 699, in _search\n return self._es.search(self.index_name, self.type, query, **kw)\n ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/elasticsearch6/client/utils.py\", line 101, in _wrapped\n return func(*args, params=params, **kwargs)\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/elasticsearch6/client/__init__.py\", line 871, in search\n return self.transport.perform_request(\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^\n \"GET\", _make_path(index, doc_type, \"_search\"), params=params, body=body\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n )\n ^\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/elasticsearch6/transport.py\", line 402, in perform_request\n status, headers_response, data = connection.perform_request(\n ~~~~~~~~~~~~~~~~~~~~~~~~~~^\n method,\n ^^^^^^^\n ...<5 lines>...\n timeout=timeout,\n ^^^^^^^^^^^^^^^^\n )\n ^\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/elasticsearch6/connection/http_urllib3.py\", line 252, in perform_request\n self._raise_error(response.status, raw_data)\n ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/elasticsearch6/connection/base.py\", line 253, in _raise_error\n raise HTTP_EXCEPTIONS.get(status_code, TransportError)(\n status_code, error_message, additional_info\n )\nelasticsearch6.exceptions.RequestError: RequestError(400, 'search_phase_execution_exception', 'failed to create query: {\\n \"bool\" : {\\n \"must\" : [\\n {\\n \"match_all\" : {\\n \"boost\" : 1.0\\n }\\n }\\n ],\\n \"filter\" : [\\n {\\n \"term\" : {\\n \"doc_type\" : {\\n \"value\" : \"CommCareUser\",\\n \"boost\" : 1.0\\n }\\n }\\n },\\n {\\n \"nested\" : {\\n \"query\" : {\\n \"bool\" : {\\n \"filter\" : [\\n {\\n \"term\" : {\\n \"user_domain_memberships.is_active\" : {\\n \"value\" : false,\\n \"boost\" : 1.0\\n }\\n }\\n }\\n ],\\n \"adjust_pure_negative\" : true,\\n \"boost\" : 1.0\\n }\\n },\\n \"path\" : \"user_domain_memberships\",\\n \"ignore_unmapped\" : false,\\n \"score_mode\" : \"avg\",\\n \"boost\" : 1.0\\n }\\n },\\n {\\n \"term\" : {\\n \"base_doc\" : {\\n \"value\" : \"couchuser\",\\n \"boost\" : 1.0\\n }\\n }\\n }\\n ],\\n \"adjust_pure_negative\" : true,\\n \"boost\" : 1.0\\n }\\n}')\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File \"src/gevent/greenlet.py\", line 900, in gevent._gevent_cgreenlet.Greenlet.run\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/sql_db/management/commands/migrate_multi.py\", line 43, in migrate_db\n call_command('migrate', *args, **call_options)\n ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/core/management/__init__.py\", line 194, in call_command\n return command.execute(*args, **defaults)\n ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/core/management/base.py\", line 458, in execute\n output = self.handle(*args, **options)\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/core/management/base.py\", line 106, in wrapper\n res = handle_func(*args, **kwargs)\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/sql_db/management/commands/migrate.py\", line 17, in handle\n result = super().handle(*args, **options)\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/core/management/base.py\", line 106, in wrapper\n res = handle_func(*args, **kwargs)\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/core/management/commands/migrate.py\", line 356, in handle\n post_migrate_state = executor.migrate(\n targets,\n ...<3 lines>...\n fake_initial=fake_initial,\n )\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/db/migrations/executor.py\", line 135, in migrate\n state = self._migrate_all_forwards(\n state, plan, full_plan, fake=fake, fake_initial=fake_initial\n )\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/db/migrations/executor.py\", line 167, in _migrate_all_forwards\n state = self.apply_migration(\n state, migration, fake=fake, fake_initial=fake_initial\n )\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/db/migrations/executor.py\", line 252, in apply_migration\n state = migration.apply(state, schema_editor)\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/db/migrations/migration.py\", line 132, in apply\n operation.database_forwards(\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~^\n self.app_label, schema_editor, old_state, project_state\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n )\n ^\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/db/migrations/operations/special.py\", line 193, in database_forwards\n self.code(from_state.apps, schema_editor)\n ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/apps/users/migrations/0083_reset_ccu_dm_is_active.py\", line 26, in reset_is_active\n with_progress_bar(list(affected_ids())),\n ~~~~^^^^^^^^^^^^^^^^\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/apps/es/es_query.py\", line 227, in scroll\n for result in self.adapter.scroll(raw_query):\n ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/apps/es/client.py\", line 721, in scroll\n raise ESError(e)\ncorehq.apps.es.exceptions.ESError: RequestError(400, 'search_phase_execution_exception', 'failed to create query: {\\n \"bool\" : {\\n \"must\" : [\\n {\\n \"match_all\" : {\\n \"boost\" : 1.0\\n }\\n }\\n ],\\n \"filter\" : [\\n {\\n \"term\" : {\\n \"doc_type\" : {\\n \"value\" : \"CommCareUser\",\\n \"boost\" : 1.0\\n }\\n }\\n },\\n {\\n \"nested\" : {\\n \"query\" : {\\n \"bool\" : {\\n \"filter\" : [\\n {\\n \"term\" : {\\n \"user_domain_memberships.is_active\" : {\\n \"value\" : false,\\n \"boost\" : 1.0\\n }\\n }\\n }\\n ],\\n \"adjust_pure_negative\" : true,\\n \"boost\" : 1.0\\n }\\n },\\n \"path\" : \"user_domain_memberships\",\\n \"ignore_unmapped\" : false,\\n \"score_mode\" : \"avg\",\\n \"boost\" : 1.0\\n }\\n },\\n {\\n \"term\" : {\\n \"base_doc\" : {\\n \"value\" : \"couchuser\",\\n \"boost\" : 1.0\\n }\\n }\\n }\\n ],\\n \"adjust_pure_negative\" : true,\\n \"boost\" : 1.0\\n }\\n}')\n2025-09-21T10:29:45Z <Greenlet at 0x7b17cbd25440: migrate_db('default')> failed with ESError", "stderr_lines": ["Traceback (most recent call last):", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/apps/es/client.py\", line 715, in scroll", " for result in self._scroll(query, scroll, size):", " ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/apps/es/client.py\", line 769, in _scroll", " result = self._search(query, **kwargs)", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/apps/es/client.py\", line 699, in _search", " return self._es.search(self.index_name, self.type, query, **kw)", " ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/elasticsearch6/client/utils.py\", line 101, in _wrapped", " return func(*args, params=params, **kwargs)", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/elasticsearch6/client/__init__.py\", line 871, in search", " return self.transport.perform_request(", " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^", " \"GET\", _make_path(index, doc_type, \"_search\"), params=params, body=body", " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^", " )", " ^", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/elasticsearch6/transport.py\", line 402, in perform_request", " status, headers_response, data = connection.perform_request(", " ~~~~~~~~~~~~~~~~~~~~~~~~~~^", " method,", " ^^^^^^^", " ...<5 lines>...", " timeout=timeout,", " ^^^^^^^^^^^^^^^^", " )", " ^", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/elasticsearch6/connection/http_urllib3.py\", line 252, in perform_request", " self._raise_error(response.status, raw_data)", " ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/elasticsearch6/connection/base.py\", line 253, in _raise_error", " raise HTTP_EXCEPTIONS.get(status_code, TransportError)(", " status_code, error_message, additional_info", " )", "elasticsearch6.exceptions.RequestError: RequestError(400, 'search_phase_execution_exception', 'failed to create query: {\\n \"bool\" : {\\n \"must\" : [\\n {\\n \"match_all\" : {\\n \"boost\" : 1.0\\n }\\n }\\n ],\\n \"filter\" : [\\n {\\n \"term\" : {\\n \"doc_type\" : {\\n \"value\" : \"CommCareUser\",\\n \"boost\" : 1.0\\n }\\n }\\n },\\n {\\n \"nested\" : {\\n \"query\" : {\\n \"bool\" : {\\n \"filter\" : [\\n {\\n \"term\" : {\\n \"user_domain_memberships.is_active\" : {\\n \"value\" : false,\\n \"boost\" : 1.0\\n }\\n }\\n }\\n ],\\n \"adjust_pure_negative\" : true,\\n \"boost\" : 1.0\\n }\\n },\\n \"path\" : \"user_domain_memberships\",\\n \"ignore_unmapped\" : false,\\n \"score_mode\" : \"avg\",\\n \"boost\" : 1.0\\n }\\n },\\n {\\n \"term\" : {\\n \"base_doc\" : {\\n \"value\" : \"couchuser\",\\n \"boost\" : 1.0\\n }\\n }\\n }\\n ],\\n \"adjust_pure_negative\" : true,\\n \"boost\" : 1.0\\n }\\n}')", "", "During handling of the above exception, another exception occurred:", "", "Traceback (most recent call last):", " File \"src/gevent/greenlet.py\", line 900, in gevent._gevent_cgreenlet.Greenlet.run", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/sql_db/management/commands/migrate_multi.py\", line 43, in migrate_db", " call_command('migrate', *args, **call_options)", " ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/core/management/__init__.py\", line 194, in call_command", " return command.execute(*args, **defaults)", " ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/core/management/base.py\", line 458, in execute", " output = self.handle(*args, **options)", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/core/management/base.py\", line 106, in wrapper", " res = handle_func(*args, **kwargs)", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/sql_db/management/commands/migrate.py\", line 17, in handle", " result = super().handle(*args, **options)", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/core/management/base.py\", line 106, in wrapper", " res = handle_func(*args, **kwargs)", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/core/management/commands/migrate.py\", line 356, in handle", " post_migrate_state = executor.migrate(", " targets,", " ...<3 lines>...", " fake_initial=fake_initial,", " )", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/db/migrations/executor.py\", line 135, in migrate", " state = self._migrate_all_forwards(", " state, plan, full_plan, fake=fake, fake_initial=fake_initial", " )", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/db/migrations/executor.py\", line 167, in _migrate_all_forwards", " state = self.apply_migration(", " state, migration, fake=fake, fake_initial=fake_initial", " )", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/db/migrations/executor.py\", line 252, in apply_migration", " state = migration.apply(state, schema_editor)", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/db/migrations/migration.py\", line 132, in apply", " operation.database_forwards(", " ~~~~~~~~~~~~~~~~~~~~~~~~~~~^", " self.app_label, schema_editor, old_state, project_state", " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^", " )", " ^", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/db/migrations/operations/special.py\", line 193, in database_forwards", " self.code(from_state.apps, schema_editor)", " ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/apps/users/migrations/0083_reset_ccu_dm_is_active.py\", line 26, in reset_is_active", " with_progress_bar(list(affected_ids())),", " ~~~~^^^^^^^^^^^^^^^^", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/apps/es/es_query.py\", line 227, in scroll", " for result in self.adapter.scroll(raw_query):", " ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/apps/es/client.py\", line 721, in scroll", " raise ESError(e)", "corehq.apps.es.exceptions.ESError: RequestError(400, 'search_phase_execution_exception', 'failed to create query: {\\n \"bool\" : {\\n \"must\" : [\\n {\\n \"match_all\" : {\\n \"boost\" : 1.0\\n }\\n }\\n ],\\n \"filter\" : [\\n {\\n \"term\" : {\\n \"doc_type\" : {\\n \"value\" : \"CommCareUser\",\\n \"boost\" : 1.0\\n }\\n }\\n },\\n {\\n \"nested\" : {\\n \"query\" : {\\n \"bool\" : {\\n \"filter\" : [\\n {\\n \"term\" : {\\n \"user_domain_memberships.is_active\" : {\\n \"value\" : false,\\n \"boost\" : 1.0\\n }\\n }\\n }\\n ],\\n \"adjust_pure_negative\" : true,\\n \"boost\" : 1.0\\n }\\n },\\n \"path\" : \"user_domain_memberships\",\\n \"ignore_unmapped\" : false,\\n \"score_mode\" : \"avg\",\\n \"boost\" : 1.0\\n }\\n },\\n {\\n \"term\" : {\\n \"base_doc\" : {\\n \"value\" : \"couchuser\",\\n \"boost\" : 1.0\\n }\\n }\\n }\\n ],\\n \"adjust_pure_negative\" : true,\\n \"boost\" : 1.0\\n }\\n}')", "2025-09-21T10:29:45Z <Greenlet at 0x7b17cbd25440: migrate_db('default')> failed with ESError"], "stdout": "\nThe following databases will be migrated:\n * default\n * p1\n * p2\n * proxy\n * synclogs\n\n\nThe following databases will be skipped:\n * ucr\n\n\n======================= Error During Migration =======================\n<Greenlet at 0x7b17cbd25440: migrate_db('default')>\nTraceback (most recent call last):\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/apps/es/client.py\", line 715, in scroll\n for result in self._scroll(query, scroll, size):\n ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/apps/es/client.py\", line 769, in _scroll\n result = self._search(query, **kwargs)\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/apps/es/client.py\", line 699, in _search\n return self._es.search(self.index_name, self.type, query, **kw)\n ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/elasticsearch6/client/utils.py\", line 101, in _wrapped\n return func(*args, params=params, **kwargs)\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/elasticsearch6/client/__init__.py\", line 871, in search\n return self.transport.perform_request(\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^\n \"GET\", _make_path(index, doc_type, \"_search\"), params=params, body=body\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n )\n ^\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/elasticsearch6/transport.py\", line 402, in perform_request\n status, headers_response, data = connection.perform_request(\n ~~~~~~~~~~~~~~~~~~~~~~~~~~^\n method,\n ^^^^^^^\n ...<5 lines>...\n timeout=timeout,\n ^^^^^^^^^^^^^^^^\n )\n ^\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/elasticsearch6/connection/http_urllib3.py\", line 252, in perform_request\n self._raise_error(response.status, raw_data)\n ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/elasticsearch6/connection/base.py\", line 253, in _raise_error\n raise HTTP_EXCEPTIONS.get(status_code, TransportError)(\n status_code, error_message, additional_info\n )\nelasticsearch6.exceptions.RequestError: RequestError(400, 'search_phase_execution_exception', 'failed to create query: {\\n \"bool\" : {\\n \"must\" : [\\n {\\n \"match_all\" : {\\n \"boost\" : 1.0\\n }\\n }\\n ],\\n \"filter\" : [\\n {\\n \"term\" : {\\n \"doc_type\" : {\\n \"value\" : \"CommCareUser\",\\n \"boost\" : 1.0\\n }\\n }\\n },\\n {\\n \"nested\" : {\\n \"query\" : {\\n \"bool\" : {\\n \"filter\" : [\\n {\\n \"term\" : {\\n \"user_domain_memberships.is_active\" : {\\n \"value\" : false,\\n \"boost\" : 1.0\\n }\\n }\\n }\\n ],\\n \"adjust_pure_negative\" : true,\\n \"boost\" : 1.0\\n }\\n },\\n \"path\" : \"user_domain_memberships\",\\n \"ignore_unmapped\" : false,\\n \"score_mode\" : \"avg\",\\n \"boost\" : 1.0\\n }\\n },\\n {\\n \"term\" : {\\n \"base_doc\" : {\\n \"value\" : \"couchuser\",\\n \"boost\" : 1.0\\n }\\n }\\n }\\n ],\\n \"adjust_pure_negative\" : true,\\n \"boost\" : 1.0\\n }\\n}')\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/sql_db/management/commands/migrate_multi.py\", line 66, in handle\n job.get()\n ~~~~~~~^^\n File \"src/gevent/greenlet.py\", line 797, in gevent._gevent_cgreenlet.Greenlet.get\n File \"src/gevent/greenlet.py\", line 373, in gevent._gevent_cgreenlet.Greenlet._raise_exception\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/gevent/_compat.py\", line 50, in reraise\n raise value.with_traceback(tb)\n File \"src/gevent/greenlet.py\", line 900, in gevent._gevent_cgreenlet.Greenlet.run\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/sql_db/management/commands/migrate_multi.py\", line 43, in migrate_db\n call_command('migrate', *args, **call_options)\n ^^^^^^^^^^^\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/core/management/__init__.py\", line 194, in call_command\n return command.execute(*args, **defaults)\n ^^^^^^^^^^^^^^^^^\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/core/management/base.py\", line 458, in execute\n output = self.handle(*args, **options)\n ^^^^^^^^^^^^^^^\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/core/management/base.py\", line 106, in wrapper\n res = handle_func(*args, **kwargs)\n ^^^^^^^^^^^\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/sql_db/management/commands/migrate.py\", line 17, in handle\n result = super().handle(*args, **options)\n ^^^^^^^^^^^^^^^\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/core/management/base.py\", line 106, in wrapper\n res = handle_func(*args, **kwargs)\n ^^^^^^^^^^^\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/core/management/commands/migrate.py\", line 356, in handle\n post_migrate_state = executor.migrate(\n ^^^^^^^^^^^^^^^\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/db/migrations/executor.py\", line 135, in migrate\n state = self._migrate_all_forwards(\n ^^^^^^^^^^^\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/db/migrations/executor.py\", line 167, in _migrate_all_forwards\n state = self.apply_migration(\n ^^^^^^^\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/db/migrations/executor.py\", line 252, in apply_migration\n state = migration.apply(state, schema_editor)\n ^^^\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/db/migrations/migration.py\", line 132, in apply\n operation.database_forwards(\n ^^^^^^^\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/db/migrations/operations/special.py\", line 193, in database_forwards\n self.code(from_state.apps, schema_editor)\n ^^^^^^^^^^^\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/apps/users/migrations/0083_reset_ccu_dm_is_active.py\", line 26, in reset_is_active\n with_progress_bar(list(affected_ids())),\n ^^^^^^^^^^^^^^^\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/apps/es/es_query.py\", line 227, in scroll\n for result in self.adapter.scroll(raw_query):\n ^^^^^^^^^^^^^^^\n File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/apps/es/client.py\", line 721, in scroll\n raise ESError(e)\n ^^^^^^^^^^^\ncorehq.apps.es.exceptions.ESError: RequestError(400, 'search_phase_execution_exception', 'failed to create query: {\\n \"bool\" : {\\n \"must\" : [\\n {\\n \"match_all\" : {\\n \"boost\" : 1.0\\n }\\n }\\n ],\\n \"filter\" : [\\n {\\n \"term\" : {\\n \"doc_type\" : {\\n \"value\" : \"CommCareUser\",\\n \"boost\" : 1.0\\n }\\n }\\n },\\n {\\n \"nested\" : {\\n \"query\" : {\\n \"bool\" : {\\n \"filter\" : [\\n {\\n \"term\" : {\\n \"user_domain_memberships.is_active\" : {\\n \"value\" : false,\\n \"boost\" : 1.0\\n }\\n }\\n }\\n ],\\n \"adjust_pure_negative\" : true,\\n \"boost\" : 1.0\\n }\\n },\\n \"path\" : \"user_domain_memberships\",\\n \"ignore_unmapped\" : false,\\n \"score_mode\" : \"avg\",\\n \"boost\" : 1.0\\n }\\n },\\n {\\n \"term\" : {\\n \"base_doc\" : {\\n \"value\" : \"couchuser\",\\n \"boost\" : 1.0\\n }\\n }\\n }\\n ],\\n \"adjust_pure_negative\" : true,\\n \"boost\" : 1.0\\n }\\n}')", "stdout_lines": ["", "The following databases will be migrated:", " * default", " * p1", " * p2", " * proxy", " * synclogs", "", "", "The following databases will be skipped:", " * ucr", "", "", "======================= Error During Migration =======================", "<Greenlet at 0x7b17cbd25440: migrate_db('default')>", "Traceback (most recent call last):", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/apps/es/client.py\", line 715, in scroll", " for result in self._scroll(query, scroll, size):", " ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/apps/es/client.py\", line 769, in _scroll", " result = self._search(query, **kwargs)", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/apps/es/client.py\", line 699, in _search", " return self._es.search(self.index_name, self.type, query, **kw)", " ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/elasticsearch6/client/utils.py\", line 101, in _wrapped", " return func(*args, params=params, **kwargs)", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/elasticsearch6/client/__init__.py\", line 871, in search", " return self.transport.perform_request(", " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^", " \"GET\", _make_path(index, doc_type, \"_search\"), params=params, body=body", " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^", " )", " ^", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/elasticsearch6/transport.py\", line 402, in perform_request", " status, headers_response, data = connection.perform_request(", " ~~~~~~~~~~~~~~~~~~~~~~~~~~^", " method,", " ^^^^^^^", " ...<5 lines>...", " timeout=timeout,", " ^^^^^^^^^^^^^^^^", " )", " ^", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/elasticsearch6/connection/http_urllib3.py\", line 252, in perform_request", " self._raise_error(response.status, raw_data)", " ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/elasticsearch6/connection/base.py\", line 253, in _raise_error", " raise HTTP_EXCEPTIONS.get(status_code, TransportError)(", " status_code, error_message, additional_info", " )", "elasticsearch6.exceptions.RequestError: RequestError(400, 'search_phase_execution_exception', 'failed to create query: {\\n \"bool\" : {\\n \"must\" : [\\n {\\n \"match_all\" : {\\n \"boost\" : 1.0\\n }\\n }\\n ],\\n \"filter\" : [\\n {\\n \"term\" : {\\n \"doc_type\" : {\\n \"value\" : \"CommCareUser\",\\n \"boost\" : 1.0\\n }\\n }\\n },\\n {\\n \"nested\" : {\\n \"query\" : {\\n \"bool\" : {\\n \"filter\" : [\\n {\\n \"term\" : {\\n \"user_domain_memberships.is_active\" : {\\n \"value\" : false,\\n \"boost\" : 1.0\\n }\\n }\\n }\\n ],\\n \"adjust_pure_negative\" : true,\\n \"boost\" : 1.0\\n }\\n },\\n \"path\" : \"user_domain_memberships\",\\n \"ignore_unmapped\" : false,\\n \"score_mode\" : \"avg\",\\n \"boost\" : 1.0\\n }\\n },\\n {\\n \"term\" : {\\n \"base_doc\" : {\\n \"value\" : \"couchuser\",\\n \"boost\" : 1.0\\n }\\n }\\n }\\n ],\\n \"adjust_pure_negative\" : true,\\n \"boost\" : 1.0\\n }\\n}')", "", "During handling of the above exception, another exception occurred:", "", "Traceback (most recent call last):", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/sql_db/management/commands/migrate_multi.py\", line 66, in handle", " job.get()", " ~~~~~~~^^", " File \"src/gevent/greenlet.py\", line 797, in gevent._gevent_cgreenlet.Greenlet.get", " File \"src/gevent/greenlet.py\", line 373, in gevent._gevent_cgreenlet.Greenlet._raise_exception", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/gevent/_compat.py\", line 50, in reraise", " raise value.with_traceback(tb)", " File \"src/gevent/greenlet.py\", line 900, in gevent._gevent_cgreenlet.Greenlet.run", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/sql_db/management/commands/migrate_multi.py\", line 43, in migrate_db", " call_command('migrate', *args, **call_options)", " ^^^^^^^^^^^", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/core/management/__init__.py\", line 194, in call_command", " return command.execute(*args, **defaults)", " ^^^^^^^^^^^^^^^^^", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/core/management/base.py\", line 458, in execute", " output = self.handle(*args, **options)", " ^^^^^^^^^^^^^^^", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/core/management/base.py\", line 106, in wrapper", " res = handle_func(*args, **kwargs)", " ^^^^^^^^^^^", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/sql_db/management/commands/migrate.py\", line 17, in handle", " result = super().handle(*args, **options)", " ^^^^^^^^^^^^^^^", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/core/management/base.py\", line 106, in wrapper", " res = handle_func(*args, **kwargs)", " ^^^^^^^^^^^", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/core/management/commands/migrate.py\", line 356, in handle", " post_migrate_state = executor.migrate(", " ^^^^^^^^^^^^^^^", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/db/migrations/executor.py\", line 135, in migrate", " state = self._migrate_all_forwards(", " ^^^^^^^^^^^", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/db/migrations/executor.py\", line 167, in _migrate_all_forwards", " state = self.apply_migration(", " ^^^^^^^", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/db/migrations/executor.py\", line 252, in apply_migration", " state = migration.apply(state, schema_editor)", " ^^^", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/db/migrations/migration.py\", line 132, in apply", " operation.database_forwards(", " ^^^^^^^", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/python_env/lib/python3.13/site-packages/django/db/migrations/operations/special.py\", line 193, in database_forwards", " self.code(from_state.apps, schema_editor)", " ^^^^^^^^^^^", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/apps/users/migrations/0083_reset_ccu_dm_is_active.py\", line 26, in reset_is_active", " with_progress_bar(list(affected_ids())),", " ^^^^^^^^^^^^^^^", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/apps/es/es_query.py\", line 227, in scroll", " for result in self.adapter.scroll(raw_query):", " ^^^^^^^^^^^^^^^", " File \"/home/cchq/www/monolith/releases/2025-09-21_08.05/corehq/apps/es/client.py\", line 721, in scroll", " raise ESError(e)", " ^^^^^^^^^^^", "corehq.apps.es.exceptions.ESError: RequestError(400, 'search_phase_execution_exception', 'failed to create query: {\\n \"bool\" : {\\n \"must\" : [\\n {\\n \"match_all\" : {\\n \"boost\" : 1.0\\n }\\n }\\n ],\\n \"filter\" : [\\n {\\n \"term\" : {\\n \"doc_type\" : {\\n \"value\" : \"CommCareUser\",\\n \"boost\" : 1.0\\n }\\n }\\n },\\n {\\n \"nested\" : {\\n \"query\" : {\\n \"bool\" : {\\n \"filter\" : [\\n {\\n \"term\" : {\\n \"user_domain_memberships.is_active\" : {\\n \"value\" : false,\\n \"boost\" : 1.0\\n }\\n }\\n }\\n ],\\n \"adjust_pure_negative\" : true,\\n \"boost\" : 1.0\\n }\\n },\\n \"path\" : \"user_domain_memberships\",\\n \"ignore_unmapped\" : false,\\n \"score_mode\" : \"avg\",\\n \"boost\" : 1.0\\n }\\n },\\n {\\n \"term\" : {\\n \"base_doc\" : {\\n \"value\" : \"couchuser\",\\n \"boost\" : 1.0\\n }\\n }\\n }\\n ],\\n \"adjust_pure_negative\" : true,\\n \"boost\" : 1.0\\n }\\n}')"]}
- skipping: [10.3.0.4] => (item=create_kafka_topics)
Advertisement
Add Comment
Please, Sign In to add comment