Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New deployment - k8s migrations job halts at "59/u stale_materialized_view" #276

Open
joeykb opened this issue Sep 27, 2022 · 4 comments
Open

Comments

@joeykb
Copy link
Contributor

joeykb commented Sep 27, 2022

I have deployed reportportal on Kubernetes (GKE). During the deployment, the migrations job runs and stops at
59/u stale_materialized_view

Postgres DB reportportal shows table and index created according to https://github.com/reportportal/migrations/blob/develop/migrations/59_stale_materialized_view.up.sql

Anyone run into something similar?

@miracle8484
Copy link

Hello, @joeykb, we need more details to be able to help you. At least could you show logs of migration, please?

@joeykb
Copy link
Contributor Author

joeykb commented Sep 28, 2022

Hi @miracle8484
This is what I am seeing in the logs:

wait-for-it.sh: waiting 15 seconds for postgresql.reportportal.svc.cluster.local:5432 wait-for-it.sh: postgresql.reportportal.svc.cluster.local:5432 is available after 1 seconds 0/u extensions (13.860629ms) 1/u initialize_schema (605.575682ms) 2/u initialize_quartz_schema (731.046394ms) 3/u default_data (761.363551ms) 4/u size_limitations (787.238009ms) 5/u test_case_id_type (837.207536ms) 6/u retries_handling (855.491954ms) 7/u auth_integration (881.838232ms) 8/u sender_case_enabled_field (895.705341ms) 9/u analyzer_params (836.293546ms) 10/u attachment_size (924.353819ms) 11/u password_encoding (885.996612ms) 12/u remove_ticket_duplicates (387.703452ms) 13/u add_allocated_storage_per_project (277.388459ms) 14/u test_case_id_size_increase (261.92243ms) 15/u statistics_decreasing (288.931927ms) 16/u remove_unused_indexes (254.05256ms) 17/u status_enum_extension (271.595789ms) 18/u job_attributes (259.51609ms) 19/u retries_handling_extension (259.55672ms) 20/u deep_merge_statistics_handling (276.239559ms) 21/u deep_merge_retries_fix (278.762549ms) 22/u deep_merge_nested_steps_fix (244.950182ms) 23/u rerun_item_statistics_fix (238.908922ms) 24/u widget_views_cleanup (272.756108ms) 25/u deep_merge_nested_steps_path_fix (274.168759ms) 26/u retries_lock_fix (315.014596ms) 27/u add_project_id_log (314.617526ms) 28/u create_log_project_idx (295.847138ms) 29/u create_table_item_project (343.586205ms) 30/u item_project_fill_part1 (344.417354ms) 31/u item_project_fill_part2 (326.305445ms) 32/u create_item_idx (326.875585ms) 33/u drop_log_message_trgm_idx (354.936864ms) 34/u fill_project_id_part1 (356.444874ms) 35/u fill_project_id_part2 (320.597676ms) 36/u drop_item_project (317.894556ms) 37/u create_log_message_trgm_idx (293.850928ms) 38/u add_not_null_log_project_id (294.422288ms) 39/u attachment_creation_date (290.613338ms) 40/u attachment_creation_date_fill (242.114972ms) 41/u attachment_creation_date_not_null (241.194401ms) 42/u shedlock_table (274.185639ms) 43/u attachment_for_deletion_table (276.422459ms) 44/u remove_triggers (246.109421ms) 45/u add_jobs_indexes (254.07843ms) 46/u job_values_bound (277.973778ms) 47/u quartz_remove_triggers (278.265808ms) 48/u composite_attribute (220.715563ms) 49/u analyzer_attribute (219.690983ms) 50/u bug_trend_content_fields (219.549553ms) 51/u cluster (253.005881ms) 52/u analyzer_search_attribute (254.932441ms) 53/u onboarding (229.984202ms) 54/u analyzer_unique_error_attribute (224.234713ms) 55/u onboarding_fix (260.29545ms) 56/u retries (257.027041ms) 57/u fix_deadlock (238.256552ms) 58/u alter_ticket (286.808868ms) 59/u stale_materialized_view (296.080738ms)

@joeykb
Copy link
Contributor Author

joeykb commented Sep 29, 2022

I was able to get past this by removing our istio sidecar. In order to do this, I had to modify the helm chart to allow pod labels.
#277
But, when I look at the tables in the database, the SQL commands for 60-64 do not seem to have run because the tables in those commands did not exist.

@miracle8484
Copy link

Hello, @joeykb, could you try to execute manually https://github.com/reportportal/migrations/blob/develop/migrations/59_stale_materialized_view.up.sql
on database and share result.
if stale_materialized_view is already created, than please drop it from the beginning. (https://github.com/reportportal/migrations/blob/develop/migrations/59_stale_materialized_view.down.sql).
Also could you provide postgresql version, and may be you have some custom time restriction for query execution for example?
Thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants