Merge lp:~thedac/charms/precise/daisy-retracer/scalingstack-changes into lp:~daisy-pluckers/charms/precise/daisy-retracer/trunk

Proposed by David Ames
Status: Merged
Merged at revision: 83
Proposed branch: lp:~thedac/charms/precise/daisy-retracer/scalingstack-changes
Merge into: lp:~daisy-pluckers/charms/precise/daisy-retracer/trunk
Diff against target: 78 lines (+24/-1)
4 files modified
config.yaml (+14/-0)
hooks/common (+4/-1)
hooks/install (+3/-0)
hooks/upgrade-charm (+3/-0)
To merge this branch: bzr merge lp:~thedac/charms/precise/daisy-retracer/scalingstack-changes
Reviewer Review Type Date Requested Status
Brian Murray Approve
Review via email: mp+245918@code.launchpad.net

Description of the change

In the past we have dealt with python-keystoneclient and python-requests incompatibilities by holding the packages. IS is attempting to "unhold" as many packages as possible.

The solution is adding the ubuntu cloud archive repository (grizzly version for precise). Because the repository config option is already required for gathering daisy-dependencies. An "extra" repository is needed.

This MP adds the extra-repository config option. This will allow us to get updates for python-requests and python-keystoneclient without requiring these packages be held.

In addition the MP makes the retracer-amd64.log file age check configurable.

To post a comment you must log in.
Revision history for this message
Brian Murray (brian-murray) wrote :

Looks good to me.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'config.yaml'
2--- config.yaml 2014-12-16 22:58:42 +0000
3+++ config.yaml 2015-01-09 00:15:57 +0000
4@@ -100,6 +100,10 @@
5 type: string
6 default: 'ppa:daisy-pluckers/daisy-seeds'
7 description: The location for the daisy-dependencies package.
8+ extra-repository:
9+ type: string
10+ default: 'deb http://ubuntu-cloud.archive.canonical.com/ubuntu precise-updates/grizzly main'
11+ description: Apt repository required for packages other than daisy-dependencies.
12 duplicate-database:
13 type: string
14 default: 'porter-i386.canonical.com::whoopsie/apport_duplicates.db'
15@@ -227,3 +231,13 @@
16 description: |
17 The status of service-affecting-packages will be set to this value in the dpkg database.
18 Useful valid values are "install" and "hold".
19+ nagios-log-file-age-warn:
20+ default: 1800
21+ type: int
22+ description: |
23+ The nagios check warn threshold for the retracer-amd64.log file age check in seconds.
24+ nagios-log-file-age-crit:
25+ default: 3600
26+ type: int
27+ description: |
28+ The nagios check critical threshold for the retracer-amd64.log file age check in seconds.
29
30=== modified file 'hooks/common'
31--- hooks/common 2014-12-19 21:45:37 +0000
32+++ hooks/common 2015-01-09 00:15:57 +0000
33@@ -30,6 +30,9 @@
34 SANDBOX="$(config-get sandbox)"
35 CLEANUP_SANDBOX="$(config-get cleanup-sandbox)"
36 CLEANUP_DEBS="$(config-get cleanup-debs)"
37+LOG_FILE_AGE_WARN="$(config-get nagios-log-file-age-warn)"
38+LOG_FILE_AGE_CRIT="$(config-get nagios-log-file-age-crit)"
39+EXTRA_REPOSITORY="$(config-get extra-repository)"
40
41 if [ "$CACHE_DEBS" = "False" ]; then
42 CACHE_DEBS="--nocache-deb"
43@@ -235,7 +238,7 @@
44 # Check only the amd64 log for recent activity.
45 export SERVICE_DESCRIPTION="Daisy retracer amd64 log check"
46 export NRPE_CMD_NAME="check_ue_daisy_retracer_amd64_${INSTANCE_TYPE}_log_check"
47- export NRPE_CMD="/usr/lib/nagios/plugins/check_file_age -w 900 -c 1800 -f /srv/${BASEDIR}/${INSTANCE_TYPE}-logs/retracer-amd64.log"
48+ export NRPE_CMD="/usr/lib/nagios/plugins/check_file_age -w $LOG_FILE_AGE_WARN -c $LOG_FILE_AGE_CRIT -f /srv/${BASEDIR}/${INSTANCE_TYPE}-logs/retracer-amd64.log"
49 cheetah fill --env -p templates/nrpe_cmd_file.tmpl > /etc/nagios/nrpe.d/${NRPE_CMD_NAME}.cfg
50 cheetah fill --env -p templates/nrpe_service_file.tmpl > /var/lib/nagios/export/service__${NAGIOS_HOSTNAME}_${NRPE_CMD_NAME}.cfg
51
52
53=== modified file 'hooks/install'
54--- hooks/install 2014-07-14 21:14:29 +0000
55+++ hooks/install 2015-01-09 00:15:57 +0000
56@@ -16,6 +16,9 @@
57
58 . hooks/common
59
60+if [ -n "$EXTRA_REPOSITORY" ]; then
61+ add-apt-repository "$EXTRA_REPOSITORY"
62+fi
63 add-apt-repository "$(config-get repository)"
64 apt-get update
65 apt-get install -y retracer-dependencies python-distro-info
66
67=== modified file 'hooks/upgrade-charm'
68--- hooks/upgrade-charm 2014-12-09 21:28:27 +0000
69+++ hooks/upgrade-charm 2015-01-09 00:15:57 +0000
70@@ -5,6 +5,9 @@
71 charm_dir="$(pwd)"
72 deploy_code "$charm_dir/files/daisy.tgz" $CODE_LOCATION $DAISY_CODE_DIRS
73
74+if [ -n "$EXTRA_REPOSITORY" ]; then
75+ add-apt-repository "$EXTRA_REPOSITORY"
76+fi
77 sudo apt-get update
78 DEBCONF_FRONTEND=noninteractive sudo apt-get -y install oops-repository retracer-dependencies
79

Subscribers

People subscribed via source and target branches

to all changes: