Juju status returns private IP in 'public-ip' field.

Bug #1348287 reported by David Britton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
Ian Booth
1.20
Fix Released
High
Ian Booth

Bug Description

In 1.18.x this makes juju status just not work since only the private IP is tried for contacting the node.

In 1.20.x juju status has the ability to contact multiple state server addresses so it at least doesn't hang on the operation. This leads to juju status output listing an IP that the user cannot contact and has to lookup in horizon or `nova list` to get the externally routable ip to use.

This environment has 'use-floating-ip' set to true. The private IPs are not routable to the network where juju is being executed. And, this is a neutron based openstack (if that matters).

description: updated
Curtis Hovey (sinzui)
tags: added: openstack-provider
summary: - openstack provider: juju status returns private IP in 'public-ip' field.
+ Juju status returns private IP in 'public-ip' field.
Changed in juju-core:
status: New → Triaged
importance: Undecided → High
milestone: none → next-stable
Revision history for this message
Dean Henrichsmeyer (dean) wrote :

Can we get this in 1.20.2? This will be a problem for the cloud installer.

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

Just to show a concrete example with familiar commands:

ubuntu@ubuntu-local-machine-1:~$ juju status
environment: cloud one-region27378
machines:
  "0":
    agent-state: started
    agent-version: 1.20.1
    dns-name: 10.10.0.2
    instance-id: 0ea1f03f-08b1-4c19-acf7-d81568706be6
    instance-state: ACTIVE
    series: precise
    hardware: arch=amd64 cpu-cores=1 mem=2048M root-disk=20480M
    state-server-member-status: has-vote
services: {}
ubuntu@ubuntu-local-machine-1:~$ telnet 10.10.0.2 22
Trying 10.10.0.2...
^C
ubuntu@ubuntu-local-machine-1:~$ juju ssh 0 hostname
juju-cloud-one-region27378-machine-0
Connection to 10.10.0.2 closed.
ubuntu@ubuntu-local-machine-1:~$ nova list
+--------------------------------------+--------------------------------------+--------+------------+-------------+------------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+--------------------------------------+--------+------------+-------------+------------------------------------+
| 0ea1f03f-08b1-4c19-acf7-d81568706be6 | juju-cloud one-region27378-machine-0 | ACTIVE | - | Running | admin_net=10.10.0.2, 10.96.200.201 |
+--------------------------------------+--------------------------------------+--------+------------+-------------+------------------------------------+
ubuntu@ubuntu-local-machine-1:~$ telnet 10.96.200.201 22
Trying 10.96.200.201...
Connected to 10.96.200.201.
Escape character is '^]'.
SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1.4
^]
telnet> quit
Connection closed.
ubuntu@ubuntu-local-machine-1:~$

Ian Booth (wallyworld)
Changed in juju-core:
milestone: next-stable → 1.21-alpha1
Revision history for this message
Martin Packman (gz) wrote :

Along the same lines as bug 1224515. Here the underlying openstack deployment seems to be using one network for both the private and floating ips:

| 0ea1f03f-08b1-4c19-acf7-d81568706be6 | juju-cloud one-region27378-machine-0 | ACTIVE | - | Running | admin_net=10.10.0.2, 10.96.200.201 |

The best Juju can do is pick one to display in dns-name, there's no further information to pick out which is actually publicly routable. One solution is to add all the address information for machines to status, which would basically give the user the same option as juju itself does of trying to connect to both and seeing which works. There doesn't seem to be anything neater unless the deployment segregates its address spaces more clearly or we use neutron to inspect the exact setup.

Revision history for this message
David Britton (dpb) wrote : Re: [Bug 1348287] Re: Juju status returns private IP in 'public-ip' field.

On Mon, Jul 28, 2014 at 10:49:57AM -0000, Martin Packman wrote:
> Along the same lines as bug 1224515. Here the underlying openstack
> deployment seems to be using one network for both the private and
> floating ips:
>
> | 0ea1f03f-08b1-4c19-acf7-d81568706be6 | juju-cloud one-
> region27378-machine-0 | ACTIVE | - | Running | admin_net=10.10.0.2,
> 10.96.200.201 |
>
> The best Juju can do is pick one to display in dns-name, there's no
> further information to pick out which is actually publicly routable. One
> solution is to add all the address information for machines to status,
> which would basically give the user the same option as juju itself does
> of trying to connect to both and seeing which works. There doesn't seem
> to be anything neater unless the deployment segregates its address
> spaces more clearly or we use neutron to inspect the exact setup.

Even in the case of my juju environment saying "use_floating_ip: True',
which juju has to allocate/associate for each instance. Would that be
enough to correctly define the public address in juju status output?

Showing all instance addresses would also be "fine" with me. :)

--
David Britton <email address hidden>

Ian Booth (wallyworld)
Changed in juju-core:
assignee: nobody → Ian Booth (wallyworld)
status: Triaged → In Progress
Ian Booth (wallyworld)
Changed in juju-core:
status: In Progress → Triaged
status: Triaged → Fix Committed
Revision history for this message
Björn Tillenius (bjornt) wrote :

I still see private IPs in the status listing with 1.20.6:

environment: lsci-cloud
machines:
  "0":
    agent-state: started
    agent-version: 1.20.6
    dns-name: 10.10.0.14
    instance-id: a49929fd-187c-48e8-875b-963b072eca38
    instance-state: ACTIVE
    series: trusty
    hardware: arch=amd64 cpu-cores=1 mem=2048M root-disk=20480M
    state-server-member-status: has-vote
  "1":
    agent-state: started
    agent-version: 1.20.6
    dns-name: 10.10.0.15
    instance-id: 891b461f-09f7-4e9b-a38e-8180ce696b79
    instance-state: ACTIVE
    series: trusty
    hardware: arch=amd64 cpu-cores=1 mem=2048M root-disk=20480M
services:
  ubuntu:
    charm: cs:trusty/ubuntu-0
    exposed: false
    units:
      ubuntu/0:
        agent-state: started
        agent-version: 1.20.6
        machine: "1"
        public-address: 10.10.0.15

Here's the 'nova list' output:

+--------------------------------------+---------------------------+--------+------------+-------------+------------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+---------------------------+--------+------------+-------------+------------------------------------+
| a49929fd-187c-48e8-875b-963b072eca38 | juju-lsci-cloud-machine-0 | ACTIVE | - | Running | admin_net=10.10.0.14, 10.96.10.105 |
| 891b461f-09f7-4e9b-a38e-8180ce696b79 | juju-lsci-cloud-machine-1 | ACTIVE | - | Running | admin_net=10.10.0.15, 10.96.10.110 |
+--------------------------------------+---------------------------+--------+------------+-------------+------------------------------------+

Curtis Hovey (sinzui)
Changed in juju-core:
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.