Skip to content

Comments

Add kit directory validation during installation#345

Closed
sayalibhavsar wants to merge 2 commits intoredhat-performance:mainfrom
sayalibhavsar:gh-323
Closed

Add kit directory validation during installation#345
sayalibhavsar wants to merge 2 commits intoredhat-performance:mainfrom
sayalibhavsar:gh-323

Conversation

@sayalibhavsar
Copy link
Contributor

@sayalibhavsar sayalibhavsar commented Dec 23, 2025

Description

This PR adds inline validation to install.sh that checks for missing kit files/directories specified in config templates and displays clear warnings during installation.

Before/After Comparison

Before: Installation completed silently even if required kits were missing, causing wrappers to fail later without clear indication why.
After: Installation displays a formatted warning listing all missing kits with their paths and guidance on how to resolve the issue.

Documentation Check

No documentation updates needed as this is a non-blocking warning feature that enhances existing installation behavior without changing user workflows.

Clerical Stuff

This closes #323
Relates to JIRA: RPOPC-700

@sayalibhavsar sayalibhavsar self-assigned this Dec 23, 2025
@sayalibhavsar sayalibhavsar added the group_review_lgtm Indicates approval after a group review meeting label Dec 23, 2025
@sayalibhavsar
Copy link
Contributor Author

[sudo] password for sbhavsar: 
For most use cases, running this script as root is NOT recommended. Are you sure? Y/N Y
You answered yes, continuing install as root.
ansible-core is installed.
git is installed.
jq is installed.
Installing python...
Updating and loading repositories:
Repositories loaded.
Package "python-unversioned-command-3.14.2-1.fc43.noarch" is already installed.

Nothing to do.
python3-pip is installed.
terraform is installed.
unzip is installed.
Installing wget...
Updating and loading repositories:
Repositories loaded.
Package "wget2-wget-2.2.0-6.fc43.x86_64" is already installed.

Nothing to do.
Requirement already satisfied: boto in /usr/lib/python3.14/site-packages (2.49.0)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
Requirement already satisfied: boto3 in /usr/lib/python3.14/site-packages (1.42.19)
Requirement already satisfied: botocore<1.43.0,>=1.42.19 in /usr/lib/python3.14/site-packages (from boto3) (1.42.19)
Requirement already satisfied: jmespath<2.0.0,>=0.7.1 in /usr/lib/python3.14/site-packages (from boto3) (1.0.1)
Requirement already satisfied: s3transfer<0.17.0,>=0.16.0 in /usr/lib/python3.14/site-packages (from boto3) (0.16.0)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in /usr/lib/python3.14/site-packages (from botocore<1.43.0,>=1.42.19->boto3) (2.9.0.post0)
Requirement already satisfied: urllib3!=2.2.0,<3,>=1.25.4 in /usr/lib/python3.14/site-packages (from botocore<1.43.0,>=1.42.19->boto3) (2.6.2)
Requirement already satisfied: six>=1.5 in /usr/lib/python3.14/site-packages (from python-dateutil<3.0.0,>=2.1->botocore<1.43.0,>=1.42.19->boto3) (1.17.0)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
Collecting yq==2.10.0
  Downloading yq-2.10.0-py2.py3-none-any.whl.metadata (7.8 kB)
Requirement already satisfied: setuptools in /usr/lib/python3.14/site-packages (from yq==2.10.0) (78.1.1)
Requirement already satisfied: PyYAML>=3.11 in /usr/lib64/python3.14/site-packages (from yq==2.10.0) (6.0.2)
Collecting xmltodict>=0.11.0 (from yq==2.10.0)
  Downloading xmltodict-1.0.2-py3-none-any.whl.metadata (15 kB)
Requirement already satisfied: argcomplete>=1.8.1 in /usr/lib/python3.14/site-packages (from yq==2.10.0) (3.6.3)
Downloading yq-2.10.0-py2.py3-none-any.whl (15 kB)
Downloading xmltodict-1.0.2-py3-none-any.whl (13 kB)
Installing collected packages: xmltodict, yq
  WARNING: The scripts xq and yq are installed in '/root/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed xmltodict-1.0.2 yq-2.10.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
Starting galaxy collection install process
Nothing to do. All requested collections are already installed. If you want to reinstall them, consider using `--force`.
Starting galaxy collection install process
Nothing to do. All requested collections are already installed. If you want to reinstall them, consider using `--force`.
Starting galaxy collection install process
Nothing to do. All requested collections are already installed. If you want to reinstall them, consider using `--force`.
Starting galaxy collection install process
Process install dependency map
Starting collection install process
Downloading https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/artifacts/amazon-aws-9.1.0.tar.gz to /root/.ansible/tmp/ansible-local-530457gq5f99c/tmp_cv0i9zc/amazon-aws-9.1.0-pbkviydq
Installing 'amazon.aws:9.1.0' to '/root/.ansible/collections/ansible_collections/amazon/aws'
amazon.aws:9.1.0 was installed successfully
Installation record saved to: zathras_install_20260112_154328.log

Validating kit directories...

======================================================================
WARNING: Missing Kit Directories
======================================================================

The following kit files/directories specified in templates do not exist:

  - hammerdb_template.yml: /home/exports/hammerdb-tpcc.tar

These kits are required for certain benchmarks to run properly.
Wrappers depending on these kits may fail until they are provided.

Please ensure the required kits are placed at the specified locations
or update the template files in /home/sbhavsar/zathras/config to reflect the correct paths.
======================================================================

Before you can run Zathras:
****Ensure ~/.local/bin is in your path
****Set up a scenario file
****If running a local system, create the local config file for the system under test (SUT)
****If using an existing system, ssh-copy-id between the system Zathras is installed on and the SUT.
****If working in a cloud environment do not perform the ssh-copy-id.
****Update/create the test configuration files in /zathras/config/ to reflect your requirements.
sbhavsar@sbhavsar-thinkpadp16vgen1:~/zathras$ ls -l /home/exports/
total 3051912
-rw-r--r--. 1 sbhavsar sbhavsar 3074125824 Jul 22 15:42 cpu2017-1.1.8.iso
-rw-r--r--. 1 sbhavsar sbhavsar   28978721 Jul 22 15:42 l_onemklbench_p_2023.2.0_49340.tgz
drwxr-xr-x. 1 sbhavsar sbhavsar         68 Jul 22 14:48 passmark_new
-rw-r--r--. 1 sbhavsar sbhavsar    2581890 Jul 22 15:42 pt_linux_arm64.zip
-rw-r--r--. 1 sbhavsar sbhavsar    2329820 Jul 22 15:42 pt_linux_x64.zip
-rw-r--r--. 1 sbhavsar sbhavsar    1843024 Jul 22 14:49 SPECjbb2005_kitv1.07.tar.gz
-rw-r--r--. 1 sbhavsar sbhavsar   15292928 Jul 22 15:42 xlinpack_xeon64-NEW


sbhavsar@sbhavsar-thinkpadp16vgen1:~/zathras$ sudo mv /home/exports/SPECjbb2005_kitv1.07.tar.gz /home/sbhavsar/
sbhavsar@sbhavsar-thinkpadp16vgen1:~/zathras$ ls -l /home/exports/
total 3050112
-rw-r--r--. 1 sbhavsar sbhavsar 3074125824 Jul 22 15:42 cpu2017-1.1.8.iso
-rw-r--r--. 1 sbhavsar sbhavsar   28978721 Jul 22 15:42 l_onemklbench_p_2023.2.0_49340.tgz
drwxr-xr-x. 1 sbhavsar sbhavsar         68 Jul 22 14:48 passmark_new
-rw-r--r--. 1 sbhavsar sbhavsar    2581890 Jul 22 15:42 pt_linux_arm64.zip
-rw-r--r--. 1 sbhavsar sbhavsar    2329820 Jul 22 15:42 pt_linux_x64.zip
-rw-r--r--. 1 sbhavsar sbhavsar   15292928 Jul 22 15:42 xlinpack_xeon64-NEW


sbhavsar@sbhavsar-thinkpadp16vgen1:~/zathras$ sudo bash bin/install.sh
For most use cases, running this script as root is NOT recommended. Are you sure? Y/N Y
You answered yes, continuing install as root.
ansible-core is installed.
git is installed.
jq is installed.
Installing python...
Updating and loading repositories:
Repositories loaded.
Package "python-unversioned-command-3.14.2-1.fc43.noarch" is already installed.

Nothing to do.
python3-pip is installed.
terraform is installed.
unzip is installed.
Installing wget...
Updating and loading repositories:
Repositories loaded.
Package "wget2-wget-2.2.0-6.fc43.x86_64" is already installed.

Nothing to do.
Requirement already satisfied: boto in /usr/lib/python3.14/site-packages (2.49.0)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
Requirement already satisfied: boto3 in /usr/lib/python3.14/site-packages (1.42.19)
Requirement already satisfied: botocore<1.43.0,>=1.42.19 in /usr/lib/python3.14/site-packages (from boto3) (1.42.19)
Requirement already satisfied: jmespath<2.0.0,>=0.7.1 in /usr/lib/python3.14/site-packages (from boto3) (1.0.1)
Requirement already satisfied: s3transfer<0.17.0,>=0.16.0 in /usr/lib/python3.14/site-packages (from boto3) (0.16.0)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in /usr/lib/python3.14/site-packages (from botocore<1.43.0,>=1.42.19->boto3) (2.9.0.post0)
Requirement already satisfied: urllib3!=2.2.0,<3,>=1.25.4 in /usr/lib/python3.14/site-packages (from botocore<1.43.0,>=1.42.19->boto3) (2.6.2)
Requirement already satisfied: six>=1.5 in /usr/lib/python3.14/site-packages (from python-dateutil<3.0.0,>=2.1->botocore<1.43.0,>=1.42.19->boto3) (1.17.0)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
Requirement already satisfied: yq==2.10.0 in /root/.local/lib/python3.14/site-packages (2.10.0)
Requirement already satisfied: setuptools in /usr/lib/python3.14/site-packages (from yq==2.10.0) (78.1.1)
Requirement already satisfied: PyYAML>=3.11 in /usr/lib64/python3.14/site-packages (from yq==2.10.0) (6.0.2)
Requirement already satisfied: xmltodict>=0.11.0 in /root/.local/lib/python3.14/site-packages (from yq==2.10.0) (1.0.2)
Requirement already satisfied: argcomplete>=1.8.1 in /usr/lib/python3.14/site-packages (from yq==2.10.0) (3.6.3)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
Starting galaxy collection install process
Nothing to do. All requested collections are already installed. If you want to reinstall them, consider using `--force`.
Starting galaxy collection install process
Nothing to do. All requested collections are already installed. If you want to reinstall them, consider using `--force`.
Starting galaxy collection install process
Nothing to do. All requested collections are already installed. If you want to reinstall them, consider using `--force`.
Starting galaxy collection install process
Nothing to do. All requested collections are already installed. If you want to reinstall them, consider using `--force`.
Installation record saved to: zathras_install_20260112_154653.log

Validating kit directories...

======================================================================
WARNING: Missing Kit Directories
======================================================================

The following kit files/directories specified in templates do not exist:

  - hammerdb_template.yml: /home/exports/hammerdb-tpcc.tar
  - specjbb_template.yml: /home/exports/SPECjbb2005_kitv1.07.tar.gz

These kits are required for certain benchmarks to run properly.
Wrappers depending on these kits may fail until they are provided.

Please ensure the required kits are placed at the specified locations
or update the template files in /home/sbhavsar/zathras/config to reflect the correct paths.
======================================================================

Before you can run Zathras:
****Ensure ~/.local/bin is in your path
****Set up a scenario file
****If running a local system, create the local config file for the system under test (SUT)
****If using an existing system, ssh-copy-id between the system Zathras is installed on and the SUT.
****If working in a cloud environment do not perform the ssh-copy-id.
****Update/create the test configuration files in /zathras/config/ to reflect your requirements.

Copy link
Contributor

@dvalinrh dvalinrh left a comment

Choose a reason for hiding this comment

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

Is there a reason this is done with embedded python instead of simply using bash?
I do not want to go this way unless, required as it adds complication.

@sayalibhavsar
Copy link
Contributor Author

Changing mistaken python bit back to bash and testing

BEFORE:

sbhavsar@sbhavsar-thinkpadp16vgen1:~/zathras$ bash bin/install.sh 
Not running as root, proceed.
ansible-core is installed.
git is installed.
jq is installed.
Installing python...
Updating and loading repositories:
Repositories loaded.
Package "python-unversioned-command-3.14.2-1.fc43.noarch" is already installed.

Nothing to do.
python3-pip is installed.
terraform is installed.
unzip is installed.
Installing wget...
Updating and loading repositories:
Repositories loaded.
Package "wget2-wget-2.2.1-1.fc43.x86_64" is already installed.

Nothing to do.
Requirement already satisfied: boto in /home/sbhavsar/.local/lib/python3.9/site-packages (2.49.0)

[notice] A new release of pip is available: 23.0.1 -> 26.0
[notice] To update, run: pip install --upgrade pip
Requirement already satisfied: boto3 in /home/sbhavsar/.local/lib/python3.9/site-packages (1.42.15)
Requirement already satisfied: jmespath<2.0.0,>=0.7.1 in /home/sbhavsar/.local/lib/python3.9/site-packages (from boto3) (1.0.1)
Requirement already satisfied: botocore<1.43.0,>=1.42.15 in /home/sbhavsar/.local/lib/python3.9/site-packages (from boto3) (1.42.15)
Requirement already satisfied: s3transfer<0.17.0,>=0.16.0 in /home/sbhavsar/.local/lib/python3.9/site-packages (from boto3) (0.16.0)
Requirement already satisfied: urllib3<1.27,>=1.25.4 in /home/sbhavsar/.local/lib/python3.9/site-packages (from botocore<1.43.0,>=1.42.15->boto3) (1.26.20)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in /home/sbhavsar/.pyenv/versions/3.9.23/lib/python3.9/site-packages (from botocore<1.43.0,>=1.42.15->boto3) (2.8.2)
Requirement already satisfied: six>=1.5 in /home/sbhavsar/.pyenv/versions/3.9.23/lib/python3.9/site-packages (from python-dateutil<3.0.0,>=2.1->botocore<1.43.0,>=1.42.15->boto3) (1.17.0)

[notice] A new release of pip is available: 23.0.1 -> 26.0
[notice] To update, run: pip install --upgrade pip
Requirement already satisfied: yq==2.10.0 in /home/sbhavsar/.local/lib/python3.9/site-packages (2.10.0)
Requirement already satisfied: PyYAML>=3.11 in /home/sbhavsar/.pyenv/versions/3.9.23/lib/python3.9/site-packages (from yq==2.10.0) (6.0.2)
Requirement already satisfied: xmltodict>=0.11.0 in /home/sbhavsar/.local/lib/python3.9/site-packages (from yq==2.10.0) (1.0.2)
Requirement already satisfied: setuptools in /home/sbhavsar/.pyenv/versions/3.9.23/lib/python3.9/site-packages (from yq==2.10.0) (58.1.0)
Requirement already satisfied: argcomplete>=1.8.1 in /home/sbhavsar/.local/lib/python3.9/site-packages (from yq==2.10.0) (3.6.3)

[notice] A new release of pip is available: 23.0.1 -> 26.0
[notice] To update, run: pip install --upgrade pip
Starting galaxy collection install process
Nothing to do. All requested collections are already installed. If you want to reinstall them, consider using `--force`.
Starting galaxy collection install process
Nothing to do. All requested collections are already installed. If you want to reinstall them, consider using `--force`.
Starting galaxy collection install process
Nothing to do. All requested collections are already installed. If you want to reinstall them, consider using `--force`.
Starting galaxy collection install process
Nothing to do. All requested collections are already installed. If you want to reinstall them, consider using `--force`.
Installation record saved to: zathras_install_20260203_175133.log

Validating kit directories...

======================================================================
WARNING: Missing Kit Directories
======================================================================

The following kit files/directories specified in templates do not exist:

  - hammerdb_template.yml: /home/exports/hammerdb-tpcc.tar
  - specjbb_template.yml: /home/exports/SPECjbb2005_kitv1.07.tar.gz

These kits are required for certain benchmarks to run properly.
Wrappers depending on these kits may fail until they are provided.

Please ensure the required kits are placed at the specified locations
or update the template files in /home/sbhavsar/zathras/config to reflect the correct paths.
======================================================================

Before you can run Zathras:
****Ensure ~/.local/bin is in your path
****Set up a scenario file
****If running a local system, create the local config file for the system under test (SUT)
****If using an existing system, ssh-copy-id between the system Zathras is installed on and the SUT.
****If working in a cloud environment do not perform the ssh-copy-id.
****Update/create the test configuration files in /zathras/config/ to reflect your requirements.

AFTER:

sbhavsar@sbhavsar-thinkpadp16vgen1:~/zathras$ sudo touch /home/exports/hammerdb-tpcc.tar  
sbhavsar@sbhavsar-thinkpadp16vgen1:~/zathras$ bash bin/install.sh 
Not running as root, proceed.
ansible-core is installed.
git is installed.
jq is installed.
Installing python...
Updating and loading repositories:
Repositories loaded.
Package "python-unversioned-command-3.14.2-1.fc43.noarch" is already installed.

Nothing to do.
python3-pip is installed.
terraform is installed.
unzip is installed.
Installing wget...
Updating and loading repositories:
Repositories loaded.
Package "wget2-wget-2.2.1-1.fc43.x86_64" is already installed.

Nothing to do.
Requirement already satisfied: boto in /home/sbhavsar/.local/lib/python3.9/site-packages (2.49.0)

[notice] A new release of pip is available: 23.0.1 -> 26.0
[notice] To update, run: pip install --upgrade pip
Requirement already satisfied: boto3 in /home/sbhavsar/.local/lib/python3.9/site-packages (1.42.15)
Requirement already satisfied: botocore<1.43.0,>=1.42.15 in /home/sbhavsar/.local/lib/python3.9/site-packages (from boto3) (1.42.15)
Requirement already satisfied: jmespath<2.0.0,>=0.7.1 in /home/sbhavsar/.local/lib/python3.9/site-packages (from boto3) (1.0.1)
Requirement already satisfied: s3transfer<0.17.0,>=0.16.0 in /home/sbhavsar/.local/lib/python3.9/site-packages (from boto3) (0.16.0)
Requirement already satisfied: urllib3<1.27,>=1.25.4 in /home/sbhavsar/.local/lib/python3.9/site-packages (from botocore<1.43.0,>=1.42.15->boto3) (1.26.20)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in /home/sbhavsar/.pyenv/versions/3.9.23/lib/python3.9/site-packages (from botocore<1.43.0,>=1.42.15->boto3) (2.8.2)
Requirement already satisfied: six>=1.5 in /home/sbhavsar/.pyenv/versions/3.9.23/lib/python3.9/site-packages (from python-dateutil<3.0.0,>=2.1->botocore<1.43.0,>=1.42.15->boto3) (1.17.0)

[notice] A new release of pip is available: 23.0.1 -> 26.0
[notice] To update, run: pip install --upgrade pip
Requirement already satisfied: yq==2.10.0 in /home/sbhavsar/.local/lib/python3.9/site-packages (2.10.0)
Requirement already satisfied: PyYAML>=3.11 in /home/sbhavsar/.pyenv/versions/3.9.23/lib/python3.9/site-packages (from yq==2.10.0) (6.0.2)
Requirement already satisfied: setuptools in /home/sbhavsar/.pyenv/versions/3.9.23/lib/python3.9/site-packages (from yq==2.10.0) (58.1.0)
Requirement already satisfied: xmltodict>=0.11.0 in /home/sbhavsar/.local/lib/python3.9/site-packages (from yq==2.10.0) (1.0.2)
Requirement already satisfied: argcomplete>=1.8.1 in /home/sbhavsar/.local/lib/python3.9/site-packages (from yq==2.10.0) (3.6.3)

[notice] A new release of pip is available: 23.0.1 -> 26.0
[notice] To update, run: pip install --upgrade pip
Starting galaxy collection install process
Nothing to do. All requested collections are already installed. If you want to reinstall them, consider using `--force`.
Starting galaxy collection install process
Nothing to do. All requested collections are already installed. If you want to reinstall them, consider using `--force`.
Starting galaxy collection install process
Nothing to do. All requested collections are already installed. If you want to reinstall them, consider using `--force`.
Starting galaxy collection install process
Nothing to do. All requested collections are already installed. If you want to reinstall them, consider using `--force`.
Installation record saved to: zathras_install_20260203_175214.log

Validating kit directories...

======================================================================
WARNING: Missing Kit Directories
======================================================================

The following kit files/directories specified in templates do not exist:

  - specjbb_template.yml: /home/exports/SPECjbb2005_kitv1.07.tar.gz

These kits are required for certain benchmarks to run properly.
Wrappers depending on these kits may fail until they are provided.

Please ensure the required kits are placed at the specified locations
or update the template files in /home/sbhavsar/zathras/config to reflect the correct paths.
======================================================================

Before you can run Zathras:
****Ensure ~/.local/bin is in your path
****Set up a scenario file
****If running a local system, create the local config file for the system under test (SUT)
****If using an existing system, ssh-copy-id between the system Zathras is installed on and the SUT.
****If working in a cloud environment do not perform the ssh-copy-id.
****Update/create the test configuration files in /zathras/config/ to reflect your requirements.

Copy link
Contributor

@grdumas grdumas left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@dvalinrh dvalinrh left a comment

Choose a reason for hiding this comment

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

LGTM

@sayalibhavsar sayalibhavsar added group_review_lgtm Indicates approval after a group review meeting and removed group_review_lgtm Indicates approval after a group review meeting labels Feb 17, 2026
@sayalibhavsar sayalibhavsar deleted the gh-323 branch February 24, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

group_review_lgtm Indicates approval after a group review meeting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

zathras should warn if /home/uploads directory is missing

3 participants