Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I turned my Juju instances off on EC2 for a while and after bringing them back online they seem to be in an odd state:

juju status

2012-11-17 17:06:44,094 INFO Connecting to environment...
2012-11-17 17:06:45,590 INFO Connected to environment.
machines:
  0:
    agent-state: not-started
    dns-name: ec2-54-242-142-196.compute-1.amazonaws.com
    instance-id: i-b0996fcf
    instance-state: running
  1:
    agent-state: down
    dns-name: ec2-50-19-186-245.compute-1.amazonaws.com
    instance-id: i-8c8375f3
    instance-state: running
  2:
    agent-state: down
    dns-name: ec2-54-242-255-238.compute-1.amazonaws.com
    instance-id: i-56807629
    instance-state: running
services:
  wordpress:
    charm: cs:precise/wordpress-9
    exposed: true
    relations:
      db:
      - wordpress-db
      loadbalancer:
      - wordpress
    units:
      wordpress/0:
        agent-state: down
        machine: 2
        open-ports:
        - 80/tcp
        public-address: ec2-54-242-227-57.compute-1.amazonaws.com
  wordpress-db:
    charm: cs:precise/mysql-10
    relations:
      db:
      - wordpress
    units:
      wordpress-db/0:
        agent-state: down
        machine: 1
        public-address: ec2-54-242-212-177.compute-1.amazonaws.com

Can I not take my instances down for a while? Or is this something else?

share|improve this question

1 Answer 1

I have some additional information to add after trolling IRC #juju.
Special Thanks to jcastro and hazmat.

The bootstrap node does not support being turned off since the IPs will change. Agent's will report down because they can't connect to the zookeeper. You can connect to your instance nodes and update /etc/init/juju-machine-agent.conf

Change: env JUJU-ZOOKEEPER=”ip-x-x-x-x.ec2.internal:2181” to the new IP of machine 0 (should be your zookeeper). Reboot your instance or restart the agent on the node.

That will get agent-state: running as shown below in the example status. However the service still show agent-state: down and the bootstrap node (machine 0) is still unhappy. There is a fix for all of this in an old code branch on https://launchpad.net/juju
I was told to look at juju/units/address.py.

According to Hazmat “there's a branch to resolve those (periodic poll address and update), but the bootstrap node doesn't have any work planned till juju-core lands”

  :Example Status after editing juju-machine-agent.conf
  0:
    agent-state: not-started
    dns-name: ec2-54-234-171-2.compute-1.amazonaws.com
    instance-id: i-3a12654a
    instance-state: running
  1:
    agent-state: running
    dns-name: ec2-50-17-109-141.compute-1.amazonaws.com
    instance-id: i-68770018
    instance-state: running
  2:
    agent-state: running
    dns-name: ec2-54-234-184-137.compute-1.amazonaws.com
    instance-id: i-806b1cf0
    instance-state: running
services:
  juju-gui:
    charm: cs:precise/juju-gui-1
    exposed: true
    relations: {}
    units:
      juju-gui/0:
        agent-state: down
        machine: 1
        open-ports:
        - 80/tcp
        - 443/tcp
        - 8080/tcp
        public-address: ec2-54-234-166-69.compute-1.amazonaws.com
  owncloud:
    charm: cs:precise/owncloud-5
    exposed: true
    relations: {}
    units:
      owncloud/0:
        agent-state: down
        machine: 2
        open-ports:
        - 80/tcp
        public-address: ec2-54-242-144-9.compute-1.amazonaws.com

I plan to look through the python code recommended and if I can work through a procedure I'll post it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.