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

[Bug]: Fix missing local test cluster logs for integration tests #3382

Closed
3 tasks
Tracked by #1274
gaiksaya opened this issue Apr 10, 2023 · 5 comments
Closed
3 tasks
Tracked by #1274

[Bug]: Fix missing local test cluster logs for integration tests #3382

gaiksaya opened this issue Apr 10, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@gaiksaya
Copy link
Member

gaiksaya commented Apr 10, 2023

Describe the bug

Currently, the local test cluster only records stdout and stderr for local cluster that is deployed by the test workflow.
Missing logs files:

- gc.log.00
- opensearchcluster1.log
- opensearchcluster1_deprecation.json
- opensearchcluster1_deprecation.log
- opensearchcluster1_index_indexing_slowlog.json
- opensearchcluster1_index_indexing_slowlog.log
- opensearchcluster1_index_search_slowlog.json
- opensearchcluster1_index_search_slowlog.log
- opensearchcluster1_server.json
- opensearchcluster1_task_detailslog.json
- opensearchcluster1_task_detailslog.log

To reproduce

Run below command locally and see that test-results/../local-test-cluster folder only includes stdout and stderr files

./test.sh integ-test manifests/2.7.0/opensearch-2.7.0-test.yml --component geospatial -p opensearch=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/2.7.0/7325/linux/x64/tar --keep

Expected behavior

Should record all log files

Screenshots

If applicable, add screenshots to help explain your problem.

Host / Environment

No response

Additional context

Estimate: 3 points

Acceptance Criteria

  • Local cluster logs should be recorded in test-results folder
  • The temp directory (where local opensearch and dashboards is downloaded) should be cleaned up after each test
  • Add tests cases verifying the behavior
@gaiksaya gaiksaya added bug Something isn't working untriaged Issues that have not yet been triaged labels Apr 10, 2023
@gaiksaya gaiksaya removed the untriaged Issues that have not yet been triaged label Apr 10, 2023
@zelinh zelinh moved this from Backlog to Not started in OpenSearch Engineering Effectiveness Apr 10, 2023
@zelinh zelinh moved this from Not started to In Progress in OpenSearch Engineering Effectiveness Apr 10, 2023
@zelinh
Copy link
Member

zelinh commented Apr 10, 2023

This issue is reproduced with command

./test.sh integ-test manifests/2.6.0/opensearch-2.6.0-test.yml --component sql -p opensearch=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/2.6.0/7160/linux/x64/tar

I could only see

[opensearch@bcd027be88ff local-cluster-logs]$ ls
stderr.txt  stdout.txt

and

[opensearch@bcd027be88ff test-results]$ ls
sql.yml  stderr.txt  stdout.txt

@gaiksaya
Copy link
Member Author

That's the missing piece @zelinh. See the tmp directory after using --keep option. The cluster logs are present where opensearch is downloaded. so for 2.7.0 /some/tmp/directory/opensearch-2.7.0/logs/*

@zelinh
Copy link
Member

zelinh commented Apr 14, 2023

Basically the reason of these missing logs is that the workflow is forced to deleted everything when terminating the local cluster for tarball & zip.
e.g.

def uninstall(self) -> None:
logging.info(f"Cleanup {self.work_dir}/* content after the test")
subprocess.check_call(f"rm -rf {self.work_dir}/*", shell=True)

I would raise a PR to remove this part so the local-test-cluster folder within the TemporaryDirectory would subject to the keep argument.

@rishabh6788
Copy link
Collaborator

Do we have any anecdotes from plugin teams requiring any of the above mentioned logs apart from the OS log which is present in stdout file?

@zelinh
Copy link
Member

zelinh commented May 8, 2023

Closing this issue as this has been fixed.

@zelinh zelinh closed this as completed May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

3 participants