~canonical-is-bootstack/charm-telegraf/+git/telegraf-charm:bug/1841120

Last commit made on 2020-05-13
Get this branch:
git clone -b bug/1841120 https://git.launchpad.net/~canonical-is-bootstack/charm-telegraf/+git/telegraf-charm
Members of Canonical IS BootStack can upload to this branch. Log in for directions.

Branch merges

Branch information

Recent commits

97ba85b... by Alvaro Uria

Split unit test and add functional test coverage

c1dd0f6... by Edin S

Do not wait for Postgresql if principal is not a related Pg unit

Fixes: LP#1841120

Given a newly available/changed Postgresql unit, this function is
called to (re)configure telegraf to access it.

The function iterates through all available Postgresql units,
searching for this subordinate telegraph's prinicpal Postgresql
connection string.

Prior to this fix, if no Postgresql connection string is found, this
telegraf unit enters a waiting state for Postgresql. This function
never checks if this unit's principal is NOT a Postgresql unit.

This commit checks if this telegraf's prinicpal is in the expected and
related Postgresql units before searching for a Postgresql connection
string ("context") to render to a template -- and only then if the
Postgres connection string isn't found, does it wait on Postgresql.

1351ea9... by Alvaro Uria

Merge branch 'bug/1877284-func'

Reviewed-on: https://code.launchpad.net/~canonical-is-bootstack/charm-telegraf/+git/telegraf-charm/+merge/383618
Reviewed-by: Paul Goins <email address hidden>
Reviewed-by: Zachary Zehring <email address hidden>
Signed-off-by: Alvaro Uria <email address hidden>

0f91656... by Alvaro Uria

Fix CHARM_BUILD_DIR use in func tests

7c681d6... by Celia Wang

Merge branch 'woutervb/bug/1872592'

Reviewed-on: https://code.launchpad.net/~woutervb/charm-telegraf/+git/charm-telegraf/+merge/382264

d06fdac... by Alvaro Uria

Fix unit tests to mock service restarts

9546868... by Alvaro Uria

Rewrite integration tests using Zaza

c54b3e1... by Alvaro Uria

Merge branch 'xavpaice/update_rules'

Reviewed-on: https://code.launchpad.net/~xavpaice/charm-telegraf/+git/telegraf-charm/+merge/381555
Reviewed-by: Alvaro Uria <email address hidden>
Reviewed-by: Wouter van Bommel <email address hidden>
Signed-off-by: Alvaro Uria <email address hidden>

3be47f8... by Wouter van Bommel

Added setting of a state

Function needs to set the state indicating that nagios has been setup.
This flag will be cleared during a call to config-changed, just to be
sure that we pickup changes if needed, like port number.

d62ac14... by Wouter van Bommel

Added unittest for nagios

In response to the code review of the previous MR the following changes
have been made:
 1. Unittest for testing the nagios calls
 2. Removed a non functional check
 3. removed a hidden file
 4. fixed a linting error