Skip to content

Constrain mysql charm storage in k8s integration tests - #424

Open
paulomach wants to merge 5 commits into
8.4/edgefrom
fix/storage-directive
Open

Constrain mysql charm storage in k8s integration tests#424
paulomach wants to merge 5 commits into
8.4/edgefrom
fix/storage-directive

Conversation

@paulomach

Copy link
Copy Markdown
Contributor

Issue

Observed timeout in tests at deploy step. A candidate is the slower storage provision time (1) slower on canonical k8s compared to microk8s, and (2) 4 volumes in mysql-8.4, compared to 1 in mysql-8.0.

Solution

Add storage directive to have smaller than default (1G) volumes, speed up provision time.

@paulomach paulomach added the not bug or enhancement PR is not 'bug' or 'enhancement'. For release notes label Jul 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reduces Kubernetes integration-test deploy time by explicitly constraining the MySQL charm’s storage volumes to smaller sizes, aiming to speed up dynamic PVC provisioning (especially on slower storage backends and with MySQL 8.4’s multiple volumes).

Changes:

  • Add explicit storage={...} constraints to MySQL deployments across Kubernetes integration tests.
  • Apply the same constrained storage sizing to HA/self-healing/replication/upgrade scenarios and TLS/roles/relations test suites.
  • Use a slightly larger temp volume in backup-related tests to accommodate backup/restore workflows.

Reviewed changes

Copilot reviewed 37 out of 37 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
kubernetes/tests/integration/release/high_availability/test_upgrade_from_stable.py Constrains storage sizes for the stable-channel deploy used in refresh/upgrade testing.
kubernetes/tests/integration/integration/test_tls.py Adds constrained storage on deploy for TLS integration coverage.
kubernetes/tests/integration/integration/test_tls_private_key.py Adds constrained storage on deploy for TLS private-key scenario.
kubernetes/tests/integration/integration/test_storage.py Adds constrained storage on deploy for storage-specific integration assertions.
kubernetes/tests/integration/integration/test_saturate_max_connections.py Adds constrained storage on deploy for max-connections saturation test.
kubernetes/tests/integration/integration/test_password_validation.py Adds constrained storage on deploy for password validation tests.
kubernetes/tests/integration/integration/test_multi_relations.py Adds constrained storage on deploy for multi-relation deployment scenario.
kubernetes/tests/integration/integration/test_charm.py Adds constrained storage on deploy for general charm integration coverage.
kubernetes/tests/integration/integration/test_backup_gcp.py Constrains storage (with larger temp) for GCP backup/restore tests.
kubernetes/tests/integration/integration/test_backup_ceph.py Constrains storage (with larger temp) for Ceph backup/restore tests.
kubernetes/tests/integration/integration/test_backup_aws.py Constrains storage (with larger temp) for AWS backup/restore tests.
kubernetes/tests/integration/integration/test_architecture.py Adds constrained storage on deploy for cross-architecture deployment checks.
kubernetes/tests/integration/integration/roles/test_instance_roles.py Adds constrained storage on deploy for instance roles tests.
kubernetes/tests/integration/integration/roles/test_instance_dba_role.py Adds constrained storage on deploy for instance DBA role tests.
kubernetes/tests/integration/integration/roles/test_database_dba_role.py Adds constrained storage on deploy for database DBA role tests.
kubernetes/tests/integration/integration/relations/test_database.py Adds constrained storage on deploy for database relation integration tests.
kubernetes/tests/integration/integration/high_availability/test_upgrade.py Adds constrained storage on deploy for HA upgrade testing.
kubernetes/tests/integration/integration/high_availability/test_self_healing_stop_primary.py Adds constrained storage on deploy for self-healing “stop primary” scenario.
kubernetes/tests/integration/integration/high_availability/test_self_healing_stop_all.py Adds constrained storage on deploy for self-healing “stop all” scenario.
kubernetes/tests/integration/integration/high_availability/test_self_healing_setup_crash.py Adds constrained storage on deploy for self-healing “setup crash” scenario.
kubernetes/tests/integration/integration/high_availability/test_self_healing_safe_recover_quorum.py Adds constrained storage on deploy for quorum-safe recovery scenario.
kubernetes/tests/integration/integration/high_availability/test_self_healing_restart_graceful.py Adds constrained storage on deploy for graceful restart scenario.
kubernetes/tests/integration/integration/high_availability/test_self_healing_process_killed.py Adds constrained storage on deploy for “process killed” self-healing scenario.
kubernetes/tests/integration/integration/high_availability/test_self_healing_process_frozen.py Adds constrained storage on deploy for “process frozen” self-healing scenario.
kubernetes/tests/integration/integration/high_availability/test_self_healing_pod.py Adds constrained storage on deploy for pod-replacement self-healing scenario.
kubernetes/tests/integration/integration/high_availability/test_self_healing_node_drain.py Adds constrained storage on deploy for node drain resilience scenario.
kubernetes/tests/integration/integration/high_availability/test_self_healing_network_cut.py Adds constrained storage on deploy for network partition/cut scenario.
kubernetes/tests/integration/integration/high_availability/test_replication_variables.py Adds constrained storage on deploy for replication variable validation.
kubernetes/tests/integration/integration/high_availability/test_replication_unit_endpoints.py Adds constrained storage on deploy for unit endpoint replication scenarios.
kubernetes/tests/integration/integration/high_availability/test_replication_scaling.py Adds constrained storage on deploy for replication scaling behavior.
kubernetes/tests/integration/integration/high_availability/test_replication_reelection.py Adds constrained storage on deploy for reelection behavior verification.
kubernetes/tests/integration/integration/high_availability/test_replication_logs_rotation.py Adds constrained storage on deploy for replication log rotation behavior.
kubernetes/tests/integration/integration/high_availability/test_replication_data_isolation.py Adds constrained storage on deploy for data isolation behavior.
kubernetes/tests/integration/integration/high_availability/test_replication_data_consistency.py Adds constrained storage on deploy for data consistency checks.
kubernetes/tests/integration/integration/high_availability/test_primary_switchover.py Adds constrained storage on deploy for primary switchover scenario.
kubernetes/tests/integration/integration/high_availability/test_async_replication.py Adds constrained storage on deploy for multi-model async replication deploys.
kubernetes/tests/integration/integration/high_availability/test_async_replication_upgrade.py Adds constrained storage on deploy for async replication upgrade deploys.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread kubernetes/tests/integration/integration/test_charm.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not bug or enhancement PR is not 'bug' or 'enhancement'. For release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants