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

fix HA cluster upgrades #798

Merged
merged 26 commits into from
Jul 24, 2024

Conversation

laverya
Copy link
Member

@laverya laverya commented Jul 19, 2024

No description provided.

Copy link

github-actions bot commented Jul 19, 2024

This PR has been released (on staging) and is available for download with a embedded-cluster-smoke-test-staging-app license ID.

Online Installer:

curl "https://staging.replicated.app/embedded/embedded-cluster-smoke-test-staging-app/ci/appver-dev-61eaaff" -H "Authorization: $EC_SMOKE_TEST_LICENSE_ID" -o embedded-cluster-smoke-test-staging-app-ci.tgz

Airgap Installer (may take a few minutes before the airgap bundle is built):

curl "https://staging.replicated.app/embedded/embedded-cluster-smoke-test-staging-app/ci-airgap/appver-dev-61eaaff?airgap=true" -H "Authorization: $EC_SMOKE_TEST_LICENSE_ID" -o embedded-cluster-smoke-test-staging-app-ci.tgz

Happy debugging!

obj.ObjectMeta.Labels = applySeaweedFSLabels(obj.ObjectMeta.Labels, "s3")

err := cli.Create(ctx, obj)
if err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if err != nil {
if err != nil && !k8serrors.IsAlreadyExists(err) {

Copy link
Member Author

Choose a reason for hiding this comment

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

I think failing if it already exists here is actually desired - this migration should only be run once, and if the resource already exists that means it's being run in parallel

Copy link
Member

Choose a reason for hiding this comment

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

what if creating the seaweed resources succeeded but creating the registry resources failed, so the HA field didn't get updated in the installation object. then it will always fail on retry unless the resource gets deleted manually.

obj.ObjectMeta.Labels = applySeaweedFSLabels(obj.ObjectMeta.Labels, "s3")

err = cli.Create(ctx, obj)
if err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if err != nil {
if err != nil && !k8serrors.IsAlreadyExists(err) {

obj.ObjectMeta.Labels = applySeaweedFSLabels(obj.ObjectMeta.Labels, "s3")

err = cli.Create(ctx, obj)
if err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if err != nil {
if err != nil && !k8serrors.IsAlreadyExists(err) {

laverya and others added 6 commits July 24, 2024 14:17
* updated embeddedclusteroperator version

* Update values.yaml

* Update values.yaml

---------

Co-authored-by: laverya <[email protected]>
Co-authored-by: Andrew Lavery <[email protected]>
@laverya laverya merged commit ae48968 into main Jul 24, 2024
43 checks passed
@laverya laverya deleted the laverya/sc-109059/multi-node-ha-upgrades-do-not-work branch July 24, 2024 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants