juju api-endpoints has no way to distinguish public and private addresses

Bug #1311227 reported by Kapil Thangavelu
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
Frank Mueller
1.20
Fix Released
High
Katherine Cox-Buday

Bug Description

with a single state server

$ juju api-endpoints
107.170.44.217:17070
10.128.231.73:17070

Which is different from previous results:

$ juju api-endpoints
107.170.44.217:17070

We now at least default to ipv4 and not machine-local addresses, but we should be caching the full network details of the servers and adding flags to api-endpoints such as "juju api-endpoints --network-scope=public", and then also we could cache ipv6 and have flags to enable that as well.

See bug #1308491 wrt the change to what we cache.

Tags: api regression
Revision history for this message
Kapil Thangavelu (hazmat) wrote :

alternatively differ output by user if this is also being consumed by agents and admin or return a mapping of state server to addresses with the address type also denoted.

Curtis Hovey (sinzui)
Changed in juju-core:
status: New → Triaged
importance: Undecided → Critical
milestone: none → 1.19.1
tags: added: api regression
Revision history for this message
Ian Booth (wallyworld) wrote :

This is pretty much a duplicate of bug 1310258
There's a branch in review which excludes all IP6 addresses and machine local addresses from the API list. However, the other non-local IP4 addresses are still listed. I think this is by design by am not across the specifics of why it has been necessary to do it that way.

Revision history for this message
Kapil Thangavelu (hazmat) wrote : Re: [Bug 1311227] [NEW] juju api-endpoints cli regression on trunk/1.19

It's not a dupe IMO.. Ones about the API, ones about the cli regression
which specifically wants only addresses that can be connected to.. The uses
of the API I guess include agents though there are regressions there as
well.

On Tuesday, April 22, 2014, Ian Booth <email address hidden> wrote:

> This is pretty much a duplicate of bug 1310258
> There's a branch in review which excludes all IP6 addresses and machine
> local addresses from the API list. However, the other non-local IP4
> addresses are still listed. I think this is by design by am not across the
> specifics of why it has been necessary to do it that way.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1311227
>
> Title:
> juju api-endpoints cli regression on trunk/1.19
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju-core/+bug/1311227/+subscriptions
>

Revision history for this message
Andrew Wilkins (axwalk) wrote : Re: juju api-endpoints cli regression on trunk/1.19

How do you know which addresses can be connected to? That's relative to the client. We should be pruning out the loopback addresses and IPv6 (for now), but otherwise I don't see how it is an error to add additional networks.

Revision history for this message
Ian Booth (wallyworld) wrote :

The duplicate comment was referring to the need to remove IP6 and machine local addresses from the list

Revision history for this message
Ian Booth (wallyworld) wrote :

The branch to remove the IP6 and machine local addresses has now landed. So that bit has been addressed.

Revision history for this message
Kapil Thangavelu (hazmat) wrote : Re: [Bug 1311227] Re: juju api-endpoints cli regression on trunk/1.19

re api, returning all is fine, re cli (which this bug is filed out), re the
client, thats partly why i was interested in customizing results, remote
peer is one of two types, its either on a subnet or routed, the server
socket connection has a reasonable guess primarily based on context of the
login agent or user, in which case it can direct appropriately to network
name/role classification (ext, int, named, mgmt). even with the multiple
addresses, its relatively simple to keep compatibility with the cli output
via exposing api results output via cli flags (--ipv6, --network). i don't
think we want to filter ipv6 addresses, thats a valid form of connecting,
the consumer should determine usage of the endpoints.

incidentally this also brought up a regression in machine agents, whereby
in a cross region env using manual provider, the machines would come up
connect to the public ip address of the state server, then commit suicide
by requesting the current set of addresses for the state servers via the
same api-endpoints api, go ahead and determine they should re-connect on
their cloud-local address/net, rewrite their agent.conf and effectively not
able to come again on restart or their reconnect attempt, and marked down
in status.

one of the machine agent's logs http://paste.ubuntu.com/7308797/

which goes to the point of presumption re network name/role.. but afaics
for almost every provider except maas, the address the client should
contact a server is well known, and with maas we assume connectivity by at
least one vlan. That is the entire point of this cli command namely to
resolve an address for each state server in the environment for api
programs to utilize. Although wrt to the api consumer suicide bug in MA
perhaps it should be a note on canaries and rollback with regard to
upgrades, ie fallback to known working ip address.

cheers,

Kapil

On Tue, Apr 22, 2014 at 8:04 PM, Ian Booth <email address hidden> wrote:

> The duplicate comment was referring to the need to remove IP6 and
> machine local addresses from the list
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1311227
>
> Title:
> juju api-endpoints cli regression on trunk/1.19
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju-core/+bug/1311227/+subscriptions
>

John A Meinel (jameinel)
summary: - juju api-endpoints cli regression on trunk/1.19
+ juju api-endpoints has no way to distinguish public and private
+ addresses
Changed in juju-core:
milestone: 1.19.1 → 2.0
description: updated
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 2.0 → 1.20.0
Revision history for this message
Kapil Thangavelu (hazmat) wrote : Re: [Bug 1311227] Re: juju api-endpoints has no way to distinguish public and private addresses

Meant to bring this up at the sprint. API end points command is somewhat
useless. Any client API program that wants to connect needs to parse a jenv
file. ie endpoint, credentials, cert

On Thursday, May 1, 2014, Curtis Hovey <email address hidden> wrote:

> ** Changed in: juju-core
> Milestone: 2.0 => 1.20.0
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1311227
>
> Title:
> juju api-endpoints has no way to distinguish public and private
> addresses
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju-core/+bug/1311227/+subscriptions
>

Changed in juju-core:
milestone: 1.20.0 → next-stable
Curtis Hovey (sinzui)
Changed in juju-core:
importance: Critical → High
Frank Mueller (themue)
Changed in juju-core:
assignee: nobody → Frank Mueller (themue)
Frank Mueller (themue)
Changed in juju-core:
status: Triaged → Fix Committed
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: next-stable → 1.21-alpha1
Revision history for this message
Kapil Thangavelu (hazmat) wrote :

This issue needs to be reopened against trunk, compatibility with 1.18 was never verified and isn't correct, the rendering on trunk simply turns the list of state server addresses into a scalar when should be a list of public addresses per state server.

This incompatible change means in a multi-state server environment each client has to distinguish if the output contains a scalar or a list, where as previously it was always at least a single entry list.

ie. note the delta

http://pastebin.ubuntu.com/7894639/

Changed in juju-core:
status: Fix Committed → Triaged
Ian Booth (wallyworld)
Changed in juju-core:
status: Triaged → Fix Committed
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.