setting source option after deploy does nothing

Bug #1332628 reported by Alex Chiang
10
This bug affects 2 people
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-0ubuntu5~ubuntu12.04.1~juju1 object/document-oriented database (metapackage)
ii mongodb-clients 1:2.4.6-0ubuntu5~ubuntu12.04.1~juju1 object/document-oriented database (client apps)
ii mongodb-dev 1:2.4.6-0ubuntu5~ubuntu12.04.1~juju1 object/document-oriented database (development)
ii mongodb-server 1:2.4.6-0ubuntu5~ubuntu12.04.1~juju1 object/document-oriented database (server package)

$ apt-cache policy mongodb
mongodb:
  Installed: 1:2.4.6-0ubuntu5~ubuntu12.04.1~juju1
  Candidate: 1:2.4.6-0ubuntu5~ubuntu12.04.1~juju1
  Version table:
 *** 1:2.4.6-0ubuntu5~ubuntu12.04.1~juju1 0
        500 http://ppa.launchpad.net/juju/stable/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status
     1:2.4.6-0ubuntu5~ctools1 0
        400 http://ubuntu-cloud.archive.canonical.com/ubuntu/ precise-updates/cloud-tools/main amd64 Packages
     1:2.0.4-1ubuntu2.1 0
        500 http://nova.clouds.archive.ubuntu.com/ubuntu/ precise-updates/universe amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ precise-security/universe amd64 Packages
     1:2.0.4-1ubuntu2 0
        500 http://nova.clouds.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages

Changed in mongodb (Juju Charms Collection):
status: New → Confirmed
importance: Undecided → Medium
affects: mongodb (Juju Charms Collection) → mongodb-charm
Eric Chen (eric-chen)
Changed in charm-mongodb:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.