setting source option after deploy does nothing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MongoDB Charm |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
If i attempt to set the source to ppa:juju/stable before juju deploy, it doesn't seem to work, because juju doesn't know about the service. But if I set it after juju deploy, i don't see juju updating the package on the unit.
Some relevant bits of irc conversation
<abentley> achiang: It should not matter whether you set it at deploy time or not.
<abentley> achiang: Especially since it will take the instance a little while to start up, so you can set it before it is used.
<achiang> abentley: yeah, i was able to do that yesterday -- do a deploy and then immediately set the source. but that seemed like a weird way to use the option... "can i type faster than my metal will deploy?"
<abentley> achiang: A well-written charm will not care when you set the source, and will end up in the same state regardless. A poorly-written charm will error the unit if the source isn't set correctly at first.
The key here seems to be:
###
<abentley> achiang: Since the mongodb installation is affected by the 'source' setting, 'config-changed', not 'install' should install mongodb.
###
FWIW, this sequence resulted in success:
$ cat mongodb.yaml
mongodb:
source: ppa:juju/stable
$ juju deploy --config mongodb.yaml cs:precise/mongodb
$ juju ssh mongodb/0
$ dpkg -l | grep mongo
ii mongodb 1:2.4.6-
ii mongodb-clients 1:2.4.6-
ii mongodb-dev 1:2.4.6-
ii mongodb-server 1:2.4.6-
$ apt-cache policy mongodb
mongodb:
Installed: 1:2.4.6-
Candidate: 1:2.4.6-
Version table:
*** 1:2.4.6-
500 http://
100 /var/lib/
1:
400 http://
1:
500 http://
500 http://
1:
500 http://
Changed in mongodb (Juju Charms Collection): | |
status: | New → Confirmed |
importance: | Undecided → Medium |
affects: | mongodb (Juju Charms Collection) → mongodb-charm |
Changed in charm-mongodb: | |
status: | Confirmed → Won't Fix |