Merge ~xavpaice/charm-graylog:bug/1925272 into charm-graylog:master

Proposed by Xav Paice
Status: Rejected
Rejected by: Eric Chen
Proposed branch: ~xavpaice/charm-graylog:bug/1925272
Merge into: charm-graylog:master
Diff against target: 477 lines (+190/-32)
11 files modified
src/config.yaml (+10/-2)
src/reactive/graylog.py (+28/-9)
src/tests/functional/requirements.txt (+1/-0)
src/tests/functional/tests/bundles/bionic-graylog2-tls.yaml (+53/-0)
src/tests/functional/tests/bundles/bionic-graylog3-tls.yaml (+4/-4)
src/tests/functional/tests/bundles/bionic-graylog3.yaml (+4/-4)
src/tests/functional/tests/bundles/bionic-ha.yaml (+4/-4)
src/tests/functional/tests/bundles/focal-graylog2-tls.yaml (+54/-0)
src/tests/functional/tests/tests.yaml (+2/-0)
src/tests/unit/test_graylog.py (+19/-8)
src/tox.ini (+11/-1)
Reviewer Review Type Date Requested Status
Celia Wang Approve
🤖 prod-jenkaas-bootstack continuous-integration Approve
Drew Freiberger (community) Needs Fixing
Tom Haddon Abstain
BootStack Reviewers mr tracking; do not claim Pending
BootStack Reviewers Pending
Review via email: mp+401505@code.staging.launchpad.net

Commit message

Enable config for Graylog2 TLS

Enables TLS relation for Graylog 2, which was allowed but not tested or
working previously.

Also forces elasticsearch to use a smaller heap so it can be tested on
smaller server instances.

To post a comment you must log in.
Revision history for this message
Xav Paice (xavpaice) wrote :

WIP: functest failing:

2021-04-21 17:25:42 [INFO] ======================================================================
2021-04-21 17:25:42 [INFO] FAIL: test_nrpe_config (tests.test_legacy.LegacyTests)
2021-04-21 17:25:42 [INFO] Verify that the specific nrpe check is configured.
2021-04-21 17:25:42 [INFO] ----------------------------------------------------------------------
2021-04-21 17:25:42 [INFO] Traceback (most recent call last):
2021-04-21 17:25:42 [INFO] File "./tests/test_legacy.py", line 132, in test_nrpe_config
2021-04-21 17:25:42 [INFO] cfg = self.get_file_contents(
2021-04-21 17:25:42 [INFO] File "/home/xav/charms/charm-graylog/src/.tox/func/lib/python3.8/site-packages/charmhelpers/core/decorators.py", line 40, in _retry_on_exception_inner_2
2021-04-21 17:25:42 [INFO] return f(*args, **kwargs)
2021-04-21 17:25:42 [INFO] File "./tests/test_legacy.py", line 147, in get_file_contents
2021-04-21 17:25:42 [INFO] result = self.run_command(unit, "cat '{}'".format(filename))
2021-04-21 17:25:42 [INFO] File "./tests/test_legacy.py", line 119, in run_command
2021-04-21 17:25:42 [INFO] assert result["Code"] == "0"
2021-04-21 17:25:42 [INFO] AssertionError
2021-04-21 17:25:42 [INFO] ----------------------------------------------------------------------
2021-04-21 17:25:42 [INFO] Ran 6 tests in 327.129s
2021-04-21 17:25:42 [INFO] FAILED
2021-04-21 17:25:42 [INFO] (failures=1)
2021-04-21 17:25:42 [ERROR] {'gl2': 'zaza-8ce00c21ce29'}
2021-04-21 17:25:42 [ERROR] Model gl2 (zaza-8ce00c21ce29)
Traceback (most recent call last):
  File "/home/xav/charms/charm-graylog/src/.tox/func/bin/functest-run-suite", line 8, in <module>
    sys.exit(main())
  File "/home/xav/charms/charm-graylog/src/.tox/func/lib/python3.8/site-packages/zaza/charm_lifecycle/func_test_runner.py", line 308, in main
    func_test_runner(
  File "/home/xav/charms/charm-graylog/src/.tox/func/lib/python3.8/site-packages/zaza/charm_lifecycle/func_test_runner.py", line 242, in func_test_runner
    run_env_deployment(env_deployment, keep_model=preserve_model,
  File "/home/xav/charms/charm-graylog/src/.tox/func/lib/python3.8/site-packages/zaza/charm_lifecycle/func_test_runner.py", line 147, in run_env_deployment
    test.test(
  File "/home/xav/charms/charm-graylog/src/.tox/func/lib/python3.8/site-packages/zaza/charm_lifecycle/test.py", line 122, in test
    run_test_list(tests)
  File "/home/xav/charms/charm-graylog/src/.tox/func/lib/python3.8/site-packages/zaza/charm_lifecycle/test.py", line 111, in run_test_list
    get_test_runners()[runner](testcase, _testcase)
  File "/home/xav/charms/charm-graylog/src/.tox/func/lib/python3.8/site-packages/zaza/charm_lifecycle/test.py", line 73, in run_unittest
    assert test_result.wasSuccessful(), "Test run failed"
AssertionError: Test run failed

Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :

A CI job is currently in progress. A follow up comment will be added when it completes.

Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :

FAILED: Continuous integration, rev:f35868a976d04d821d68fe464da674362a525ad7

No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want jenkins to rebuild you need to trigger it yourself):
https://code.launchpad.net/~xavpaice/charm-graylog/+git/graylog-charm/+merge/401505/+edit-commit-message

https://jenkins.canonical.com/bootstack/job/lp-charm-graylog-ci/13/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/bootstack/job/lp-charm-test-unit-withcompiler/23/
    None: https://jenkins.canonical.com/bootstack/job/lp-update-mp/192/

Click here to trigger a rebuild:
https://jenkins.canonical.com/bootstack/job/lp-charm-graylog-ci/13//rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Xav Paice (xavpaice) wrote :

have been unable to reproduce test failures. Let's get this reviewed.

Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :

A CI job is currently in progress. A follow up comment will be added when it completes.

Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Approve (continuous-integration)
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Tom Haddon (mthaddon) wrote :

Abstaining, just claimed the review to take it off the canonical-is-reviewers dashboard, mergebot has been switched to add bootstack-reviewers for future MPs.

review: Abstain
Revision history for this message
Drew Freiberger (afreiberger) wrote :

Code looks good to me, but we're missing a functional test bundle file (see comment inline) and I think there are some unit tests missing for validating handling of rest_listen_uri.

I won't block on the tests, but the bundle is required to merge.

review: Needs Fixing
Revision history for this message
Xav Paice (xavpaice) wrote :

Added bundles.

The MockKv class is there because with v2 we use db.set("web_listen_uri"... which needs mocking better than a dict can manage.

The url tests are in test_api (test_lib.py), hidden away. A decent refactor would move the whole url logic to the lib and make testing simpler, but that's well outside the scope of this change.

Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :

A CI job is currently in progress. A follow up comment will be added when it completes.

Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Approve (continuous-integration)
Revision history for this message
Celia Wang (ziyiwang) wrote :

lgtm

review: Approve
Revision history for this message
Eric Chen (eric-chen) wrote :

Not implement any new feature in gralogy2 anymore. So reject this PR

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: