When testing previous Client chart changes, I ran into some difficulty figuring out how to use the client commands. I received some help, and thought it would be useful to distill that learning and make it easier to for others use for debugging purposes.
This PR does two things, first it renames some ConfigMaps to indicate that they contain helper scripts.
The second and main change, is to add a helper script for use within Client containers to run m0* commands. Here's example usage:
First, you exec into one of the Client containers. Each container has an "index" environment variable, which designates which client it is in relation to the Motr configuration. The script fetches information about the client (using hctl fetch-fids) and stores them in environment variables. When sourcing the script, it will export those env vars, and provide a m0shim bash function. This function allows the calling of a select handful of m0* commands and automatically sets some required command line arguments. I picked the commands that looked interesting, but I don't have much practical experience with them.
Breaking change
Type of change
[ ] Bug fix (non-breaking change that fixes an issue)
[X] 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:
How was this tested?
See usage example above.
Checklist
[X] The change is tested and works locally.
[ ] New or changed settings in the solution YAML are documented clearly in the README.md file.
Description
When testing previous Client chart changes, I ran into some difficulty figuring out how to use the client commands. I received some help, and thought it would be useful to distill that learning and make it easier to for others use for debugging purposes.
This PR does two things, first it renames some ConfigMaps to indicate that they contain helper scripts.
The second and main change, is to add a helper script for use within Client containers to run m0* commands. Here's example usage:
First, you
exec
into one of the Client containers. Each container has an "index" environment variable, which designates which client it is in relation to the Motr configuration. The script fetches information about the client (usinghctl fetch-fids
) and stores them in environment variables. When sourcing the script, it will export those env vars, and provide am0shim
bash function. This function allows the calling of a select handful of m0* commands and automatically sets some required command line arguments. I picked the commands that looked interesting, but I don't have much practical experience with them.Breaking change
Type of change
Applicable issues
How was this tested?
See usage example above.
Checklist
If this change requires newer CORTX or third party image versions:
image
fields in solution.example.yaml have been updated to use the required versions.appVersion
field of the Helm chart has been updated to use the new CORTX version.If this change addresses a CORTX Jira issue:
CORTX-XXXXX:
)