openstack internal addresses used, api-endpoints not consulted

Bug #1354175 reported by David Britton
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
juju-deployer
Fix Released
Undecided
David Britton
python-jujuclient
Fix Released
Undecided
Unassigned

Bug Description

The internal address returned by juju status may not be reachable. Could you instead look at juju api-endpoints and try all the ones in there? Especially given the endpoint can now be multiple addresses, the idea of using node 0 only doesn't seem right.

BTW, this is further exacerbated by the following bug in the nova provider: lp:1348287

### juju status output

machines:
  "0":
    agent-state: pending
    agent-version: 1.20.3
    dns-name: 10.10.0.2
    instance-id: f4663fb3-b706-4276-816b-fc1bba66929b
    series: precise
    hardware: arch=amd64 cpu-cores=1 mem=2048M root-disk=20480M
    state-server-member-status: has-vote
services: {}

### juju api-endpoints output

10.96.200.201:17070

### deployer -vd output

2014-08-07 20:38:40 Creating storage deployer.yaml file
2014-08-07 20:38:40 Running juju-deployer
2014-08-07 20:38:40 [DEBUG] deployer.cli: Using runtime GoEnvironment on lsci-cloud
2014-08-07 20:38:40 [INFO] deployer.cli: Starting deployment of storage-test
2014-08-07 20:38:40 [DEBUG] deployer.import: Getting charms...
2014-08-07 20:38:40 [DEBUG] deployer.charm: Cache dir build/jenkins/lsci-cloud-juju-home/.deployer-store-cache/cs_precise_postgresql
2014-08-07 20:38:41 [DEBUG] deployer.charm: Retrieving store charm cs:precise/postgresql-74
2014-08-07 20:38:42 [DEBUG] deployer.charm: Cache dir build/jenkins/lsci-cloud-juju-home/.deployer-store-cache/cs_precise_storage
2014-08-07 20:38:42 [DEBUG] deployer.charm: Retrieving store charm cs:precise/storage-0
2014-08-07 20:38:42 [DEBUG] deployer.charm: Cache dir build/jenkins/lsci-cloud-juju-home/.deployer-store-cache/cs_~davidpbritton_trusty_block-storage-broker
2014-08-07 20:38:43 [DEBUG] deployer.charm: Retrieving store charm cs:~davidpbritton/trusty/block-storage-broker-0
2014-08-07 20:38:43 [DEBUG] deployer.deploy: Resolving configuration

### strace

ubuntu@ubuntu-local-machine-1:/tmp/jenkins/workspace/cloud-installer-basic$ sudo strace -p 5669
sudo: unable to resolve host ubuntu-local-machine-1
Process 5669 attached
connect(3, {sa_family=AF_INET, sin_port=htons(17070), sin_addr=inet_addr("10.10.0.2")}, 16

Related branches

Revision history for this message
David Britton (dpb) wrote :

Here is a simple a simple patch that allows this to be overridden for testing purposes (you can pass in the full wss://<host>:port url to that --endpoint option), I'm not suggesting that is the right fix.

### "patch" for a workaround.

ubuntu@ubuntu-local-machine-1:/usr/lib/python2.7/dist-packages/deployer$ diff env/go.orig.py env/go.py
27c27
< self.api_endpoint = endpoint
---
> self.api_endpoint = options.endpoint
ubuntu@ubuntu-local-machine-1:/usr/lib/python2.7/dist-packages/deployer$ diff cli.orig.py cli.py
117a118,119
> parser.add_argument(
> '--endpoint', action='store', dest='endpoint')

Changed in juju-deployer:
status: New → Confirmed
David Britton (dpb)
Changed in juju-deployer:
status: Confirmed → In Progress
assignee: nobody → David Britton (davidpbritton)
Changed in juju-deployer:
milestone: none → 0.4.0
Changed in python-jujuclient:
status: New → Fix Released
Changed in juju-deployer:
status: In Progress → Fix Committed
Changed in juju-deployer:
status: Fix Committed → Fix Released
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.