-
Notifications
You must be signed in to change notification settings - Fork 32
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
Validation of system dependencies is added to the Allocation module #5336
Merged
teddytpc1
merged 10 commits into
4495-dtt1-release
from
bug/5295-dtt1-allocator-module-the-allocation-fails-if-the-sshpass-utility-is-not-installed
May 3, 2024
Merged
Validation of system dependencies is added to the Allocation module #5336
teddytpc1
merged 10 commits into
4495-dtt1-release
from
bug/5295-dtt1-allocator-module-the-allocation-fails-if-the-sshpass-utility-is-not-installed
May 3, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…g/5295-dtt1-allocator-module-the-allocation-fails-if-the-sshpass-utility-is-not-installed
3 tasks
rauldpm
requested changes
May 3, 2024
New tests after PR review:vagrant@ubuntu-jammy:~/wazuh-qa$ python3 deployability/modules/allocation/main.py --provider vagrant --size small --composite-name linux-ubuntu-22.04-amd64
[2024-05-03 18:06:01] [DEBUG] SPNEGO._GSS: Python gssapi not available, cannot use any GSSAPIProxy protocols: No module named 'gssapi'
[2024-05-03 18:06:01] [DEBUG] SPNEGO._GSS: Python gssapi IOV extension not available: No module named 'gssapi'
[2024-05-03 18:06:01] [INFO] ALLOCATOR: Creating instance at /tmp/wazuh-qa
Traceback (most recent call last):
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/main.py", line 39, in <module>
main()
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/main.py", line 35, in main
Allocator.run(InputPayload(**vars(parse_arguments())))
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/allocation.py", line 37, in run
return cls.__create(payload)
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/allocation.py", line 56, in __create
instance = provider.create_instance(
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/generic/provider.py", line 70, in create_instance
return cls._create_instance(base_dir, params, config, ssh_key)
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/vagrant/provider.py", line 48, in _create_instance
cls.validate_dependencies(params.composite_name)
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/vagrant/provider.py", line 445, in validate_dependencies
raise ValueError(f"Missing package: {missing_dependecy}")
ValueError: Missing package: virtualbox
vagrant@ubuntu-jammy:~/wazuh-qa$ python3 deployability/modules/allocation/main.py --provider vagrant --size small --composite-name linux-ubuntu-22.04-amd64
[2024-05-03 18:06:41] [DEBUG] SPNEGO._GSS: Python gssapi not available, cannot use any GSSAPIProxy protocols: No module named 'gssapi'
[2024-05-03 18:06:41] [DEBUG] SPNEGO._GSS: Python gssapi IOV extension not available: No module named 'gssapi'
[2024-05-03 18:06:41] [INFO] ALLOCATOR: Creating instance at /tmp/wazuh-qa
Traceback (most recent call last):
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/main.py", line 39, in <module>
main()
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/main.py", line 35, in main
Allocator.run(InputPayload(**vars(parse_arguments())))
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/allocation.py", line 37, in run
return cls.__create(payload)
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/allocation.py", line 56, in __create
instance = provider.create_instance(
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/generic/provider.py", line 70, in create_instance
return cls._create_instance(base_dir, params, config, ssh_key)
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/vagrant/provider.py", line 48, in _create_instance
cls.validate_dependencies(params.composite_name)
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/vagrant/provider.py", line 445, in validate_dependencies
raise ValueError(f"Missing package: {missing_dependecy}")
ValueError: Missing package: vagrant
vagrant@ubuntu-jammy:~/wazuh-qa$ python3 deployability/modules/allocation/main.py --provider vagrant --size small --composite-name macos-sonoma-14.0-arm64
[2024-05-03 18:07:07] [DEBUG] SPNEGO._GSS: Python gssapi not available, cannot use any GSSAPIProxy protocols: No module named 'gssapi'
[2024-05-03 18:07:07] [DEBUG] SPNEGO._GSS: Python gssapi IOV extension not available: No module named 'gssapi'
[2024-05-03 18:07:07] [INFO] ALLOCATOR: Creating instance at /tmp/wazuh-qa
Traceback (most recent call last):
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/main.py", line 39, in <module>
main()
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/main.py", line 35, in main
Allocator.run(InputPayload(**vars(parse_arguments())))
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/allocation.py", line 37, in run
return cls.__create(payload)
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/allocation.py", line 56, in __create
instance = provider.create_instance(
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/generic/provider.py", line 70, in create_instance
return cls._create_instance(base_dir, params, config, ssh_key)
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/vagrant/provider.py", line 48, in _create_instance
cls.validate_dependencies(params.composite_name)
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/vagrant/provider.py", line 445, in validate_dependencies
raise ValueError(f"Missing package: {missing_dependecy}")
ValueError: Missing package: sshpass
vagrant@ubuntu-jammy:~/wazuh-qa$ python3 deployability/modules/allocation/main.py --provider vagrant --size small --composite-name macos-sonoma-14.0-arm64
[2024-05-03 18:17:22] [DEBUG] SPNEGO._GSS: Python gssapi not available, cannot use any GSSAPIProxy protocols: No module named 'gssapi'
[2024-05-03 18:17:22] [DEBUG] SPNEGO._GSS: Python gssapi IOV extension not available: No module named 'gssapi'
[2024-05-03 18:17:22] [INFO] ALLOCATOR: Creating instance at /tmp/wazuh-qa
Traceback (most recent call last):
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/main.py", line 39, in <module>
main()
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/main.py", line 35, in main
Allocator.run(InputPayload(**vars(parse_arguments())))
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/allocation.py", line 37, in run
return cls.__create(payload)
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/allocation.py", line 56, in __create
instance = provider.create_instance(
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/generic/provider.py", line 70, in create_instance
return cls._create_instance(base_dir, params, config, ssh_key)
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/vagrant/provider.py", line 48, in _create_instance
cls.validate_dependencies(params.composite_name)
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/vagrant/provider.py", line 445, in validate_dependencies
raise ValueError(f"Missing package: {missing_dependecy}")
ValueError: Missing package: awscli |
Improved missing dependencies messagevagrant@ubuntu-jammy:~/wazuh-qa$ python3 deployability/modules/allocation/main.py --provider vagrant --size small --composite-name linux-ubuntu-22.04-amd64
[2024-05-03 18:41:19] [DEBUG] SPNEGO._GSS: Python gssapi not available, cannot use any GSSAPIProxy protocols: No module named 'gssapi'
[2024-05-03 18:41:19] [DEBUG] SPNEGO._GSS: Python gssapi IOV extension not available: No module named 'gssapi'
[2024-05-03 18:41:19] [INFO] ALLOCATOR: Creating instance at /tmp/wazuh-qa
Traceback (most recent call last):
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/main.py", line 39, in <module>
main()
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/main.py", line 35, in main
Allocator.run(InputPayload(**vars(parse_arguments())))
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/allocation.py", line 37, in run
return cls.__create(payload)
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/allocation.py", line 56, in __create
instance = provider.create_instance(
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/generic/provider.py", line 70, in create_instance
return cls._create_instance(base_dir, params, config, ssh_key)
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/vagrant/provider.py", line 48, in _create_instance
cls.validate_dependencies(params.composite_name)
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/vagrant/provider.py", line 449, in validate_dependencies
raise ValueError(f"Missing dependencies: {missing_dependencies}")
ValueError: Missing dependencies: ['vagrant', 'virtualbox']
vagrant@ubuntu-jammy:~/wazuh-qa$ python3 deployability/modules/allocation/main.py --provider vagrant --size small --composite-name macos-sonoma-14.0-arm64
[2024-05-03 18:41:37] [DEBUG] SPNEGO._GSS: Python gssapi not available, cannot use any GSSAPIProxy protocols: No module named 'gssapi'
[2024-05-03 18:41:37] [DEBUG] SPNEGO._GSS: Python gssapi IOV extension not available: No module named 'gssapi'
[2024-05-03 18:41:37] [INFO] ALLOCATOR: Creating instance at /tmp/wazuh-qa
Traceback (most recent call last):
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/main.py", line 39, in <module>
main()
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/main.py", line 35, in main
Allocator.run(InputPayload(**vars(parse_arguments())))
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/allocation.py", line 37, in run
return cls.__create(payload)
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/allocation.py", line 56, in __create
instance = provider.create_instance(
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/generic/provider.py", line 70, in create_instance
return cls._create_instance(base_dir, params, config, ssh_key)
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/vagrant/provider.py", line 48, in _create_instance
cls.validate_dependencies(params.composite_name)
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/vagrant/provider.py", line 449, in validate_dependencies
raise ValueError(f"Missing dependencies: {missing_dependencies}")
ValueError: Missing dependencies: ['sshpass', 'awscli']
vagrant@ubuntu-jammy:~/wazuh-qa$ python3 deployability/modules/allocation/main.py --provider vagrant --size small --composite-name macos-sonoma-14.0-arm64
[2024-05-03 18:42:13] [DEBUG] SPNEGO._GSS: Python gssapi not available, cannot use any GSSAPIProxy protocols: No module named 'gssapi'
[2024-05-03 18:42:13] [DEBUG] SPNEGO._GSS: Python gssapi IOV extension not available: No module named 'gssapi'
[2024-05-03 18:42:13] [INFO] ALLOCATOR: Creating instance at /tmp/wazuh-qa
Traceback (most recent call last):
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/main.py", line 39, in <module>
main()
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/main.py", line 35, in main
Allocator.run(InputPayload(**vars(parse_arguments())))
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/allocation.py", line 37, in run
return cls.__create(payload)
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/allocation.py", line 56, in __create
instance = provider.create_instance(
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/generic/provider.py", line 70, in create_instance
return cls._create_instance(base_dir, params, config, ssh_key)
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/vagrant/provider.py", line 48, in _create_instance
cls.validate_dependencies(params.composite_name)
File "/home/vagrant/wazuh-qa/deployability/modules/allocation/vagrant/provider.py", line 447, in validate_dependencies
raise ValueError(f"Missing dependency: {missing_dependencies[0]}")
ValueError: Missing dependency: awscli |
teddytpc1
approved these changes
May 3, 2024
rauldpm
approved these changes
May 3, 2024
teddytpc1
deleted the
bug/5295-dtt1-allocator-module-the-allocation-fails-if-the-sshpass-utility-is-not-installed
branch
May 3, 2024 19:02
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Close #5295
Validation of system dependencies is added for the correct functioning of the Allocation module. With this we validate that the packages that are necessary for operation are installed prior to attempting to create the VMs. With this, errors were discovered when trying to run the module on a Centos 7, here the error was in the python dependencies.
Test Ubuntu 22.04