Skip to content
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

QACTL: Improvements for qactl tool implementation #1768

Closed
7 tasks done
fernandolojano opened this issue Aug 25, 2021 · 3 comments
Closed
7 tasks done

QACTL: Improvements for qactl tool implementation #1768

fernandolojano opened this issue Aug 25, 2021 · 3 comments
Assignees

Comments

@fernandolojano
Copy link
Contributor

fernandolojano commented Aug 25, 2021

This issue has been created with the purpose of implement a few of the improvements listed in the issue #1723.

Tasks

The tasks that are going to be realized in this issue are:

  • Install wazuh via S3 packages
  • Modify Schema validator file
  • Edit QACTL documentation adding new possible changes
  • Search documentation about ansible_runner
  • Locate which files aren't being removed after the qactl tool execution and why they remain existent.
  • Clean all possible tmp files created during the qactl tool execution.
  • Rename all QACTL modules, using the snake_case format (in progress)
@fernandolojano
Copy link
Contributor Author

The working branch for this issue is: 1768-qactl-improvements

@fernandolojano
Copy link
Contributor Author

After searching and locating which temporary files are being created and the reason of them remaining after the execution of the qactl tool is over, we can conclude some terms:

  • After several tests, it seems that the whole Deployment section doesn't leave any temp files in the host system.
  • Regarding to the Provisioning section, there are a few points that needs to be solved.
    • The functions for removing the temp files after the execution are implemented, but some of then will only run if the execution of the tool was suceeded, In case that the execution had any possible failure, the temp files won't be deleted.
    • The qactl tool uses the command run from the library ansible_runner. As far as I researched, this command will create a folder in the specified directory passed as an argument. The issue with this command is that it generates a folder with a random name everytime the command is executed. There is no way of knowing the exact name of the generated folder as there isn't a proper path argument return from the execution. I couldn't find a possible implementation for deleting this files.

@fernandolojano
Copy link
Contributor Author

fernandolojano commented Aug 26, 2021

  • As for now, all the QACTL modules are named with the snake_case format.
  • Regarding about the tmp files:
    • It seems like the deployment section doesn't leave any tmp files.
    • The provisioning section however leaves two files, one is a yaml file and the other left tmp archive is a directory containing the given results of the ansible_runner execution everytime this module gets executed. After talking about it, it has been decided that the ansible_runner tmp directory is going to be deleted without any option given for not deleting the directory.
    • The Testing section also leaves the temporary yaml file used during its execution.

For the provisioning and testing sections, it has been implemented a deleting function that will delete all the possible yaml files that are being created during them executions. The functions will run when the --destroy option is given as an additional parameter in the QACTL execution command line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants