-
Notifications
You must be signed in to change notification settings - Fork 200
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(cspc): migrate pools from spc to cspc #1531
Conversation
5b75709
to
0e14d17
Compare
af1e096
to
160c699
Compare
160c699
to
e9c8c8d
Compare
01059c0
to
27e0fe4
Compare
0ddd9d5
to
99bc5a0
Compare
} | ||
|
||
// PreRun will check for environement variables to be read and intialized. | ||
func PreRun(cmd *cobra.Command, args []string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is the same check-in upgrade code also. Can we have a common code?
NewMigratePoolJob(), | ||
) | ||
|
||
cmd.PersistentFlags().StringVarP(&options.openebsNamespace, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we overwriting the value of openebsNamespace after reading from env?
"replicas": 0 | ||
} | ||
}` | ||
cspNameLabel = "cstorpool.openebs.io/name" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move these to APIs? So that we can use the same name wherever it required.
pkg/cstor/migrate/pool.go
Outdated
WithNamespace(openebsNamespace). | ||
Update(&bdcObj) | ||
if err != nil { | ||
return errors.Wrapf(err, "failed to update bdc %s with cspc label & finalizer", bdcObj.Name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we have to add a note to README.md. Once the user tried the migration process user should try until it succeeds or else there will be chances of stale BD's if the user triggers the deletion of the SPC process(Since CSPC is not yet created).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, In the worst case, there will be a chance of network failures.
if err != nil { | ||
return nil, err | ||
} | ||
cspcObj, err = cspc.NewKubeClient(). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Good to have a client in Hands instead of every time generating client. In CSPC kubernetes package we can use sync.Once
@@ -0,0 +1,30 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove this package?
1fa726e
to
fcc401b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found some fixes!
P.S. share your ideas, feedbacks or issues with us at https://github.com/fixmie/feedback (this message will be removed after the beta stage).
e05d79e
to
b5cf01a
Compare
Signed-off-by: shubham <[email protected]>
Signed-off-by: shubham <[email protected]>
Signed-off-by: shubham <[email protected]>
Signed-off-by: shubham <[email protected]>
annotations: - removed oldCSPUID schema change - added two generic annotation which can be used in different scenarios - renamed one function according to the functionality Signed-off-by: shubham <[email protected]>
Signed-off-by: shubham <[email protected]>
Signed-off-by: shubham <[email protected]>
Signed-off-by: shubham <[email protected]>
Signed-off-by: shubham <[email protected]>
Signed-off-by: shubham <[email protected]>
Signed-off-by: shubham <[email protected]>
Signed-off-by: shubham <[email protected]>
Signed-off-by: shubham <[email protected]>
Signed-off-by: shubham <[email protected]>
Signed-off-by: shubham <[email protected]>
a077dbd
to
2a24183
Compare
Signed-off-by: shubham <[email protected]>
Signed-off-by: shubham <[email protected]>
Signed-off-by: shubham <[email protected]>
Signed-off-by: shubham <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes are good according to the current migration OEP. Enhancements are required based on CSPC & it's deployment changes.
This PR is replaced by openebs-archive/upgrade#4 |
Signed-off-by: shubham [email protected]
What this PR does / why we need it:
This PR adds the functionality to migrate a pool from SPC to CSPC.
Refer openebs/openebs#2840 for design.
Example Migration Job yaml
Logs for the job executed for 3 pool SPC migration.
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:
documentation
tagbreaking-changes
tagrequires-upgrade
tag