Merge lp:~axwalk/juju-core/lp1263586-force-symlink-jujurun into lp:~go-bot/juju-core/trunk
Proposed by
Andrew Wilkins
Status: | Merged |
---|---|
Approved by: | Andrew Wilkins |
Approved revision: | no longer in the source branch. |
Merged at revision: | 2198 |
Proposed branch: | lp:~axwalk/juju-core/lp1263586-force-symlink-jujurun |
Merge into: | lp:~go-bot/juju-core/trunk |
Diff against target: |
193 lines (+78/-20) 5 files modified
cmd/jujud/machine.go (+17/-0) cmd/jujud/machine_test.go (+42/-0) cmd/jujud/main_test.go (+19/-10) environs/cloudinit/cloudinit.go (+0/-8) environs/cloudinit/cloudinit_test.go (+0/-2) |
To merge this branch: | bzr merge lp:~axwalk/juju-core/lp1263586-force-symlink-jujurun |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+200368@code.launchpad.net |
Commit message
environs/cloudinit: force symlink of juju-run
Manual provisioning fails if the juju-run symlink
exists. We should always recreate the symlink if
it exists, by passing -f to ln.
Also: moved symlinking of juju-run to the machine
agent, so that upgrades do the right thing.
Fixes #1263586
Description of the change
environs/cloudinit: force symlink of juju-run
Manual provisioning fails if the juju-run symlink
exists. We should always recreate the symlink if
it exists, by passing -f to ln.
Also: moved symlinking of juju-run to the machine
agent, so that upgrades do the right thing.
Fixes #1263586
To post a comment you must log in.
Reviewers: mp+200368_ code.launchpad. net,
Message:
Please take a look.
Description:
environs/cloudinit: force symlink of juju-run
Manual provisioning fails if the juju-run symlink
exists. We should always recreate the symlink if
it exists, by passing -f to ln.
Fixes #1263586
https:/ /code.launchpad .net/~axwalk/ juju-core/ lp1263586- force-symlink- jujurun/ +merge/ 200368
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/47380044/
Affected files (+5, -3 lines): cloudinit/ cloudinit. go cloudinit/ cloudinit_ test.go
A [revision details]
M environs/
M environs/
Index: [revision details] 20140102083548- er3lr2qx0y8nwd2 x
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: tarmac-
+New revision: <email address hidden>
Index: environs/ cloudinit/ cloudinit. go cloudinit/ cloudinit. go' cloudinit/ cloudinit. go 2013-12-18 15:15:23 +0000 cloudinit/ cloudinit. go 2014-01-03 06:09:31 +0000 bin/juju- run", bin/juju- run",
=== modified file 'environs/
--- environs/
+++ environs/
@@ -261,7 +261,7 @@
// cfg.jujuTools()), as we want the jujud that is linked to in
// /usr/local/bin to also upgrade when the machine agent upgrades its
// tools and changes the tools directory that it is using.
- fmt.Sprintf("ln -s %s/tools/%s/jujud /usr/local/
cfg.DataDir, machineTag),
+ fmt.Sprintf("ln -f -s %s/tools/%s/jujud /usr/local/
cfg.DataDir, machineTag),
)
// Add the cloud archive cloud-tools pocket to apt sources
Index: environs/ cloudinit/ cloudinit_ test.go cloudinit/ cloudinit_ test.go' cloudinit/ cloudinit_ test.go 2013-12-17 12:13:50 +0000 cloudinit/ cloudinit_ test.go 2014-01-03 06:09:31 +0000 juju/agents/ machine- 0/format' juju/agents/ machine- 0/agent\ .conf' juju/agents/ machine- 0/agent\ .conf' juju/tools/ machine- 0/jujud /usr/local/ bin/juju- run juju/tools/ machine- 0/jujud /usr/local/ bin/juju- run juju/server\ .pem' juju/server\ .pem' juju/db/ journal juju/agents/ machine- 99/format' juju/agents/ machine- 99/agent\ .conf' juju/agents/ machine- 99/agent\ .conf' juju/tools/ machine- 99/jujud /usr/local/ bin/juju- run juju/tools/ machine- 99/jujud /usr/local/ bin/juju- run juju/tools/ machine- 99' machine- 99\)'.* jujud-machine- 99\.conf << 'EOF'\\ndescription "juju .ubuntu\ .com>"\ \nstart on ]\\nrespawn\ \nnormal exit juju/tools/ machine- 99/juju. ..
=== modified file 'environs/
--- environs/
+++ environs/
@@ -111,7 +111,7 @@
printf '%s\\n' '.*' > '/var/lib/
install -m 600 /dev/null '/var/lib/
printf '%s\\n' '.*' > '/var/lib/
-ln -s /var/lib/
+ln -f -s /var/lib/
install -D -m 600 /dev/null '/var/lib/
printf '%s\\n' 'SERVER CERT\\n[^']*SERVER KEY\\n[^']*'
> '/var/lib/
mkdir -p /var/lib/
@@ -224,7 +224,7 @@
printf '%s\\n' '.*' > '/var/lib/
install -m 600 /dev/null '/var/lib/
printf '%s\\n' '.*' > '/var/lib/
-ln -s /var/lib/
+ln -f -s /var/lib/
ln -s 1\.2\.3-linux-amd64 '/var/lib/
echo 'Starting Juju machine agent \(jujud-
cat >> /etc/init/
machine-99 agent"\\nauthor "Juju Team <juju@lists\
runlevel \[2345\]\\nstop on runlevel \[!2345\
0\\n\\nlimit nofile 20000 20000\\n\\nexec
/var/lib/