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

QA Testing - Release 4.3.7-RC2 - Behavior of cluster restart procedure in the UI #3192

Closed
5 tasks done
Deblintrake09 opened this issue Aug 22, 2022 · 4 comments
Closed
5 tasks done
Assignees

Comments

@Deblintrake09
Copy link
Contributor

Deblintrake09 commented Aug 22, 2022

Target version Related issue Related PR
4.3.7-rc2 wazuh/wazuh-dashboard-plugins#4277 wazuh/wazuh-dashboard-plugins#4405

Description

Whe need to ensure the correct behavior of the Cluster during restarts generated from the Wazuh Dashboard.

Proposed checks

  • Restart cluster successfully
  • Modify a rules/decoders/list file and restart cluster successfully
  • Restart cluster - changing page during restart causes crash and goes to healthcheck
  • Restart cluster during big files synchronization - No overwrite tag
  • Restart cluster during big files synchronization - Use Overwrite tag

Configuration and considerations

Setup cluster with default configuration.

@jmv74211 jmv74211 added this to the Release 4.3.7 RC-1 milestone Aug 22, 2022
@Deblintrake09 Deblintrake09 changed the title QA Testing - Release 4.3.7-RC2 - Behavior of cluster restart procedure in the UI QA Testing - Release 4.3.7-RC1 - Behavior of cluster restart procedure in the UI Aug 22, 2022
@Deblintrake09
Copy link
Contributor Author

Deblintrake09 commented Aug 22, 2022

Review data

Tester PR commit
@Deblintrake09 Tag v4.3.7-1

Testing environment

OS OS version Deployment Image/AMI Notes
Centos 8 <REMOTE | Deployer - EC2 ami-0e65b7ce2dab78ec9 Box Size c5.xlarge

Tested packages

Status

  • In progress
  • Pending Review
  • Team leader approved
  • Manager approved

Conclusion 🟡

It was found that after the rollback done on the changes, the Wazuh UI App works correctly and restarts the cluster as expected.
During the testing Two un-related issues were found on the app.

Found Errors descriptions

imagen

@Deblintrake09
Copy link
Contributor Author

Deblintrake09 commented Aug 22, 2022

Task Results

Restart cluster successfully 🟢
  • Check cluster is synchronized
# curl -k -X GET "https://localhost:55000/cluster/ruleset/synchronization?pretty=true" -H "Authorization: Bearer $TOKEN"
{
   "data": {
      "affected_items": [
         {
            "name": "master",
            "synced": true
         },
         {
            "name": "worker1",
            "synced": true
         },
         {
            "name": "worker2",
            "synced": true
         }
      ],
      "total_affected_items": 3,
      "total_failed_items": 0,
      "failed_items": []
   },
   "message": "Nodes ruleset synchronization status was successfully read",
   "error": 0
}
  • Restart the cluster from the /management/status page
  • Change to other page during restart
  • Check UI does not crash 🟢

VIDEO EVIDENCE

Restart-cluster.mp4
Modify a rules/decoders/list file and restart cluster successfully 🟢
  • Check cluster is synchronized
# curl -k -X GET "https://localhost:55000/cluster/ruleset/synchronization?pretty=true" -H "Authorization: Bearer $TOKEN"
{
   "data": {
      "affected_items": [
         {
            "name": "master",
            "synced": true
         },
         {
            "name": "worker1",
            "synced": true
         },
         {
            "name": "worker2",
            "synced": true
         }
      ],
      "total_affected_items": 3,
      "total_failed_items": 0,
      "failed_items": []
   },
   "message": "Nodes ruleset synchronization status was successfully read",
   "error": 0
}
  • Modify local_rules.xml file and save changes.
  • Restart the cluster
  • Check UI does not crash 🟢

VIDEO EVIDENCE

Modify-rules-restart.mp4
  • Check cluster is synchronized
# curl -k -X GET "https://localhost:55000/cluster/ruleset/synchronization?pretty=true" -H "Authorization: Bearer $TOKEN"
{
   "data": {
      "affected_items": [
         {
            "name": "master",
            "synced": true
         },
         {
            "name": "worker1",
            "synced": true
         },
         {
            "name": "worker2",
            "synced": true
         }
      ],
      "total_affected_items": 3,
      "total_failed_items": 0,
      "failed_items": []
   },
   "message": "Nodes ruleset synchronization status was successfully read",
   "error": 0
}
Restart cluster - changing page during restart causes crash and goes to healthcheck 🟢
  • Check cluster is synchronized
# curl -k -X GET "https://localhost:55000/cluster/ruleset/synchronization?pretty=true" -H "Authorization: Bearer $TOKEN"
{
   "data": {
      "affected_items": [
         {
            "name": "master",
            "synced": true
         },
         {
            "name": "worker1",
            "synced": true
         },
         {
            "name": "worker2",
            "synced": true
         }
      ],
      "total_affected_items": 3,
      "total_failed_items": 0,
      "failed_items": []
   },
   "message": "Nodes ruleset synchronization status was successfully read",
   "error": 0
}
  • Restart the cluster from the /management/status page
  • Change to other page during restart
  • Check UI does crashes and goes to healthcheck automatticaly 🟢

VIDEO EVIDENCE

restart-cluster-failed.mp4
Restart cluster during big synchronization - No overwrite tag 🔴
  • Check cluster is synchronized
  • Copy test_rules_file.xml 5 times inside etc/rules/ via console script (No overwrite tag).
  • Modify local_rules.xml file and save changes.
  • Restart the cluster
  • Check UI does not crash 🔴

VIDEO EVIDENCE

copy_multiple_rules_files_no_overwrite.mp4
  • Remove the copied rules and refresh to check status
remove_rules_restart.mp4
Restart cluster during big synchronization - Using overwrite tag 🟢
  • Check cluster is synchronized
  • Copy test_rules_file.xml 5 times inside etc/rules/ via console script (using overwrite tag).
  • Modify local_rules.xml file and save changes.
  • Restart the cluster
  • Check UI does not crash 🟢

VIDEO EVIDENCE

copy_multiple_rules_files_with_overwrite.mp4

@jmv74211 jmv74211 moved this to In Progress in Release 4.3.7 Aug 22, 2022
@Deblintrake09 Deblintrake09 changed the title QA Testing - Release 4.3.7-RC1 - Behavior of cluster restart procedure in the UI QA Testing - Release 4.3.7-RC2 - Behavior of cluster restart procedure in the UI Aug 22, 2022
@jmv74211 jmv74211 moved this from In Progress to In review in Release 4.3.7 Aug 23, 2022
@jmv74211 jmv74211 moved this from In review to Done in Release 4.3.7 Aug 23, 2022
@Deblintrake09
Copy link
Contributor Author

Deblintrake09 commented Aug 23, 2022

Error testing results

The errors found were tested and replicated in 4.3.6, so they are not introduced in this version. It seems that the timeout is generated when big rule files are added to the rules directory. It was tested with 10Mb and 100Kb files. The error was found when the file was large.

Video Evidence

10 Megabytes file with no overwrite in 4.3.6 - 3 copies 🔴
Timeout.436.big.file.mp4

10 Megabytes file with no overwrite in 4.3.7 - 3 copies 🔴
Timeout.437.big.file.-.no.overwrite.mp4
100 Kilobytes file with no overwrite in 4.3.7 - 100 copies 🟢
Timeout.437.small.file.-.no.overwrite.mp4

Auxiliary files

In the linked zip file, you will find:

  • copy.sh - bash script used to create copies of the rules file.
  • test_rules_file.xml - 10Mb file with no overwrite tag
  • test_rules_file_100k.xml - 100Kb file with no overwrite tag
  • test_rules_file_100k_overwrite.xml - 100Kb file with overwrite tag

The copy.sh file can be modified to select the rules file source as well as the amount of copies to generate.

@jmv74211
Copy link
Contributor

The following issues have been opened to report the problems detected in this testing issue:

This issue is being transferred. Timeline may not be complete until it finishes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants