-
Notifications
You must be signed in to change notification settings - Fork 34
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
Added minio migration script #277
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: sougata-progress <[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.
I don't see where the migration is happening in this PR. It looks like it checks if the latest core/minio is installed and if not it installs it. What it needs to do is check if the core/minio is <= 2023-11-01T01-57-10Z. If core/minio is not installed of if the version is > 2023-11-01T01-57-10Z then do nothing and let the provision.sh script do its thing. If they are <= 2023-11-01T01-57-10Z then their minio data needs to be migrated (see https://github.com/habitat-sh/on-prem-builder/blob/main/scripts/minio-update.sh).
You will want to test this by having a stable
stand alone builder server setup with some installed packages. Then follow https://github.com/habitat-sh/on-prem-builder/blob/main/on-prem-docs/upgrading.md to do an upgrade. After the upgrade you should be on the LTS minio and all your packages and package metadata should still be visible in the builder UI and you should be able to download them with the hab binary too.
Note that before doing the update, you should set BLDR_CHANNEL
to unstable
in the bldr.env file to get the latest builder packages.
Signed-off-by: sougata-progress <[email protected]>
3f64307
to
9de828d
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.
Another thing in addition to the comments, what if any of these is not installed: 'core/aws-cli' 'core/bc' 'core/coreutils'? I think we need to make sure they are installed and install if not present. At least aws-cli. Need to check if we need the others.
Signed-off-by: sougata-progress <[email protected]>
Signed-off-by: sougata-progress <[email protected]>
Signed-off-by: sougata-progress <[email protected]>
Signed-off-by: sougata-progress <[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.
I did some testing on this yesterday and here are some observations I have made:
- After migrating, there are some leftover files and folders in the
scripts
directory. This includes a file calledminio-update-bldr-bucket-objects.txt
and a directory namedminio-update-bldr-bucket-objects
. If another migration is attempted on the same machine, these files could negatively impact that migration. - I noticed a folder called
.minio.sys
in the data directory. It has aconfig/config.json
file that has some version metadata. I'm not sure what these version numbers correspond to but it may be worth researching. Perhaps it would be better to look here to determine if a migration is necessary instead of the version of core/minio that is installed. - I wanted to scratch my migration and "rollback" to the old data. I uninstalled the latest core/minio, ran ./uninstall.sh, and copied the data-bkp data back into data. When I reinstalled the on-prem-stable builder packages, minio was not able to come up with errors that it was on a old version.
Signed-off-by: sougata-progress <[email protected]>
Signed-off-by: sougata-progress <[email protected]>
Signed-off-by: sougata-progress <[email protected]>
1463705
to
cc9d587
Compare
Signed-off-by: sougata-progress <[email protected]>
124c401
to
ce2a87e
Compare
Signed-off-by: sougata-progress <[email protected]>
ce2a87e
to
50cf350
Compare
I was looking at this again today. I wanted to look more closely at the
On LTS it is:
I think that the value of That all said, I discovered something else totally by accident. That is if you just update the |
Signed-off-by: sougata-progress <[email protected]>
story : CHEF-16458