Merge lp://staging/~stub/charms/precise/postgresql/bug-1325870-syslog-port into lp://staging/charms/postgresql

Proposed by Stuart Bishop
Status: Merged
Merged at revision: 99
Proposed branch: lp://staging/~stub/charms/precise/postgresql/bug-1325870-syslog-port
Merge into: lp://staging/charms/postgresql
Prerequisite: lp://staging/~stub/charms/precise/postgresql/charm-helpers
Diff against target: 28 lines (+4/-4)
2 files modified
templates/rsyslog_forward.conf (+1/-1)
test.py (+3/-3)
To merge this branch: bzr merge lp://staging/~stub/charms/precise/postgresql/bug-1325870-syslog-port
Reviewer Review Type Date Requested Status
Jorge Niedbalski (community) Needs Information
charmers Pending
Review via email: mp+221853@code.staging.launchpad.net

Commit message

Fix the syslog relation

Description of the change

Fix the syslog relation, per lp:1325870.

syslog is used by the pgbadger charm.

To post a comment you must log in.
96. By Stuart Bishop

Merged charm-helpers into bug-1325870-syslog-port.

97. By Stuart Bishop

Merged charm-helpers into bug-1325870-syslog-port.

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

Hello Stuart,

I reviewed your change and looks OK, the only substantial change is switching from UDP -> TCP port 514, right?

Just as a matter of curiosity; Why this charm is not using the rsyslog-forwarder charm as subordinate?

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

On 12 June 2014 02:18, Jorge Niedbalski <email address hidden> wrote:

> I reviewed your change and looks OK, the only substantial change is switching from UDP -> TCP port 514, right?

Correct. I'd originally cribbed from the rsyslog-forwarder charm, but
that ended up needing to be changed too.

> Just as a matter of curiosity; Why this charm is not using the rsyslog-forwarder charm as subordinate?

To use the rsyslog-forwarder charm, I would still need an option in
the PostgreSQL charm to configure PostgreSQL to log to syslog. At the
time it seemed cleanest to just do everything in the PostgreSQL charm,
although I can argue for using the subordinate too.

--
Stuart Bishop <email address hidden>

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

And I now recall that this design was required to extend the syslog interface, providing the log_line_prefix used by PostgreSQL which allows programs like pgbadger to make sense of the PostgreSQL logs.

Revision history for this message
Tim Van Steenburgh (tvansteenburgh) wrote :

Hi Stuart,

My question is not specific to this MP, but how does one run the tests for this charm? In doing a review, I pulled down the source in a clean lxc container and found that none of the make targets succeeded (lint, unit_test, integration_test).

Thanks!
Tim

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

If 'make lint' isn't working, you need to install the dependencies. tests/00_setup.test should install them all (in particular, python-flake8 which should be the only thing needed for 'make lint' to work. The unit tests should also be fine with the dependencies installed.

The integration tests require a bootstrapped juju environment. In addition, it uses 'juju run' so you need to remove any invalid host keys from ~root/.ssh/known_hosts or tests will fail (there is a bug open on juju run and how it screws with the root users known_hosts).

You might also have luck with using 'charm test' to run everything. Unfortunately on my box, 'charm test' fails to bootstrap juju (machine-0: no kvm containers possible in all-machines.log)

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