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 am getting the following error, when I try to deploy a service on a manually provisioned machine using juju:

juju deploy juju-gui --show-log
2014-05-20 13:42:31 INFO juju.cmd supercommand.go:302 running juju-1.18.3-unknown-amd64 [gc]
2014-05-20 13:42:31 INFO juju api.go:242 connecting to API addresses [j93716.servers.jiffybox.net:17070]
2014-05-20 13:42:31 INFO juju apiclient.go:114 state/api: dialing "wss://xxx.xxx.net:17070/"
2014-05-20 13:42:31 INFO juju apiclient.go:124 state/api: connection established
Added charm "cs:trusty/juju-gui-2" to the environment.
2014-05-20 13:42:46 ERROR juju.cmd supercommand.go:305 cannot assign unit "juju-gui/0" to machine: cannot assign unit "juju-gui/0" to new machine or container: cannot assign unit "juju-gui/0" to new machine: use "juju add-machine ssh:[user@]<host>" to provision machines

juju status outputs the following:

environment: manual
machines:
  "0":
    agent-state: started
    agent-version: 1.18.3
    dns-name: xxx.xxx.xxx.xxx
    instance-id: 'manual:'
    series: precise
    hardware: arch=amd64 cpu-cores=1 mem=1996M
  "1":
    agent-state: started
    agent-version: 1.18.3
    dns-name: xxx.xxx.xxx.yyy
    instance-id: manual:xxx.xxx.xxx.net
    series: precise
    hardware: arch=amd64 cpu-cores=1 mem=1996M
services:
  juju-gui:
    charm: cs:trusty/juju-gui-2
    exposed: true
    units:
      juju-gui/0:
        agent-state: pending

Did I miss something?

share|improve this question

1 Answer 1

Judging by the juju status output, you've bootstrapped a manual environment (using juju bootstrap, which is different from manual provisioning, done using juju add-machine ssh:[user@]host).

Manual environments are special - they consist only of a single machine and it cannot start or stop additional machines automatically, including on juju deploy. To add another machine, use juju add-machine ssh:[user@]host first, then juju deploy juju-gui --to #, where # is the juju machine id of the machine you've just added (run juju status to see it). You can also use juju deploy juju-gui --to 0 to deploy Juju GUI on the bootstrap machine.

juju add-machine ssh:[user@]host can be used in any bootstrapped environment to manually provision an external machine and add it to the environment. But with a manually bootstrapped environment, that's the only way to add machines, and you have to specify placement for services and units when deploying, with --to <machine-id> explicitly.

I hope that clears up any confusion. We definitely need better documentation on that I suppose.

share|improve this answer
    
Thank you very much for your detailed answer. Unfortunately now I run into another problem: juju deploy juju-gui --to 0 Added charm "cs:trusty/juju-gui-2" to the environment. ERROR cannot assign unit "juju-gui/0" to machine 0: series does not match –  chmanie May 20 at 16:46
1  
@chmanie Can you ask the series question as a new one? It's unrelated to this issue, that way we can have one solution per post, thanks! –  Jorge Castro May 20 at 20:33
    
If you're satisfied with the answer for your original question, please mark it as accepted. –  dimitern May 22 at 7:30
    
If you use juju-gui, it does not add the --to # on charm deploy and so all charms fail? –  Matthew James Davis Aug 23 at 16:30

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.