Skip to content

fix(install): remove old castemplates and runtask after upgrade#1595

Merged
vishnuitta merged 4 commits intoopenebs-archive:masterfrom
shubham14bajpai:runtask
Jan 29, 2020
Merged

fix(install): remove old castemplates and runtask after upgrade#1595
vishnuitta merged 4 commits intoopenebs-archive:masterfrom
shubham14bajpai:runtask

Conversation

@shubham14bajpai
Copy link
Copy Markdown
Contributor

@shubham14bajpai shubham14bajpai commented Jan 27, 2020

Signed-off-by: shubham shubham.bajpai@mayadata.io

What this PR does / why we need it:
The installer code currently does not clean up the old runtasks and castemplates after each upgrade. This causes lots of stale CRs after each upgrade.
Note: This PR removes old castemplates and runtasks for jiva 0.6.0 from installer code.
For example :

shovan@probot:~/Desktop/workspace$ kubectl get runtask -n openebs
NAME                                                              AGE
cas-volume-stats-default-0.9.0                                    220d
cas-volume-stats-default-1.0.0                                    215d
cas-volume-stats-default-1.1.0                                    175d
cas-volume-stats-default-1.3.0                                    99d
cas-volume-stats-default-1.4.0                                    71d
cas-volume-stats-default-1.5.0                                    40d
cas-volume-stats-default-1.6.0                                    7d
cas-volume-stats-output-default-0.9.0                             220d
cas-volume-stats-output-default-1.0.0                             215d
cas-volume-stats-output-default-1.1.0                             175d
cas-volume-stats-output-default-1.3.0                             99d
cas-volume-stats-output-default-1.4.0                             71d
cas-volume-stats-output-default-1.5.0                             40d
cas-volume-stats-output-default-1.6.0                             7d
cstor-pool-create-getspc-default-0.9.0                            220d
cstor-pool-create-getspc-default-1.0.0                            215d
cstor-pool-create-getspc-default-1.1.0                            175d
cstor-pool-create-getspc-default-1.3.0                            99d
cstor-pool-create-getspc-default-1.4.0                            71d
cstor-pool-create-getspc-default-1.5.0                            40d
cstor-pool-create-getspc-default-1.6.0                            7d
shovan@probot:~/Desktop/workspace$ kubectl get cast
NAME                                  AGE
cas-volume-stats-default-0.8.0        1y
cas-volume-stats-default-0.8.1        334d
cas-volume-stats-default-0.9.0        244d
cas-volume-stats-default-1.0.0        215d
cas-volume-stats-default-1.1.0        175d
cas-volume-stats-default-1.3.0        99d
cas-volume-stats-default-1.4.0        71d
cas-volume-stats-default-1.5.0        40d
cas-volume-stats-default-1.6.0        7d

This PR adds the Clean() to remove all the old CRs after the successful installation of latest CRs.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Special notes for your reviewer:

Checklist:

  • Fixes #
  • Labelled this PR & related issue with documentation tag
  • PR messages has document related information
  • Labelled this PR & related issue with breaking-changes tag
  • PR messages has breaking changes related information
  • Labelled this PR & related issue with requires-upgrade tag
  • PR messages has upgrade related information
  • Commit has unit tests
  • Commit has integration tests

Copy link
Copy Markdown
Contributor

@mynktl mynktl left a comment

Choose a reason for hiding this comment

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

Thanks @shubham14bajpai for the PR. Changes looks good to me. I have one concern about cleanup error, is it ok to ignore the error?

Signed-off-by: shubham <shubham.bajpai@mayadata.io>
Signed-off-by: shubham <shubham.bajpai@mayadata.io>
Signed-off-by: shubham <shubham.bajpai@mayadata.io>
Signed-off-by: shubham <shubham.bajpai@mayadata.io>
@vishnuitta vishnuitta merged commit 8c5d8de into openebs-archive:master Jan 29, 2020
@kmova kmova added this to the 1.7.0 milestone Feb 4, 2020
@shubham14bajpai shubham14bajpai deleted the runtask branch March 17, 2020 06:09
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