-
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
Fix manager_agent environment #4808
Fix manager_agent environment #4808
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Notes
GJ. Some changes should be done.
agent3_id: "003" | ||
agent3_hostname: "wazuh-agent3" | ||
agent3_key: "3333333333333333333333333333333333333333333333333333333333333333" | ||
agent3_package: "https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_4.2.5-1_amd64.deb" | ||
agent3_package: "https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_{{package_version}}-{{package_revision}}_amd64.deb" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem with this structure is that most of system test are executed using packages from packages-dev.com/pre-elease.
Example:
If ansible is executed using:
ansible-playbook -i inventory.yml playbook.yml --extra-vars='{"package_repository":"packages-dev", "repository": "pre-release", "package_version": "4.8.0", "package_revision": "1"}'
The provision of agent-3 will fail because the package in the URL will not exist:
TASK [roles/agent-role : Create log source] *****************************************************************************************************************************
changed: [wazuh-agent3]
TASK [roles/agent-role : Download package] ******************************************************************************************************************************
fatal: [wazuh-agent3]: FAILED! => changed=false
dest: /tmp/wazuh-agent.deb
elapsed: 0
msg: Request failed
response: 'HTTP Error 404: Not Found'
status_code: 404
url: https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_4.8.0-1_amd64.deb
PLAY RECAP **************************************************************************************************************************************************************
localhost : ok=9 changed=5 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
wazuh-agent1 : ok=12 changed=11 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
wazuh-agent2 : ok=12 changed=11 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
wazuh-agent3 : ok=4 changed=3 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
wazuh-manager : ok=13 changed=12 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 9c8de59
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Notes
LGTM
Description
This PR aims to fix the
manager_agent
environment used in System Tests so that it installs the tested version inagent3
endpoint.Updated
manager_agent/vars/configurations.yml
file to parametrizeagent3
package version.manager_agent/playbook.yml
file to specify each agent user.Testing performed
Create environment 🟢
agent1
file permissions and statusagent2
file permissions and statusagent3
file permissions and statusLaunch tests 🟢