Repository navigation
Route AlmaLinux 10 x86_64 ALTS tasks to x86-64-v3 workers - #44
Merged
Merged
Conversation
ansible-core 2.19 requires conditionals to evaluate to a boolean, so testing scheduler_working_directory (a string) directly fails the task.
The scheduler config used rabbitmq_host and alts_redis_host, the same variables as the workers. When the worker-facing addresses are passed as extra vars, they override the scheduler's group_vars, and the scheduler config gets addresses meant for the workers. The scheduler now uses scheduler_rabbitmq_host and scheduler_redis_host; the workers keep rabbitmq_host and alts_redis_host. Related: AlmaLinux/build-system#563
The AlmaLinux 10 linux/amd64 image needs an x86-64-v3 CPU. Render the new scheduler setting queue_arch_overrides and enable it in the scheduler group_vars, so AlmaLinux 10 x86_64 tasks go to the docker-x86_64_v3-* queues. Only x86-64-v3 capable workers should list docker-x86_64_v3-0 in celery_queues; the example x86_64 worker does. Resolves: AlmaLinux/build-system#563
The role downloaded and unpacked Terraform on every run, so it always reported changes. In check mode get_url doesn't download, and the unpack failed with "Source '/tmp/terraform.zip' does not exist". Read the installed version first and download, unpack and clean up only when Terraform is missing or a different version; skip the unpack in check mode.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves AlmaLinux/build-system#563
Depends on AlmaLinux/alts#236
Summary
Deployment side of sending AlmaLinux 10 x86_64 test tasks only to x86-64-v3 capable workers, plus two ALTS scheduler deployment fixes found while rolling it out.
Changes
playbooks/templates/alts_service_config.yaml.j2: rendersqueue_arch_overridesfor the scheduler only (it's a scheduler setting). Versions are quoted so they stay strings.inventories/alts/group_vars/scheduler.yml: enables the override for AlmaLinux 10,x86_64→x86_64_v3.inventories/alts/hosts.yml: the example x86_64 worker also consumesdocker-x86_64_v3-0, so AlmaLinux 10 tasks have a consumer there.rabbitmq_host/alts_redis_host, the same variables as the workers. When the worker-facing addresses are passed as extra vars, they override the scheduler's group_vars.scheduler_rabbitmq_host/scheduler_redis_host(renamed ingroup_vars/scheduler.yml); the workers keep the old names.roles/alts_scheduler/tasks/main.yml:Create scheduler working directoryfailed because itswhen:evaluated a string as a boolean.roles/alts_terraform/tasks/main.yml: the role downloaded and unpacked Terraform on every run, and in--checkmode failed withSource '/tmp/terraform.zip' does not existbecauseget_urldoesn't download in check mode. It now reads the installed version and downloads, unpacks and cleans up only when Terraform is missing or a different version; the unpack is skipped in check mode.Upgrade notes
rabbitmq_host/alts_redis_hostfor the scheduler need to rename them toscheduler_rabbitmq_host/scheduler_redis_host.docker-x86_64_v3-0tocelery_queuesonly on workers whose CPU supports x86-64-v3 (grep -c avx2 /proc/cpuinfois non-zero). With the override enabled, AlmaLinux 10 x86_64 tasks wait in RabbitMQ until such a worker consumes the queue.Rollout
Testing
scheduler_rabbitmq_host/scheduler_redis_hostandqueue_arch_overrides; the worker getsrabbitmq_host/alts_redis_hostand no override, also with the worker-facing addresses passed as extra vars.ansible-inventory --hostresolves the renamed variables andqueue_arch_overridesfor the scheduler and the new queue for the worker.alts_scheduler.ymlin--check --diffmode against production got past the working directory task and showed the expected config diff. Not yet applied.alts_celery.ymlpasses--syntax-checkwith the Terraform change; the role itself hasn't been re-run yet.