-
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
DTT1 - Iteration 3 - Allocator - Validations and error handling #4901
Closed
3 tasks done
Tracked by
#4855
Labels
Comments
19 tasks
Moved from QA to DevOps |
Update reportChanged exit(1) to raisecbordon@cbordon-MS-7C88:~/Documents/wazuh/repositorios/wazuh-qa$ python3 deployability/modules/allocation/main.py --composite-name macos-mojave-10.14.3-amd64 --provider vagrant --size medium --ssh-key ~/.ssh/allocation_test[2024-03-21 12:03:08] [INFO] ALLOCATOR: Creating instance at /tmp/wazuh-qa
[2024-03-21 12:03:08] [DEBUG] ALLOCATOR: Creating instance directory on remote host
Traceback (most recent call last):
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/vagrant/provider.py", line 309, in __macos_host
tn = Telnet(server_ip, server_port, timeout)
File "/usr/lib/python3.10/telnetlib.py", line 218, in __init__
self.open(host, port, timeout)
File "/usr/lib/python3.10/telnetlib.py", line 235, in open
self.sock = socket.create_connection((host, port), timeout)
File "/usr/lib/python3.10/socket.py", line 845, in create_connection
raise err
File "/usr/lib/python3.10/socket.py", line 833, in create_connection
sock.connect(sa)
TimeoutError: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/main.py", line 34, in <module>
main()
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/main.py", line 30, in main
Allocator.run(InputPayload(**vars(parse_arguments())))
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/allocation.py", line 31, in run
return cls.__create(payload)
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/allocation.py", line 50, in __create
instance = provider.create_instance(
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/generic/provider.py", line 66, in create_instance
return cls._create_instance(base_dir, params, config, ssh_key)
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/vagrant/provider.py", line 60, in _create_instance
macos_host_parameters = cls.__macos_host(arch, 'create')
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/vagrant/provider.py", line 313, in __macos_host
raise ValueError('Could not connect to macOS Black mini server: ' + str(e) + '.')
ValueError: Could not connect to macOS Black mini server: timed out. cbordon@cbordon-MS-7C88:~/Documents/wazuh/repositorios/wazuh-qa$ python3 deployability/modules/allocation/main.py --composite-name linux-centos-9-amd64 --provider aws --size medium --label-team devops --label-termination-date "2024-03-20 21:00:00" --ssh-key ~/.ssh/allocation_test
[2024-03-21 12:29:43] [INFO] ALLOCATOR: Creating instance at /tmp/wazuh-qa
[2024-03-21 12:29:43] [DEBUG] ALLOCATOR: No config provided. Generating from payload
Traceback (most recent call last):
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/main.py", line 34, in <module>
main()
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/main.py", line 30, in main
Allocator.run(InputPayload(**vars(parse_arguments())))
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/allocation.py", line 31, in run
return cls.__create(payload)
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/allocation.py", line 50, in __create
instance = provider.create_instance(
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/generic/provider.py", line 66, in create_instance
return cls._create_instance(base_dir, params, config, ssh_key)
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/aws/provider.py", line 71, in _create_instance
raise ValueError(f"The issue label was not provided or is of incorrect format, example: https://github.com/wazuh/<repository>/issues/<issue-number>.")
ValueError: The issue label was not provided or is of incorrect format, example: https://github.com/wazuh/<repository>/issues/<issue-number>. |
Update reportImproving the error message when selecting an unavailable machinecbordon@cbordon-MS-7C88:~/Documents/wazuh/repositorios/wazuh-qa$ python3 deployability/modules/allocation/main.py --composite-name linux-centos-11-amd64 --provider vagrant --size medium --ssh-key ~/.ssh/allocation_test
[2024-03-21 13:03:33] [INFO] ALLOCATOR: Creating instance at /tmp/wazuh-qa
[2024-03-21 13:03:33] [DEBUG] ALLOCATOR: No config provided. Generating from payload
[2024-03-21 13:03:33] [DEBUG] ALLOCATOR: Using provided key pair
Traceback (most recent call last):
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/main.py", line 34, in <module>
main()
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/main.py", line 30, in main
Allocator.run(InputPayload(**vars(parse_arguments())))
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/allocation.py", line 31, in run
return cls.__create(payload)
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/allocation.py", line 50, in __create
instance = provider.create_instance(
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/generic/provider.py", line 66, in create_instance
return cls._create_instance(base_dir, params, config, ssh_key)
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/vagrant/provider.py", line 75, in _create_instance
config = cls.__parse_config(params, credentials, instance_id, instance_dir, macos_host_parameters)
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/vagrant/provider.py", line 199, in __parse_config
os_specs = cls._get_os_specs(params.composite_name)
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/generic/provider.py", line 174, in _get_os_specs
raise ValueError(f"OS {composite_name} not available for provider {cls.provider_name}. Available versions are {version_available}")
ValueError: OS linux-centos-11-amd64 not available for provider vagrant. Available versions are ['linux-centos-7-amd64', 'linux-centos-8-amd64', 'linux-centos-9-amd64'] |
Removing issue label as mandatory and improving ssh key namingWithout issue label and instance name parameterscbordon@cbordon-MS-7C88:~/Documents/wazuh/repositorios/wazuh-qa$ python3 deployability/modules/allocation/main.py --composite-name linux-centos-9-amd64 --provider aws --size medium --label-team devops --label-termination-date "2024-03-20 21:00:00"
[2024-03-21 14:25:23] [INFO] ALLOCATOR: Creating instance at /tmp/wazuh-qa
[2024-03-21 14:25:23] [DEBUG] ALLOCATOR: No config provided. Generating from payload
[2024-03-21 14:25:23] [DEBUG] ALLOCATOR: Generating new key pair
[2024-03-21 14:25:23] [DEBUG] ALLOCATOR: Creating base directory: /tmp/wazuh-qa/AWS-7C87BFDA-0F1E-4DE5-B36B-48A5C870BA4D
[2024-03-21 14:25:42] [DEBUG] ALLOCATOR: Renaming temp /tmp/wazuh-qa/AWS-7C87BFDA-0F1E-4DE5-B36B-48A5C870BA4D directory to /tmp/wazuh-qa/i-0211c582a2b1e6065
[2024-03-21 14:25:42] [INFO] ALLOCATOR: Instance i-0211c582a2b1e6065 created.
[2024-03-21 14:25:44] [INFO] ALLOCATOR: Instance i-0211c582a2b1e6065 started.
[2024-03-21 14:25:44] [INFO] ALLOCATOR: Inventory file generated at /tmp/wazuh-qa/i-0211c582a2b1e6065/inventory.yml
[2024-03-21 14:25:44] [INFO] ALLOCATOR: Track file generated at /tmp/wazuh-qa/i-0211c582a2b1e6065/track.yml
cbordon@cbordon-MS-7C88:~/Documents/wazuh/repositorios/wazuh-qa$ cat /tmp/wazuh-qa/i-0211c582a2b1e6065/inventory.yml
ansible_host: ec2-54-167-197-126.compute-1.amazonaws.com
ansible_password: None
ansible_port: 2200
ansible_ssh_private_key_file: /tmp/wazuh-qa/i-0211c582a2b1e6065/centos-9-amd64-key-4481
ansible_user: ec2-user
cbordon@cbordon-MS-7C88:~/Documents/wazuh/repositorios/wazuh-qa$ ssh -i /tmp/wazuh-qa/i-0211c582a2b1e6065/centos-9-amd64-key-4481 -p 2200 [email protected]
The authenticity of host '[ec2-54-167-197-126.compute-1.amazonaws.com]:2200 ([54.167.197.126]:2200)' can't be established.
ED25519 key fingerprint is SHA256:4f/foos1eZ8uhaS0rE+IlvfQ7OaDK5krfkFQfNB75i4.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '[ec2-54-167-197-126.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
[ec2-user@ip-172-31-87-124 ~]$ exit
logout
Connection to ec2-54-167-197-126.compute-1.amazonaws.com closed.
cbordon@cbordon-MS-7C88:~/Documents/wazuh/repositorios/wazuh-qa$ python3 deployability/modules/allocation/main.py --provider aws --action delete --track-output /tmp/wazuh-qa/i-0211c582a2b1e6065/track.yml
[2024-03-21 14:28:45] [INFO] ALLOCATOR: Deleting instance from trackfile /tmp/wazuh-qa/i-0211c582a2b1e6065/track.yml
[2024-03-21 14:28:46] [DEBUG] ALLOCATOR: Deleting credentials: centos-9-amd64-key-4481
[2024-03-21 14:30:04] [INFO] ALLOCATOR: Instance i-0211c582a2b1e6065 deleted. With issue label parametercbordon@cbordon-MS-7C88:~/Documents/wazuh/repositorios/wazuh-qa$ python3 deployability/modules/allocation/main.py --composite-name linux-centos-9-amd64 --provider aws --size medium --label-team devops --label-termination-date "2024-03-20 21:00:00" --label-issue https://github.com/wazuh/wazuh-qa/issues/4901
[2024-03-21 14:30:59] [INFO] ALLOCATOR: Creating instance at /tmp/wazuh-qa
[2024-03-21 14:30:59] [DEBUG] ALLOCATOR: No config provided. Generating from payload
[2024-03-21 14:30:59] [DEBUG] ALLOCATOR: Generating new key pair
[2024-03-21 14:30:59] [DEBUG] ALLOCATOR: Creating base directory: /tmp/wazuh-qa/AWS-9A8C8F03-1054-4DD4-8397-4ACCEC3A3485
[2024-03-21 14:31:20] [DEBUG] ALLOCATOR: Renaming temp /tmp/wazuh-qa/AWS-9A8C8F03-1054-4DD4-8397-4ACCEC3A3485 directory to /tmp/wazuh-qa/i-0bc5583bfbb9c65de
[2024-03-21 14:31:20] [INFO] ALLOCATOR: Instance i-0bc5583bfbb9c65de created.
[2024-03-21 14:31:21] [INFO] ALLOCATOR: Instance i-0bc5583bfbb9c65de started.
[2024-03-21 14:31:22] [INFO] ALLOCATOR: Inventory file generated at /tmp/wazuh-qa/i-0bc5583bfbb9c65de/inventory.yml
[2024-03-21 14:31:22] [INFO] ALLOCATOR: Track file generated at /tmp/wazuh-qa/i-0bc5583bfbb9c65de/track.yml
cbordon@cbordon-MS-7C88:~/Documents/wazuh/repositorios/wazuh-qa$ cat /tmp/wazuh-qa/i-0bc5583bfbb9c65de/inventory.yml
ansible_host: ec2-34-228-58-134.compute-1.amazonaws.com
ansible_password: None
ansible_port: 2200
ansible_ssh_private_key_file: /tmp/wazuh-qa/i-0bc5583bfbb9c65de/qa-4901-centos-9-key-9168
ansible_user: ec2-user
cbordon@cbordon-MS-7C88:~/Documents/wazuh/repositorios/wazuh-qa$ ssh -i /tmp/wazuh-qa/i-0bc5583bfbb9c65de/qa-4901-centos-9-key-9168 -p 2200 [email protected]
The authenticity of host '[ec2-34-228-58-134.compute-1.amazonaws.com]:2200 ([34.228.58.134]:2200)' can't be established.
ED25519 key fingerprint is SHA256:5dcXfphz0mUEQr9toRRZ/80BtXW6KiQn/tOWq752qic.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '[ec2-34-228-58-134.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
[ec2-user@ip-172-31-27-4 ~]$ exit
logout
Connection to ec2-34-228-58-134.compute-1.amazonaws.com closed.
cbordon@cbordon-MS-7C88:~/Documents/wazuh/repositorios/wazuh-qa$ python3 deployability/modules/allocation/main.py --provider aws --action delete --track-output /tmp/wazuh-qa/i-0bc5583bfbb9c65de/track.yml
[2024-03-21 14:32:54] [INFO] ALLOCATOR: Deleting instance from trackfile /tmp/wazuh-qa/i-0bc5583bfbb9c65de/track.yml
[2024-03-21 14:32:55] [DEBUG] ALLOCATOR: Deleting credentials: qa-4901-centos-9-key-9168
[2024-03-21 14:34:28] [INFO] ALLOCATOR: Instance i-0bc5583bfbb9c65de deleted. With instance name parametercbordon@cbordon-MS-7C88:~/Documents/wazuh/repositorios/wazuh-qa$ python3 deployability/modules/allocation/main.py --composite-name linux-centos-9-amd64 --provider aws --size medium --label-team devops --label-termination-date "2024-03-20 21:00:00" --instance-name Test_install_99
[2024-03-21 14:34:52] [INFO] ALLOCATOR: Creating instance at /tmp/wazuh-qa
[2024-03-21 14:34:52] [DEBUG] ALLOCATOR: No config provided. Generating from payload
[2024-03-21 14:34:52] [DEBUG] ALLOCATOR: Generating new key pair
[2024-03-21 14:34:52] [DEBUG] ALLOCATOR: Creating base directory: /tmp/wazuh-qa/AWS-5A24D37E-3EDD-47A1-BD86-5ED93818A2A7
[2024-03-21 14:35:12] [DEBUG] ALLOCATOR: Renaming temp /tmp/wazuh-qa/AWS-5A24D37E-3EDD-47A1-BD86-5ED93818A2A7 directory to /tmp/wazuh-qa/i-0c3af8376744d0598
[2024-03-21 14:35:12] [INFO] ALLOCATOR: Instance i-0c3af8376744d0598 created.
[2024-03-21 14:35:13] [INFO] ALLOCATOR: Instance i-0c3af8376744d0598 started.
[2024-03-21 14:35:14] [INFO] ALLOCATOR: Inventory file generated at /tmp/wazuh-qa/i-0c3af8376744d0598/inventory.yml
[2024-03-21 14:35:14] [INFO] ALLOCATOR: Track file generated at /tmp/wazuh-qa/i-0c3af8376744d0598/track.yml
cbordon@cbordon-MS-7C88:~/Documents/wazuh/repositorios/wazuh-qa$ cat /tmp/wazuh-qa/i-0c3af8376744d0598/inventory.yml
ansible_host: ec2-34-228-39-134.compute-1.amazonaws.com
ansible_password: None
ansible_port: 2200
ansible_ssh_private_key_file: /tmp/wazuh-qa/i-0c3af8376744d0598/Test_install_99-key-4881
ansible_user: ec2-user
cbordon@cbordon-MS-7C88:~/Documents/wazuh/repositorios/wazuh-qa$ ssh -i /tmp/wazuh-qa/i-0c3af8376744d0598/Test_install_99-key-4881 -p 2200 [email protected]
The authenticity of host '[ec2-34-228-39-134.compute-1.amazonaws.com]:2200 ([34.228.39.134]:2200)' can't be established.
ED25519 key fingerprint is SHA256:Zt9C8My4nDxPENgLZAQMHDLw9lNYBt1hMMs3+c0ad6s.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '[ec2-34-228-39-134.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
[ec2-user@ip-172-31-24-158 ~]$ exit
logout
Connection to ec2-34-228-39-134.compute-1.amazonaws.com closed.
cbordon@cbordon-MS-7C88:~/Documents/wazuh/repositorios/wazuh-qa$ python3 deployability/modules/allocation/main.py --provider aws --action delete --track-output /tmp/wazuh-qa/i-0c3af8376744d0598/track.yml
[2024-03-21 14:36:19] [INFO] ALLOCATOR: Deleting instance from trackfile /tmp/wazuh-qa/i-0c3af8376744d0598/track.yml
[2024-03-21 14:36:19] [DEBUG] ALLOCATOR: Deleting credentials: Test_install_99-key-4881
[2024-03-21 14:36:52] [INFO] ALLOCATOR: Instance i-0c3af8376744d0598 deleted.
|
Termination date optionsWith 2d has a termination datecbordon@cbordon-MS-7C88:~/Documents/wazuh/repositorios/wazuh-qa$ python3 deployability/modules/allocation/main.py --composite-name linux-centos-9-amd64 --provider aws --size medium --label-team devops --label-termination-date "2d" [2024-03-21 15:02:19] [INFO] ALLOCATOR: Creating instance at /tmp/wazuh-qa
[2024-03-21 15:02:19] [DEBUG] ALLOCATOR: No config provided. Generating from payload
[2024-03-21 15:02:19] [DEBUG] ALLOCATOR: Generating new key pair
[2024-03-21 15:02:19] [DEBUG] ALLOCATOR: Creating base directory: /tmp/wazuh-qa/AWS-A3BF9024-B89B-4B8F-8CF4-45CF6AB440F3
[2024-03-21 15:02:38] [DEBUG] ALLOCATOR: Renaming temp /tmp/wazuh-qa/AWS-A3BF9024-B89B-4B8F-8CF4-45CF6AB440F3 directory to /tmp/wazuh-qa/i-0ebc28a81d8b9e0a8
[2024-03-21 15:02:38] [INFO] ALLOCATOR: Instance i-0ebc28a81d8b9e0a8 created.
[2024-03-21 15:02:41] [INFO] ALLOCATOR: Instance i-0ebc28a81d8b9e0a8 started.
[2024-03-21 15:02:41] [INFO] ALLOCATOR: Inventory file generated at /tmp/wazuh-qa/i-0ebc28a81d8b9e0a8/inventory.yml
[2024-03-21 15:02:41] [INFO] ALLOCATOR: Track file generated at /tmp/wazuh-qa/i-0ebc28a81d8b9e0a8/track.yml
cbordon@cbordon-MS-7C88:~/Documents/wazuh/repositorios/wazuh-qa$ python3 deployability/modules/allocation/main.py --provider aws --action delete --track-output /tmp/wazuh-qa/i-0ebc28a81d8b9e0a8/track.yml
[2024-03-21 15:06:28] [INFO] ALLOCATOR: Deleting instance from trackfile /tmp/wazuh-qa/i-0ebc28a81d8b9e0a8/track.yml
[2024-03-21 15:06:29] [DEBUG] ALLOCATOR: Deleting credentials: centos-9-amd64-key-6607
[2024-03-21 15:07:48] [INFO] ALLOCATOR: Instance i-0ebc28a81d8b9e0a8 deleted. With valid termination date formatcbordon@cbordon-MS-7C88:~/Documents/wazuh/repositorios/wazuh-qa$ python3 deployability/modules/allocation/main.py --composite-name linux-centos-9-amd64 --provider aws --size medium --label-team devops --label-termination-date "2024-03-25 21:00:00"
[2024-03-21 15:08:16] [INFO] ALLOCATOR: Creating instance at /tmp/wazuh-qa
[2024-03-21 15:08:16] [DEBUG] ALLOCATOR: No config provided. Generating from payload
[2024-03-21 15:08:16] [DEBUG] ALLOCATOR: Generating new key pair
[2024-03-21 15:08:16] [DEBUG] ALLOCATOR: Creating base directory: /tmp/wazuh-qa/AWS-9A0FF5B8-940F-45F1-87EA-EF2C6670F088
[2024-03-21 15:08:36] [DEBUG] ALLOCATOR: Renaming temp /tmp/wazuh-qa/AWS-9A0FF5B8-940F-45F1-87EA-EF2C6670F088 directory to /tmp/wazuh-qa/i-0dec3f36e3235ed9b
[2024-03-21 15:08:36] [INFO] ALLOCATOR: Instance i-0dec3f36e3235ed9b created.
[2024-03-21 15:08:38] [INFO] ALLOCATOR: Instance i-0dec3f36e3235ed9b started.
[2024-03-21 15:08:38] [INFO] ALLOCATOR: Inventory file generated at /tmp/wazuh-qa/i-0dec3f36e3235ed9b/inventory.yml
[2024-03-21 15:08:38] [INFO] ALLOCATOR: Track file generated at /tmp/wazuh-qa/i-0dec3f36e3235ed9b/track.yml
cbordon@cbordon-MS-7C88:~/Documents/wazuh/repositorios/wazuh-qa$ python3 deployability/modules/allocation/main.py --provider aws --action delete --track-output /tmp/wazuh-qa/i-0dec3f36e3235ed9b/track.yml
[2024-03-21 15:09:09] [INFO] ALLOCATOR: Deleting instance from trackfile /tmp/wazuh-qa/i-0dec3f36e3235ed9b/track.yml
[2024-03-21 15:09:10] [DEBUG] ALLOCATOR: Deleting credentials: centos-9-amd64-key-2145
[2024-03-21 15:09:58] [INFO] ALLOCATOR: Instance i-0dec3f36e3235ed9b deleted. With bad termination date formatscbordon@cbordon-MS-7C88:~/Documents/wazuh/repositorios/wazuh-qa$ python3 deployability/modules/allocation/main.py --composite-name linux-centos-9-amd64 --provider aws --size medium --label-team devops --label-termination-date "2024/03/25 21:00:00"
[2024-03-21 15:10:41] [INFO] ALLOCATOR: Creating instance at /tmp/wazuh-qa
[2024-03-21 15:10:41] [DEBUG] ALLOCATOR: No config provided. Generating from payload
Traceback (most recent call last):
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/main.py", line 34, in <module>
main()
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/main.py", line 30, in main
Allocator.run(InputPayload(**vars(parse_arguments())))
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/allocation.py", line 31, in run
return cls.__create(payload)
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/allocation.py", line 50, in __create
instance = provider.create_instance(
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/generic/provider.py", line 66, in create_instance
return cls._create_instance(base_dir, params, config, ssh_key)
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/aws/provider.py", line 63, in _create_instance
raise ValueError(f"The termination_date label was not provided or is of incorrect format, example: 2021-12-31 23:59:59 or 2d.")
ValueError: The termination_date label was not provided or is of incorrect format, example: 2021-12-31 23:59:59 or 2d. cbordon@cbordon-MS-7C88:~/Documents/wazuh/repositorios/wazuh-qa$ python3 deployability/modules/allocation/main.py --composite-name linux-centos-9-amd64 --provider aws --size medium --label-team devops --label-termination-date "1d 15H"
[2024-03-21 15:19:58] [INFO] ALLOCATOR: Creating instance at /tmp/wazuh-qa
[2024-03-21 15:19:58] [DEBUG] ALLOCATOR: No config provided. Generating from payload
Traceback (most recent call last):
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/main.py", line 34, in <module>
main()
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/main.py", line 30, in main
Allocator.run(InputPayload(**vars(parse_arguments())))
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/allocation.py", line 31, in run
return cls.__create(payload)
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/allocation.py", line 50, in __create
instance = provider.create_instance(
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/generic/provider.py", line 66, in create_instance
return cls._create_instance(base_dir, params, config, ssh_key)
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/aws/provider.py", line 63, in _create_instance
raise ValueError(f"The termination_date label was not provided or is of incorrect format, example: 2021-12-31 23:59:59 or 2d.")
ValueError: The termination_date label was not provided or is of incorrect format, example: 2021-12-31 23:59:59 or 2d. Without termination datecbordon@cbordon-MS-7C88:~/Documents/wazuh/repositorios/wazuh-qa$ python3 deployability/modules/allocation/main.py --composite-name linux-centos-9-amd64 --provider aws --size medium --label-team devops
[2024-03-21 15:24:50] [INFO] ALLOCATOR: Creating instance at /tmp/wazuh-qa
[2024-03-21 15:24:50] [DEBUG] ALLOCATOR: No config provided. Generating from payload
Traceback (most recent call last):
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/main.py", line 34, in <module>
main()
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/main.py", line 30, in main
Allocator.run(InputPayload(**vars(parse_arguments())))
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/allocation.py", line 31, in run
return cls.__create(payload)
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/allocation.py", line 50, in __create
instance = provider.create_instance(
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/generic/provider.py", line 66, in create_instance
return cls._create_instance(base_dir, params, config, ssh_key)
File "/home/cbordon/Documents/wazuh/repositorios/wazuh-qa/deployability/modules/allocation/aws/provider.py", line 58, in _create_instance
raise ValueError(f"The termination_date label was not provided.")
ValueError: The termination_date label was not provided. |
LGTM |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
The objective of this issue is to incorporate error handling and validations necessary for the Allocator module, this includes implementing the logger to log the errors and/or warnings. also having a good error handling strategy
Tasks
The text was updated successfully, but these errors were encountered: