Broken endpoint URLs

Bug #1391162 reported by Ante Karamatić
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
keystone (Juju Charms Collection)
Fix Released
High
Unassigned

Bug Description

I have environment with LXC containers as hosts for API services. Each LXC container has two networks and therefore IPs in two different subnets. When I define only os-public-network, I end up with correct public endpoint, but all other endpoints then look like this:

http://10.1.1.63 172.17.5.63:8774/v2/$(tenant_id)s

Example from keystone's juju log:

2014-11-09 10:20:43 INFO worker.uniter.jujuc server.go:102 running hook tool "relation-set" ["-r" "identity-service:66" "service_protocol=http" "service_tenant=services" "admin_token=hidden" "service_password=hidden" "service_port=5000" "auth_port=35357" "service_username=swift" "auth_protocol=http" "auth_host=10.1.1.62 172.17.5.62" "https_keystone=False" "service_tenant_id=31fd2cb1b75a453c9f9479d3fe6742e2" "service_host=10.1.1.62 172.17.5.62"]

Problem goes away if I define all os-*-networks (os-data-network, os-public-network, os-admin-network). Defining only one leaves other broken.

Tags: openstack cts
tags: added: openstack
Revision history for this message
Edward Hope-Morley (hopem) wrote :
Revision history for this message
James Page (james-page) wrote :

The issue might be in the resolve_address function in charm-helpers:

def resolve_address(endpoint_type=PUBLIC):
    """Return unit address depending on net config.

    If unit is clustered with vip(s) and has net splits defined, return vip on
    correct network. If clustered with no nets defined, return primary vip.

    If not clustered, return unit address ensuring address is on configured net
    split if one is configured.

    :param endpoint_type: Network endpoing type
    """
    resolved_address = None
    vips = config('vip')
    if vips:
        vips = vips.split()

    net_type = ADDRESS_MAP[endpoint_type]['config']
    net_addr = config(net_type)
    net_fallback = ADDRESS_MAP[endpoint_type]['fallback']
    clustered = is_clustered()
    if clustered:
        if not net_addr:
            # If no net-splits defined, we expect a single vip
            resolved_address = vips[0]

However I would still expect that to return a single VIP, not all of them.

Revision history for this message
James Page (james-page) wrote :

But that's from next; in the stable charm:

def resolve_address(endpoint_type=PUBLIC):
    resolved_address = None
    if is_clustered():
        if config(_address_map[endpoint_type]['config']) is None:
            # Assume vip is simple and pass back directly
            resolved_address = config('vip')

So this should get a bit better once we release 15.01.

Marking "Fix Committed"

Changed in keystone (Juju Charms Collection):
milestone: none → 15.01
importance: Undecided → High
status: New → Fix Committed
James Page (james-page)
Changed in keystone (Juju Charms Collection):
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.