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

minio migration via hooks #1860

Merged
merged 3 commits into from
Dec 18, 2024
Merged

minio migration via hooks #1860

merged 3 commits into from
Dec 18, 2024

Conversation

jasonheath
Copy link
Contributor

@jasonheath jasonheath commented Dec 9, 2024

Implements minio migration via hooks.
Has related changes in habitat-sh/on-prem-builder#278

Signed-off-by: Jason Heath <[email protected]>
@mwrock
Copy link
Contributor

mwrock commented Dec 10, 2024

@jasonheath I didn't get too far with this:

  • I was on a on-prem bldr setup via the ./install.sh script.
  • I promoted all of the LTS-2024 packages on builder to a new channel LTS-TEST.
  • I built builder-minio from this PR in the habitat origin and uploaded it to the LTS-TEST channel.
  • I then ran sudo ./uninstall.sh on my builder
  • I edited my bldr.env file to use the LTS-TEST channel
  • I ran ./install.sh

The install completed but builder-minio was in the down state. I ran journalctl -n 50 -fu hab-sup and see the following:
Dec 10 21:19:58 ip-172-31-37-92 hab[490708]: builder-minio hook[install]:(HK): CHECKING dependencies
Dec 10 21:19:58 ip-172-31-37-92 hab[490708]: builder-minio hook[install]:(HK): core/aws-cli not installed, installing
Dec 10 21:19:58 ip-172-31-37-92 hab[490708]: builder-minio hook[install]:(HK): sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
Dec 10 21:19:58 ip-172-31-37-92 sudo[490935]: pam_unix(sudo:auth): conversation failed
Dec 10 21:19:58 ip-172-31-37-92 sudo[490935]: pam_unix(sudo:auth): auth could not identify password for [hab]
Dec 10 21:19:58 ip-172-31-37-92 hab[490708]: builder-minio hook[install]:(HK): sudo: a password is required
Dec 10 21:19:58 ip-172-31-37-92 hab[490708]: builder-minio hook[install]:(HK): ERROR: install of core/aws-cli FAILED
Dec 10 21:19:58 ip-172-31-37-92 hab[490708]: builder-minio(HK): Installation failed! 'install' exited with status code 4
Dec 10 21:19:58 ip-172-31-37-92 hab[490708]: hab-sup(MR): Failed to run install hook for habitat/builder-minio, habitat/builder-minio/9779/20241210205901 install hook failed: exited with status 4

The prerequisites check could be avoided as long as the prerequisite packages are in the pkg dependencies.

@jasonheath jasonheath requested a review from mwrock December 17, 2024 13:56
- Removes all sudo, pulls dependencies into plan file
- Removes _aws, _curl, and _jq
- Redirects pgrep and pkill stderr to /dev/null
- Changes use of | tee to &> on minio hab execs
- Adds messaging about possible long runtime of cp command
- Adds --endpoint-url back to aws command calls
- Cuts down envvar usage in favor of plan vars

Signed-off-by: Jason Heath <[email protected]>
Copy link
Contributor

@mwrock mwrock left a comment

Choose a reason for hiding this comment

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

Looks good!

@jasonheath jasonheath merged commit c1617ad into main Dec 18, 2024
7 checks passed
@jasonheath jasonheath deleted the jah/migrate_minio branch December 18, 2024 13:08
chef-expeditor bot pushed a commit that referenced this pull request Dec 18, 2024
Obvious fix; these changes are the result of automation not creative thinking.
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.

2 participants