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

[web/task split] fix scale down bug #1295

Merged
merged 2 commits into from
Mar 23, 2023

Conversation

thedoubl3j
Copy link
Member

@thedoubl3j thedoubl3j commented Mar 20, 2023

SUMMARY

fixes #1255

While working on cleanup, the scale down playbook didn't have the new naming conventions for the pods and would currently scale down nothing during any type of db upgrade etc.

This adds a simple list loop to scale down both pods during any db upgrade/migration/configuration in the operator.

ISSUE TYPE
  • Bug, Docs Fix or other nominal change
ADDITIONAL INFORMATION

test case
To test this properly, we will need to either provoke the rescue block or do a db migration or upgrade. I think there is also a way to provoke it if there is no DB specified but I need to investigate this.

If anyone has any pointers or thoughts on how we can approach this, please share as I am running low on ideas.

@TheRealHaoLiu TheRealHaoLiu self-requested a review March 20, 2023 17:50
@thedoubl3j thedoubl3j marked this pull request as ready for review March 22, 2023 14:33
@rooftopcellist
Copy link
Member

@thedoubl3j It looks like there is an entry in roles/restore that also needs to be addressed:

  • - name: Check for presence of AWX Deployment
    k8s_info:
    api_version: v1
    kind: Deployment
    name: "{{ deployment_name }}"
    namespace: "{{ ansible_operator_meta.namespace }}"
    register: this_deployment
    - name: Scale down Deployment for migration
    k8s_scale:
    api_version: v1
    kind: Deployment
    name: "{{ deployment_name }}"
    namespace: "{{ ansible_operator_meta.namespace }}"
    replicas: 0
    wait: yes
    when: this_deployment['resources'] | length

@rooftopcellist rooftopcellist self-requested a review March 22, 2023 18:09
@thedoubl3j
Copy link
Member Author

@rooftopcellist take a look when you get a sec, I elected to check for a task deployment rather than just awx (doesn't exist anymore) or both since if one is there, the other will be as well.

@thedoubl3j thedoubl3j merged commit 1192c5b into ansible:feature_web-task-split Mar 23, 2023
TheRealHaoLiu pushed a commit that referenced this pull request Mar 28, 2023
- rename scale_down vars to the new deployments since the old one no longer exists
- rename postgres.yml scale down vars as it references the old ones as well
TheRealHaoLiu pushed a commit that referenced this pull request Mar 30, 2023
- rename scale_down vars to the new deployments since the old one no longer exists
- rename postgres.yml scale down vars as it references the old ones as well
TheRealHaoLiu pushed a commit that referenced this pull request Mar 30, 2023
- rename scale_down vars to the new deployments since the old one no longer exists
- rename postgres.yml scale down vars as it references the old ones as well
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants