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

DBAAS-1193: workaround to the ack-rds-controller upgrade issue #343

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

xieshenzh
Copy link
Contributor

@xieshenzh xieshenzh commented Feb 10, 2023

Description

New upgrade issue was found with ARO cluster when the ack-rds-controller upgrades from v0.1.0 to v0.1.1.
Jira: https://issues.redhat.com/browse/DBAAS-1193

The new workaround is to delete the ack-rds-controller Subscription and CSV when dbaas-operator v0.0.4 is installed.
So that, ack-rds-controller v0.1.3 installation will be triggered when installing the rds-dbaas-operator, and ack-rds-controller upgrade is skipped.

Verification Steps

Upgrading RHODA v0.0.3 to 0.0.4.
Check if the upgrade succeeds and if the ack-rds-controller is upgraded to v0.1.3.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist (Definition of Done)

  • All acceptance criteria specified in JIRA or in issue number have been completed
  • Unit tests added that prove the fix is effective or the feature works
  • Documentation added for the feature
  • all relevant tests are passing
  • Code Review completed
  • Verified independently by reviewer

@xieshenzh xieshenzh force-pushed the DBAAS-1193-2 branch 4 times, most recently from 118f80d to 40acdd4 Compare February 11, 2023 03:22
@xieshenzh xieshenzh marked this pull request as ready for review February 13, 2023 19:47
@xieshenzh xieshenzh added hold and removed hold labels Feb 14, 2023
- type: olm.package
value:
packageName: ack-rds-controller
version: ">=0.0.27 <=0.1.3"
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this intentional removed ? if yes how the RDS controller will be installed ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It will be installed as a dependency of the rds-dbaa-operator.

Copy link
Contributor

@tchughesiv tchughesiv Feb 15, 2023

Choose a reason for hiding this comment

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

this isn't good enough... in my prior testing its required in both places. If nothing else, dbaas-operator at the very least is where this dep needs to be. This is because during a RHODA upgrade, if ack-rds-controller has since release a new version... say 0.2.0, ACK will upgrade without this dep declared. This will then break the rhoda install as rds would have a dep conflict

Copy link
Contributor

Choose a reason for hiding this comment

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

this should not be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The auto-upgrade of the ack-rds-controller is broken. Since the upgrade of the ack-rds-controller is not maintained, it is not necessary to allow it to upgrade, which causes various issues.
Changes in this PR will delete any ack-rds-controller as soon as the dbaas-operator is installed in the namespace, upgrade of the ack-rds-controller will not take place during RHODA upgrade.
When the rds-dbaas-operator is re-installed, the properly version of the ack-rds-controller will be installed as a dependency.

Copy link
Contributor

Choose a reason for hiding this comment

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

that doesn't help in clusters where ack is installed in another ns

Copy link
Contributor

Choose a reason for hiding this comment

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

this is the benefit of using olm deps

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the ack-rds-controller is installed in another namespace, rhoda will not work. Because the secret and configmap of the ack-rds-controller must be set by the rhoda operator in the rhoda installation namespace in order to create a provider account, then rhoda will scale up the deployment of the ack-rds-controller in the rhoda installation namespace.

Copy link
Contributor

Choose a reason for hiding this comment

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

but, wouldn't anyone who's installed ack in another namespace have configured it already? why would we care if it's in same namespace?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The configuration information of the ack-rds-controller should be provided via rhoda provider account creation. Only one provider account can be created for RDS in a cluster, and the credentials of the provider account is used to set up the ack-rds-controller.
If users configure and install the operator in another namespace without using rhoda, then it is supposed to work independent of rhoda.

- type: olm.package
value:
packageName: ack-rds-controller
version: ">=0.0.27 <=0.1.3"
Copy link
Contributor

Choose a reason for hiding this comment

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

this should not be removed

@tchughesiv tchughesiv added hold and removed hold labels Feb 15, 2023
if err := cli.Create(ctx, cm); err != nil {
}
if instanceCRD && clusterCRD {
if err := cli.Delete(ctx, &csv); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

What happens when the dbaas-manger pod gets restarted? Would this cause the ack sub to be deleted?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. The ack-rds-controller will be deleted in this case.
Changed the code to also delete rds-dbaas-operator when starting dbaas-operator. Then the rds-dbaas-operator and ack-rds-controller will be re-installed when re-starting dbaas-operator.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure that's a solution though. We can't have ack and rds being uninstalled/reinstalled every time the pod restarts... which could be often.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could check the version of the ack-rds-controller only delete it when the version is not right.
Otherwise, I am not sure if there is a good solution to the ack-rds-controller upgrade issues.

@tchughesiv tchughesiv marked this pull request as draft March 31, 2023 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants