-
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 - Bugs - Fix Provision log references #5197
Comments
UpdateAfter some tests I could make the provision log be present [2024-04-10 15:56:14] [DEBUG] [251900] [ThreadPoolExecutor-0_0] [workflow_engine]: Running task "provision-install-linux-ubuntu-18.04-amd64" with arguments: ['modules/provision/main.py', '--inventory=/tmp/dtt1-poc/agent-linux-ubuntu-18.04-amd64/inventory.yaml', "--dependencies={'manager': '/tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml'}", "--install={'component': 'wazuh-agent', 'type': 'package', 'version': '4.7.3', 'live': True}"]
[2024-04-10 15:56:52] [DEBUG] [251900] [ThreadPoolExecutor-0_0] [workflow_engine]: Finished task "provision-install-linux-ubuntu-18.04-amd64" execution with result:
[2024-04-10 15:56:15] [DEBUG] PROVISION: Setting dependencies: {'manager': '192.168.57.2'} for wazuh-agent component.
[2024-04-10 15:56:15] [INFO] PROVISION: Initiating provisionment.
[2024-04-10 15:56:15] [DEBUG] PROVISION: Running action install for components: [ComponentInfo(component='wazuh-agent', type='package', version='4.7.3', dependencies={'manager': '192.168.57.2'}, live=True)]
[2024-04-10 15:56:15] [INFO] PROVISION: Provisioning "wazuh-agent"...
[2024-04-10 15:56:15] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'192.168.57.3': {'ansible_port': 22, 'ansible_user': 'vagrant', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/VAGRANT-92357979-83E8-4D94-8B87-9C32473A6CB8/instance_key'}}}}
[2024-04-10 15:56:15] [DEBUG] ANSIBLE: Running playbook: {'hosts': '192.168.57.3', 'become': True, 'gather_facts': True, 'tasks': [{'name': 'Capture ansible_os_family', 'set_fact': {'ansible_os_family': "{{ ansible_facts['distribution_file_variety'] }}", 'cacheable': 'yes'}}]} However, the behavior is not clear because when the PROVISION log is present, the ALLOCATOR module log is absent. |
UpdateUsing the class Logger from /modules/generic/logger (Here is possible to check the print of logger from provisioning where it is an object with the correct parameters) Allocation and testing works. Further research is required |
UpdateChanging the methods this log could be generated in the log file
in
The |
UpdateMoving to #5210 which has higher priority |
UpdateTests were performed, however, the root of the issue was not found yet. |
UPDATE
RESULTHere's an example of a workflow run after modifying the logger instantiation: workflow.log |
UPDATEI've removed the After those changes, the testing module generates no The log generated by a workflow run is the following: |
We need to implement the same changes made to the modules within the allocation module to ensure that logging continues to work correctly. |
Once the allocation issue has been clarified, the module does not need changes. LGTM |
LGTM |
Description
Related: #5125
We need to investigate and fix or improve the provision module logging from the Workflow engine as logs are not being identified as
PROVISION
but asANSIBLE
The text was updated successfully, but these errors were encountered: