Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

CORTX-34139: Remove all deprecated code #379

Merged
merged 8 commits into from
Sep 13, 2022
Merged

CORTX-34139: Remove all deprecated code #379

merged 8 commits into from
Sep 13, 2022

Conversation

keithpine
Copy link
Contributor

@keithpine keithpine commented Sep 13, 2022

Description

In v0.12.0 we announced future removal of deprecated code and Kubernetes resources for v0.13.0. This change is the removal of said code/resources.

  • Remove deletion of deprecated Charts and resources in uninstall script
  • Remove commented out Consul patching from install script
  • Remove cortx-control-loadbal-svc Service
  • Remove deprecated cortx-io-svc-N Service
  • Remove filters for deprecated services in service status script

Breaking change

  • Removal of Services cortx-control-loadbal-svc and cortx-io-svc-N. Use cortx-control and cortx-server-N Service names instead.

In general, running the utility scripts from a new release against clusters deployed from previous versions of cortx-k8s is not recommended, but may work. In this case, with 0.13.0:

  • Running the uninstall script for a cluster deployed with v0.9.0 or earlier will fail to cleanup all resources. The solution is to either uninstall the cluster prior to using the new script version, or manually cleanup the left-over resources. It should work with v0.10.0 to v0.12.0 deployed clusters, but has not been tested.
  • Running the status script on an v0.12.0 or earlier deployed cluster may erroneously report issues due to the existence of the deprecated services.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds new functionality)
  • Breaking change (bug fix or new feature that breaks existing functionality)
  • Third-party dependency update
  • Documentation additions or improvements
  • Code quality improvements to existing code or test additions/updates

Applicable issues

  • This change fixes an issue: CORTX-34139

How was this tested?

  • Deploy cluster
  • Run S3 I/O after deployment
  • Run CSM I/O after deployment
  • Destroy cluster, notice no leftover resources
  • Observed expected services, and only those, are installed
  • Observed no items exist with label cortx.io/deprecated=true

Additional information

  • As a result of removing deprecated code, other dead code was removed.
  • Did some misc cleanup of bash code
  • Fixed a bug with secret generation if the solution.yaml file field had an in-line comment
  • Secret temporary files are in a direct subdirectory, not in the obsolete cortx-cloud-helm-pkg directory
  • Remove some dependence on custom YAML parsing functions and scripts, use yq directly
  • Parallelize deletion of PVCs using Chart-based labels. TODO: see if we can tag Consul PVCs with the same label to further parallelize all PVC deletions.
  • Make output of destroy script a bit less verbose
  • Changed the order of resource uninstallation to match the reverse of installation. This shouldn't have much noticeable effect.

Checklist

  • The change is tested and works locally.
  • New or changed settings in the solution YAML are documented clearly in the README.md file.
  • All commits are signed off and are in agreement with the CORTX Community DCO and CLA policy.

If this change requires newer CORTX or third party image versions:

  • The image fields in solution.example.yaml have been updated to use the required versions.
  • The appVersion field of the Helm chart has been updated to use the new CORTX version.

If this change addresses a CORTX Jira issue:

  • The title of the PR starts with the issue ID (e.g. CORTX-XXXXX:)

- Misc script cleanup
- Use selectors for PVC deletion
- Remove need for external YAML parsing scripts (use `yq`)

Signed-off-by: Keith Pine <[email protected]>
- Auto-generated secret is now saved in
  "k8_cortx_cloud/auto-gen-secret-${namespace}"
  instead of a subdirectory.
- Localize temporary secret cleanup to function
- Remove vestiges of cortx-configmap chart dir

Signed-off-by: Keith Pine <[email protected]>
@cla-bot cla-bot bot added the cla-signed label Sep 13, 2022
Copy link
Contributor

@walterlopatka walterlopatka left a comment

Choose a reason for hiding this comment

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

I verified by running my deploy_all regression tests, and all pass.

@keithpine keithpine marked this pull request as ready for review September 13, 2022 15:27
@keithpine keithpine requested a review from a team as a code owner September 13, 2022 15:27
Copy link
Contributor

@osowski osowski left a comment

Choose a reason for hiding this comment

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

lgtm

@osowski osowski merged commit 1d1950f into Seagate:integration Sep 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants