'local:' services not started on reboot

Bug #955576 reported by Jamie Strandboge
128
This bug affects 26 people
Affects Status Importance Assigned to Milestone
pyjuju
Triaged
Low
Unassigned
juju (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

If I use setup ~/.juju/environments.yaml to have:
environments:
  local:
    type: local
    data-dir: /home/jamie/juju-local
    admin-secret: abcdefghijklmnopqrstuvwxyz1234567890
    control-bucket: foo-bucket
    default-series: oneiric

Then do:
$ juju bootstrap
$ juju deploy --repository=/usr/share/doc/juju/examples local:oneiric/mysql
$ juju deploy --repository=/usr/share/doc/juju/examples local:oneiric/wordpress
(wait a while)
$ juju add-relation wordpress mysql
$ juju expose wordpress

At this point everything is working. I can see services as started and I can bring up the wordpress page in the public address for the wordpress service. This is great!

However, if I reboot the host, nothing is started:
 * zookeeper
 * twisted storage
 * juju machine agent
 * lxc instances

If I try to 'juju bootstrap', I cannot because it tells me it is already bootstrapped. Instead I have to grab from ps the commands to start things:
$ java -cp /home/jamie/juju-local/jamie-local/zookeeper:/usr/share/java/jline.jar:/usr/share/java/log4j-1.2.jar:/usr/share/java/xercesImpl.jar:/usr/share/java/xmlParserAPIs.jar:/usr/share/java/zookeeper.jar -Dzookeeper.log.dir=/home/jamie/juju-local/jamie-local/zookeeper/log -Dzookeeper.root.logger=INFO,CONSOLE -Dlog4j.configuration=file:/home/jamie/juju-local/jamie-local/zookeeper/log4j.properties org.apache.zookeeper.server.quorum.QuorumPeerMain /home/jamie/juju-local/jamie-local/zookeeper/zoo.cfg &
$ /usr/bin/python /usr/bin/twistd --pidfile /home/jamie/juju-local/jamie-local/storage-server.pid --logfile /home/jamie/juju-local/jamie-local/storage-server.log -d /home/jamie/juju-local/jamie-local/files web --port tcp:33698:interface=192.168.123.1 --path /home/jamie/juju-local/jamie-local/files &
$ lxc-start --daemon -n jamie-local-mysql-0 -l DEBUG -o /home/jamie/juju-local/jamie-local/units/mysql-0/container.log
$ lxc-start --daemon -n jamie-local-wordpress-0 -l DEBUG -o /home/jamie/juju-local/jamie-local/units/wordpress-0/container.log

Tags: production
Revision history for this message
James Page (james-page) wrote :

This is documented as a limitation here:

https://juju.ubuntu.com/docs/provider-configuration-local.html

However I agree that it would be nice if the local environment could be recovered after a host restart.

Changed in juju (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
William Reade (fwereade) wrote :

Just a note: the local storage-server and machine-agent are now upstartified; the missing pieces are zookeeper and the lxc containers, neither of which should be tricky to fix.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

William, thanks that is great news.

James, to call this a limitation is IMHO a major understatement. Since all services, units, etc are removed after a destroy-environment, the local environment is nothing more than for testing or demonstration purposes. Of course, it states right in the page you mentioned that is has 'the goal of experimenting with juju and developing formulas', but seems more could be here to make it more useful, even for testing purposes (eg, I am testing juju but had to reboot my host machine so all that is lost).

Changed in juju:
milestone: none → galapagos
Changed in juju:
importance: Undecided → Medium
Changed in juju:
milestone: galapagos → honolulu
Changed in juju:
status: New → Confirmed
Changed in juju:
milestone: 0.6 → none
Changed in juju (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Matteo Giordano (ilmalteo) wrote :

Any news on this? I think that Juju on LXC shouldn't be treated as a "second class citizen", it could perfectly solve someone (mine :) needs!

Revision history for this message
Jorge Castro (jorge) wrote :

I'm putting a production tag on this to put it on our "things that prevent Juju being used in production environments"; developers can't push to prod if we keep resetting their environments.

tags: added: production
Changed in juju:
milestone: none → 0.8
Curtis Hovey (sinzui)
Changed in juju:
status: Confirmed → Triaged
Curtis Hovey (sinzui)
Changed in juju:
importance: Medium → Low
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

if lxc config is modified to autostart containers, those containers that are specified in /etc/lxc/auto will be auto started.
This is from https://help.ubuntu.com/lts/serverguide/lxc.html

Revision history for this message
Kapil Thangavelu (hazmat) wrote : Re: [Bug 955576] Re: 'local:' services not started on reboot

this bug is resolved in juju-core fwiw.

On Fri, Dec 13, 2013 at 2:28 PM, Dimitri John Ledkov <<email address hidden>
> wrote:

> if lxc config is modified to autostart containers, those containers that
> are specified in /etc/lxc/auto will be auto started.
> This is from https://help.ubuntu.com/lts/serverguide/lxc.html
>
> --
> You received this bug notification because you are subscribed to pyjuju.
> https://bugs.launchpad.net/bugs/955576
>
> Title:
> 'local:' services not started on reboot
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/955576/+subscriptions
>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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