get_authserver_ip is referring to openstack role even if the env.keystone section is populated

Bug #1576319 reported by Ignatious Johnson Christopher
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.0
Invalid
High
Ignatious Johnson Christopher
R3.1
Invalid
High
Ignatious Johnson Christopher
Trunk
Invalid
High
Ignatious Johnson Christopher

Bug Description

In my current deploy I’m going to launch the setup_without_openstack task because openstack is already deployed.
This means that I do not need also to specify any openstack roles in my testbed.py.

In the fuction below, even if at the end it will be retrieved the correct IP (keystone_ip), it tried to get an openstack host, since I’ve got no one in my testbed.py, it goes in index-out-of-bound error.

def get_authserver_ip(ignore_vip=False, openstack_node=None):
    …
    if openstack_node:
        openstack_host = get_control_host_string(openstack_node)
    else:
        openstack_host = get_control_host_string(testbed.env.roledefs['openstack'][0])
    openstack_ip = hstr_to_ip(openstack_host)
    keystone_ip1 = getattr(testbed, 'keystone_ip', None)
    keystone_ip = get_from_testbed_dict('keystone', 'keystone_ip', keystone_ip1)
    internal_vip = get_openstack_internal_vip()

    if ignore_vip:
        return keystone_ip or openstack_ip
    else:
        if internal_vip and keystone_ip:
            print "Openstack HA setup, Keystone running in different node other than [%s]" % ','.join(testbed.env.roledefs['openstack'])
            return keystone_ip
   …

I’m going to comment this ELSE statement for my deployment

Tags: provisioning
Jeba Paulaiyan (jebap)
information type: Proprietary → Public
Revision history for this message
Ignatious Johnson Christopher (ijohnson-x) wrote :

As per the current FAB design, We specify 'openstack' in env.roledefs, even during execution of setup_wihtout_tasks. This is a minimum requirement, because openstack ip's are used in many other FAB tasks(retreived from roledefs). FAB doesn't uses openstack ip's to login to openstack node and configure. It is used just to populate contrail config files.

So this is not a bug, Exepected behaviour

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.