cmd/juju: api connections do not round robin

Bug #1353242 reported by Dave Cheney
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Won't Fix
Medium
Unassigned

Bug Description

scenario:

% juju bootstrap
% juju ensure-availabilty

once ensure-availability returns two (by default) new api addresses will be written into the .jenv file.

After this point only _the_first_ api address is tried. Additional API addresses are not tried, so the environment is inaccessible til ensure-availability completes.

Revision history for this message
Dave Cheney (dave-cheney) wrote :

oh, no. I was wrong. It's worse

lucky(~/src/github.com/juju/juju) % juju status
environment: ap-southeast-2
machines:
  "0":
    agent-state: started
    agent-version: 1.21-alpha1.1
    dns-name: ec2-54-206-161-233.ap-southeast-2.compute.amazonaws.com
    instance-id: i-b0ebac8e
    instance-state: running
    series: precise
    hardware: arch=amd64 cpu-cores=1 cpu-power=100 mem=1740M root-disk=8192M
    state-server-member-status: has-vote
  "1":
    agent-state: pending
    dns-name: 54.206.164.45
    instance-id: i-0ca41632
    instance-state: pending
    series: precise
    hardware: arch=amd64 cpu-cores=1 cpu-power=100 mem=1740M root-disk=8192M
    state-server-member-status: adding-vote
  "2":
    agent-state: pending
    instance-id: i-a5f6b19b
    instance-state: pending
    series: precise
    hardware: arch=amd64 cpu-cores=1 cpu-power=100 mem=1740M root-disk=8192M
    state-server-member-status: adding-vote

The ONLY api address that the client is trying is machine 0,

2014-08-06 03:57:26 INFO juju.state.api apiclient.go:252 dialing "wss://54.206.161.233:17070/"
2014-08-06 03:57:26 DEBUG juju.state.api apiclient.go:258 error dialing "wss://54.206.161.233:17070/", will retry: websocket.Dial wss://54.206.161.233:17070/: dial tcp 54.206.161.233:17070: connection refused
2014-08-06 03:57:26 INFO juju.state.api apiclient.go:252 dialing "wss://ec2-54-206-161-233.ap-southeast-2.compute.amazonaws.com:17070/environment/b5b8e353-ee6d-4283-803f-ac4ee71ceba6/api"
2014-08-06 03:57:26 DEBUG juju.state.api apiclient.go:258 error dialing "wss://ec2-54-206-161-233.ap-southeast-2.compute.amazonaws.com:17070/environment/b5b8e353-ee6d-4283-803f-ac4ee71ceba6/api", will retry: websocket.Dial wss://ec2-54-206-161-233.ap-southeast-2.compute.amazonaws.com:17070/environment/b5b8e353-ee6d-4283-803f-ac4ee71ceba6/api: dial tcp 54.206.161.233:17070: connection refused
2014-08-06 03:57:27 INFO juju.state.api apiclient.go:252 dialing "wss://ip-10-251-48-11.ap-southeast-2.compute.internal:17070/environment/b5b8e353-ee6d-4283-803f-ac4ee71ceba6/api"
2014-08-06 03:57:27 DEBUG juju.state.api apiclient.go:258 error dialing "wss://ip-10-251-48-11.ap-southeast-2.compute.internal:17070/environment/b5b8e353-ee6d-4283-803f-ac4ee71ceba6/api", will retry: websocket.Dial wss://ip-10-251-48-11.ap-southeast-2.compute.internal:17070/environment/b5b8e353-ee6d-4283-803f-ac4ee71ceba6/api: dial tcp: lookup ip-10-251-48-11.ap-southeast-2.compute.internal: no such host
2014-08-06 03:57:27 INFO juju.state.api apiclient.go:252 dialing "wss://54.206.161.233:17070/environment/b5b8e353-ee6d-4283-803f-ac4ee71ceba6/api"
2014-08-06 03:57:27 DEBUG juju.state.api apiclient.go:258 error dialing "wss://54.206.161.233:17070/environment/b5b8e353-ee6d-4283-803f-ac4ee71ceba6/api", will retry: websocket.Dial wss://54.206.161.233:17070/environment/b5b8e353-ee6d-4283-803f-ac4ee71ceba6/api: dial tcp 54.206.161.233:17070: connection refused

which for some reason has stopped responding ...

Revision history for this message
Dave Cheney (dave-cheney) wrote :
summary: - cmd/juju: api connections do not round robbin
+ cmd/juju: api connections do not round robin
Curtis Hovey (sinzui)
Changed in juju-core:
importance: Undecided → Medium
Changed in juju-core:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

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