Merge lp://qastaging/~louis/charms/trusty/rsyslog-forwarder-ha/add_forward_hosts into lp://qastaging/charms/trusty/rsyslog-forwarder-ha
Proposed by
Louis Bouchard
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 18 | ||||
Proposed branch: | lp://qastaging/~louis/charms/trusty/rsyslog-forwarder-ha/add_forward_hosts | ||||
Merge into: | lp://qastaging/charms/trusty/rsyslog-forwarder-ha | ||||
Diff against target: |
148 lines (+97/-5) 3 files modified
config.yaml (+7/-1) hooks/hooks.py (+9/-2) tests/unit/test_basic.py (+81/-2) |
||||
To merge this branch: | bzr merge lp://qastaging/~louis/charms/trusty/rsyslog-forwarder-ha/add_forward_hosts | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jorge Niedbalski (community) | Approve | ||
Jorge Niedbalski | Pending | ||
Review via email:
|
Description of the change
Add 'forward_hosts' parameter to provide a list of rsyslog listeners that are not juju-deployed.
Test coverage also included.
To post a comment you must log in.
Hello Louis,
Thank you for submitting this fix.
I deployed this charm on the following environment:
[Environment]
UPGRADE-AVAILABLE
1.25.6
[Services] forwarder- ha false local:trusty/ rsyslog- forwarder- ha-0
NAME STATUS EXPOSED CHARM
external active false cs:xenial/ubuntu-8
rsyslog-
ubuntu active false cs:trusty/ubuntu-8
[Units] forwarder- ha/0 unknown idle 1.25.5.1 10.5.0.42
ID WORKLOAD-STATE AGENT-STATE VERSION MACHINE PORTS PUBLIC-ADDRESS MESSAGE
external/0 active idle 1.25.5.1 4 10.5.0.41 ready
ubuntu/3 active idle 1.25.5.1 5 10.5.0.42 ready
rsyslog-
[Machines] 5ea2-4d96- b187-13fc8e4117 af xenial arch=amd64 cpu-cores=1 mem=1536M root-disk=10240M availability- zone=nova f27b-450f- a221-a6c65c6810 4a xenial arch=amd64 cpu-cores=1 mem=1536M root-disk=10240M availability- zone=nova bdeb-4a6f- 8838-5467209988 53 trusty arch=amd64 cpu-cores=1 mem=1536M root-disk=10240M availability- zone=nova
ID STATE VERSION DNS INS-ID SERIES HARDWARE
0 started 1.25.5.1 10.5.0.37 d459cd19-
4 started 1.25.5.1 10.5.0.41 82aac885-
5 started 1.25.5.1 10.5.0.42 813f9b99-
Then I related ubuntu with rsyslog- forwarder- ha, and then I did set the forward_hosts option:
ubuntu@ niedbalski- bastion: ~$ juju set rsyslog- forwarder- ha forward_ hosts=external= 10.5.0. 41
The resulting configuration looks like:
$ActionQueueType LinkedList # use asynchronous processing eName external # set file name, also enables disk mode tryCount -1 # infinite retries on insert failure eOnShutdown on # save in-memory data if rsyslog shuts down
$ActionQueueFil
$ActionResumeRe
$ActionQueueSav
# Forward everything
*.* @10.5.0.41:514
The logs are being forwarder to the remote rsyslog server, I did run the lint/tests
also. All seems good.
LGTM.