Merge lp:~speransky/charms/trusty/openmpi/base64-fix into lp:~craig.magina/charms/precise/openmpi/trunk

Proposed by Max
Status: Approved
Approved by: Craig Magina
Approved revision: 5
Proposed branch: lp:~speransky/charms/trusty/openmpi/base64-fix
Merge into: lp:~craig.magina/charms/precise/openmpi/trunk
Diff against target: 20 lines (+2/-2)
1 file modified
hooks/openmpi-common (+2/-2)
To merge this branch: bzr merge lp:~speransky/charms/trusty/openmpi/base64-fix
Reviewer Review Type Date Requested Status
Craig Magina Approve
Review via email: mp+274828@code.launchpad.net

Commit message

Fix order of base64 decode during key distribution

Description of the change

Fix order of base64 decode during key distribution

To post a comment you must log in.
Revision history for this message
Craig Magina (craig.magina) wrote :

Looks good, thanks for the fix!

review: Approve

Unmerged revisions

5. By Max

fix public key distribution in cluster

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/openmpi-common'
2--- hooks/openmpi-common 2012-11-09 20:42:06 +0000
3+++ hooks/openmpi-common 2015-10-18 17:24:59 +0000
4@@ -147,14 +147,14 @@
5 REMOTE_UNIT=${JUJU_REMOTE_UNIT//\//-}
6
7 ssh_setup
8- relation-set id_rsa.pub="`base64 $HOME/.ssh/id_rsa.pub`"
9+ relation-set id_rsa.pub="`base64 -w 0 $HOME/.ssh/id_rsa.pub`"
10 ;;
11 cluster-relation-changed)
12 juju-log "$JUJU_REMOTE_UNIT changed"
13
14 REMOTE_UNIT=${JUJU_REMOTE_UNIT//\//-}
15 REMOTE_ADDRESS="`relation-get private-address`"
16- REMOTE_PUBLIC_KEY="`base64 -d | relation-get id_rsa.pub`"
17+ REMOTE_PUBLIC_KEY="`relation-get id_rsa.pub | base64 -d`"
18
19 add_ssh_public_key
20 add_ssh_host_config

Subscribers

People subscribed via source and target branches

to all changes: