Merge lp:~niedbalski/charms/precise/rsyslog-forwarder/lp-1323627 into lp:charms/rsyslog-forwarder

Proposed by Jorge Niedbalski
Status: Merged
Approved by: Stuart Bishop
Approved revision: 9
Merged at revision: 9
Proposed branch: lp:~niedbalski/charms/precise/rsyslog-forwarder/lp-1323627
Merge into: lp:charms/rsyslog-forwarder
Diff against target: 21 lines (+2/-2)
2 files modified
files/forwarder.template (+1/-1)
hooks/syslog-relation-joined (+1/-1)
To merge this branch: bzr merge lp:~niedbalski/charms/precise/rsyslog-forwarder/lp-1323627
Reviewer Review Type Date Requested Status
Charles Butler (community) cr + deploy Approve
Stuart Bishop (community) Approve
Review via email: mp+221903@code.launchpad.net

Description of the change

Fixes bug LP:1323627 reported by @stub

To post a comment you must log in.
Revision history for this message
Jorge Niedbalski (niedbalski) wrote :

Tested on local, openstack providers.

Revision history for this message
Jorge Niedbalski (niedbalski) wrote :

environment: local
machines:
  "0":
    agent-state: started
    agent-version: 1.19.1.1
    dns-name: localhost
    instance-id: localhost
    series: trusty
    state-server-member-status: has-vote
  "1":
    agent-state: started
    agent-version: 1.19.1.1
    dns-name: 10.0.3.15
    instance-id: niedbalski-local-machine-1
    series: precise
    hardware: arch=amd64
  "2":
    agent-state: started
    agent-version: 1.19.1.1
    dns-name: 10.0.3.32
    instance-id: niedbalski-local-machine-2
    series: precise
    hardware: arch=amd64
services:
  mysql:
    charm: cs:precise/mysql-45
    exposed: false
    relations:
      cluster:
      - mysql
      juju-info:
      - rsyslog-forwarder
    units:
      mysql/0:
        agent-state: started
        agent-version: 1.19.1.1
        machine: "1"
        public-address: 10.0.3.15
        subordinates:
          rsyslog-forwarder/0:
            upgrading-from: local:precise/rsyslog-forwarder-10
            agent-state: started
            agent-version: 1.19.1.1
            public-address: 10.0.3.15
  rsyslog:
    charm: cs:precise/rsyslog-3
    exposed: false
    relations:
      aggregator:
      - rsyslog-forwarder
    units:
      rsyslog/0:
        agent-state: started
        agent-version: 1.19.1.1
        machine: "2"
        open-ports:
        - 514/tcp
        - 514/udp
        public-address: 10.0.3.32
  rsyslog-forwarder:
    charm: local:precise/rsyslog-forwarder-10
    exposed: false
    relations:
      juju-info:
      - mysql
      syslog:
      - rsyslog
    subordinate-to:
    - mysql

Then i sent a message using logger on mysql/0

logger -p local0.error Testing message

Received message on rsyslog/0:

Jun 3 11:11:51 niedbalski-local-machine-1 ubuntu: Testing message

Revision history for this message
Stuart Bishop (stub) wrote :

This looks good.

review: Approve
Revision history for this message
Charles Butler (lazypower) wrote :

I've deployed this without issue. Seems that moving from TCP to UDP is a fairly straight forward change. +1 LGTM

review: Approve (cr + deploy)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'files/forwarder.template'
2--- files/forwarder.template 2012-10-25 16:57:04 +0000
3+++ files/forwarder.template 2014-06-03 15:07:49 +0000
4@@ -4,4 +4,4 @@
5 $ActionQueueSaveOnShutdown on # save in-memory data if rsyslog shuts down
6
7 # Forward everything
8-*.* @@server@@:10514
9+*.* @@server@@:514
10
11=== modified file 'hooks/syslog-relation-joined'
12--- hooks/syslog-relation-joined 2013-01-25 15:49:07 +0000
13+++ hooks/syslog-relation-joined 2014-06-03 15:07:49 +0000
14@@ -6,7 +6,7 @@
15
16 [ -f /etc/rsyslog.d/50-default.conf ] && mv -f /etc/rsyslog.d/50-default.conf{,.off}
17
18-sed -e "s/@@server@@/@@`relation-get private-address`/g;
19+sed -e "s/@@server@@/@`relation-get private-address`/g;
20 s/@@service@@/$rservice/g" \
21 files/forwarder.template > /etc/rsyslog.d/80-$JUJU_RELATION_ID.conf
22

Subscribers

People subscribed via source and target branches

to all changes: