New charm: logrotate

Bug #1375790 reported by Chris Stratford
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juju Charms Collection
In Progress
Undecided
Unassigned

Bug Description

This charm provides a simple way for charms to add log rotation or
for an admin to rotate files not otherwise managed.

It can be used either stand-alone (to provide log rotation for charms/services that don't provide it themselves) or used through the logrotate hook interface to provide a simple way to add log rotation to a charm.

Revision history for this message
Review Queue (review-queue) wrote : Review Queue Automated Test Results

This items has failed automated testing! Results available here http://reports.vapour.ws/charm-tests/charm-bundle-test-1147-results

Revision history for this message
Review Queue (review-queue) wrote :

This items has failed automated testing! Results available here http://reports.vapour.ws/charm-tests/charm-bundle-test-1214-results

Revision history for this message
Cory Johns (johnsca) wrote :

Chris,

Thank you for your charm submission. The charm looks great, and with your work-around commit, the tests all pass.

My only suggestion is that the Stand-Alone section of the README is a little confusing / misleading, since, as a subordinate charm, this requires a relation to an existing charm to be deployed. If I'm missing something, though, and there is, in fact, a way to use this charm in a stand-alone fashion, then updating the README with clarifying information would be helpful.

Regardless, the rest of the information and example usage are clear enough, and everything else seems good, so I give it my +1.

Regarding the Review Queue test failure, it looks to be due to a bug in Amulet, but I've been told that it should be fixed with the next release. The work-around is fine for now, and the tests should pass on the next run.

Thanks again for your work!

Revision history for this message
Chris Stratford (chris-gondolin) wrote :

Tweaked README to be clearer (hopefully). Converted to markdown format.

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

+1 LGTM, I'll just request the same minor revisions that I did on samhain, if you don't mind. Otherwise looks great!

> bzr diff
=== modified file 'metadata.yaml'
--- metadata.yaml 2014-08-15 11:17:51 +0000
+++ metadata.yaml 2014-10-29 14:30:30 +0000
@@ -4,8 +4,8 @@
 description: |
   Some charms create log files, but don't provide any mechanism to
   rotate them. This fixes that.
-categories:
- - miscellaneous
+tags:
+ - ops
 subordinate: true
 requires:
   juju-info:

=== modified file 'tests/10-basic-tests'
--- tests/10-basic-tests 2014-10-10 08:55:12 +0000
+++ tests/10-basic-tests 2014-10-29 14:26:33 +0000
@@ -1,12 +1,12 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3

 import amulet
 import time

 d = amulet.Deployment(series="trusty")

-d.add('apache2', 'cs:trusty/apache2-4')
-d.add('logrotate', 'cs:~chris-gondolin/trusty/logrotate')
+d.add('apache2')
+d.add('logrotate')

 d.relate('apache2:juju-info', 'logrotate:juju-info')

@@ -20,7 +20,7 @@
 except:
     raise

-unit = d.sentry.unit['apache2/0']
+unit = d.sentry['apache2/0']

 # Check logrotate.d exists
 if "logrotate.d" not in unit.directory_contents("/etc")["directories"]:

Revision history for this message
Chris Stratford (chris-gondolin) wrote :

Recommended changes applied.

Revision history for this message
Whit Morriss (whitmo) wrote :

This looks good to go.

Changed in charms:
status: New → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.