Merge lp:~moon127/charms/precise/daisy/schema-connect-cassandra into lp:~daisy-pluckers/charms/precise/daisy/trunk

Proposed by Gareth Woolridge
Status: Merged
Merged at revision: 83
Proposed branch: lp:~moon127/charms/precise/daisy/schema-connect-cassandra
Merge into: lp:~daisy-pluckers/charms/precise/daisy/trunk
Diff against target: 12 lines (+1/-1)
1 file modified
hooks/config-changed (+1/-1)
To merge this branch: bzr merge lp:~moon127/charms/precise/daisy/schema-connect-cassandra
Reviewer Review Type Date Requested Status
Daisy Pluckers Pending
Review via email: mp+301668@code.launchpad.net

Description of the change

The call to oops-respository's schema.py fails unless we also pass the cassandra username and password.

This fix allowed me to rerun a failing upgrade-charm hook and get a fresh DSE casssandra env for staging redeploy to initialise.

Note the daisy charm leaks credentials quite extensively - while this change makes that no worse - it would be a good practise to work to eradicate secrets from the juju logs.

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

This looks good, thanks!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'hooks/config-changed'
--- hooks/config-changed 2016-07-29 18:07:47 +0000
+++ hooks/config-changed 2016-08-01 15:54:36 +0000
@@ -38,7 +38,7 @@
38# Setup the database schema38# Setup the database schema
39for host in $($(dirname $0)/print-cassandra-hosts $LOCAL_CONFIG_PATH); do39for host in $($(dirname $0)/print-cassandra-hosts $LOCAL_CONFIG_PATH); do
40 if PYTHONPATH=$LOCAL_CONFIG_LOCATION "$(dirname $0)/create-keyspace" -u "$cassandra_username" -p "$cassandra_password" "$host"; then40 if PYTHONPATH=$LOCAL_CONFIG_LOCATION "$(dirname $0)/create-keyspace" -u "$cassandra_username" -p "$cassandra_password" "$host"; then
41 OOPS_KEYSPACE=crashdb OOPS_HOST="$host" python \41 OOPS_KEYSPACE=crashdb OOPS_HOST="$host" OOPS_USERNAME="$cassandra_username" OOPS_PASSWORD="$cassandra_password" python \
42 /usr/share/pyshared/oopsrepository/schema.py42 /usr/share/pyshared/oopsrepository/schema.py
43 fi43 fi
44done44done

Subscribers

People subscribed via source and target branches