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

feat: update cs host chaos to better recover #88

Merged
merged 18 commits into from
Aug 28, 2024

Conversation

sshutovskyi-f3
Copy link

@sshutovskyi-f3 sshutovskyi-f3 commented Aug 7, 2024

What problem does this PR solve?

Cloudstack Host chaos does not correctly fully recover:

  • it does not start stopped VMs
  • it does not uncordon nodes from VMs affected by the chaos

https://github.com/form3tech/payport-plus/issues/18

What's changed and how it works?

  • When a cloudstack VM is down, it is not assigned to any Host, so it will not be returned when listing all VMs by Host, fix this by filtering by state instead of hostId
  • Restarting all VMs when Host is up is unnecessary - start only stopped VMs
  • Injection step would be considered successful even if there are no matching hosts (to recover system)
  • VM and system VM recovery can happen even if all hosts are up (e.g. manually turned on)
  • Apply dryRun to all recovery steps
  • Uncordon k8s nodes affected by the chaos

Proof of Work

Logs:

image

All nodes healthy:

image

Related changes

  • This change also requires further updates to the website (e.g. docs)
  • This change also requires further updates to the UI interface

Cherry-pick to release branches (optional)

This PR should be cherry-picked to the following release branches:

  • release-2.6
  • release-2.5

Checklist

CHANGELOG

Must include at least one of them.

  • I have updated the CHANGELOG.md
  • I have labeled this PR with "no-need-update-changelog"

Tests

Must include at least one of them.

  • Unit test
  • E2E test
  • Manual test

Side effects

  • Breaking backward compatibility

DCO

If you find the DCO check fails, please run commands like below (Depends on the actual situations. For example, if the failed commit isn't the most recent) to fix it:

git commit --amend --signoff
git push --force

@sshutovskyi-f3 sshutovskyi-f3 requested a review from a team as a code owner August 7, 2024 13:39
Copy link

github-actions bot commented Aug 7, 2024

Created new release based on commit e6f8b8c

Release tag: v2.6.1-f3-e6f8b-sergii-fix-recovery-for-host-chaos

Link to release

@sshutovskyi-f3 sshutovskyi-f3 changed the title feat: update cs host chaos to start stopped vms from all hosts feat: update cs host chaos to better recover Aug 8, 2024
Copy link

github-actions bot commented Aug 8, 2024

Created new release based on commit 0e34635

Release tag: v2.6.1-f3-0e346-sergii-fix-recovery-for-host-chaos

Link to release

Copy link

github-actions bot commented Aug 8, 2024

Created new release based on commit bdea95f

Release tag: v2.6.1-f3-bdea9-sergii-fix-recovery-for-host-chaos

Link to release

Copy link

github-actions bot commented Aug 9, 2024

Created new release based on commit b3bc98f

Release tag: v2.6.1-f3-b3bc9-sergii-fix-recovery-for-host-chaos

Link to release

Copy link

Created new release based on commit d5d2874

Release tag: v2.6.1-f3-d5d28-sergii-fix-recovery-for-host-chaos

Link to release

Copy link

Created new release based on commit 750f8f1

Release tag: v2.6.1-f3-750f8-sergii-fix-recovery-for-host-chaos

Link to release

Copy link

@miketonks-form3 miketonks-form3 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

Created new release based on commit 06fe60d

Release tag: v2.6.1-f3-06fe6-sergii-fix-recovery-for-host-chaos

Link to release

Copy link

Created new release based on commit 2407dd8

Release tag: v2.6.1-f3-2407d-sergii-fix-recovery-for-host-chaos

Link to release

Copy link

Created new release based on commit 3caea12

Release tag: v2.6.1-f3-3caea-sergii-fix-recovery-for-host-chaos

Link to release

Copy link

Created new release based on commit e0d6eb1

Release tag: v2.6.1-f3-e0d6e-sergii-fix-recovery-for-host-chaos

Link to release

Copy link

Created new release based on commit da8c1e0

Release tag: v2.6.1-f3-da8c1-sergii-fix-recovery-for-host-chaos

Link to release

Copy link

Created new release based on commit 0609fc6

Release tag: v2.6.1-f3-0609f-sergii-fix-recovery-for-host-chaos

Link to release

Copy link

Created new release based on commit b815fee

Release tag: v2.6.1-f3-b815f-sergii-fix-recovery-for-host-chaos

Link to release

Copy link

Created new release based on commit 57924b5

Release tag: v2.6.1-f3-57924-sergii-fix-recovery-for-host-chaos

Link to release

Copy link

Created new release based on commit 0733aca

Release tag: v2.6.1-f3-0733a-sergii-fix-recovery-for-host-chaos

Link to release

Copy link

Created new release based on commit f97164f

Release tag: v2.6.1-f3-f9716-sergii-fix-recovery-for-host-chaos

Link to release

@sshutovskyi-f3 sshutovskyi-f3 merged commit c9865b5 into master Aug 28, 2024
46 checks passed
@sshutovskyi-f3 sshutovskyi-f3 deleted the sergii-fix-recovery-for-host-chaos branch August 28, 2024 07:27
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.

2 participants