[Launch Instance Fix] - MultiRegion Support / Networks

Bug #1432401 reported by Travis Tripp
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Shaoquan Chen

Bug Description

New Launch instance wizard should not display networks when neutron is not enabled. It needs to account for multi-region differences and the user's currently selected region.

See: https://review.openstack.org/#/c/164359/

To test this in a single environment, ensure that you have neutron setup properly. Then setup a two region environment.

In Horizon openstack_dashboard/local/local_setting.py

Uncomment / add the following (assumes keystone running locally)

AVAILABLE_REGIONS = [
    ('http://127.0.0.1:5000/v2.0', 'RegionOne'),
    ('http://localhost:5000/v2.0', 'RegionTwo'),
]

Use the keystone command line client to get the service list. You'll need the IDs later.

source <devstack-location>/openrc admin admin
keystone service-list

Then create endpoint entries in the keystone service catalog for the second region. In that region do not add an endpoint for neutron. The following shell script will accomplish this. Just replace the id's appropriately from the service list above.

Then in horizon, login with RegionOne.
Open Launch Instance.
Observe networks step loads properly (assuming you actually have neutron)
Use the project / region select on top toolbar to switch to RegionTwo.
 - Do no use the far right one
Launch instance.
Observe that network step is no longer available.

PLEASE NOTE, it will fail to actually launch in region two unless you actually setup a real nova region with nova networking enabled. In other words, this is just to emulate two regions.

----------- Shell script below for creating endpoints ---------
#!/bin/bash
region_name=RegionTwo
compute_svc=<replace with service id>
computev2_1_svc=<replace with service id>
network_svc=<replace with service id>
image_svc=<replace with service id>
volume_svc=<replace with service id>
volumev2_svc=<replace with service id>

# keystone endpoint-get --service compute
keystone endpoint-create --region $region_name --service $compute_svc --publicurl 'http://localhost:8774/v2/$(tenant_id)s' --adminurl 'http://localhost:8774/v2/$(tenant_id)s' --internalurl 'http://localhost:8774/v2/$(tenant_id)s'

# compute v2.1
keystone endpoint-create --region $region_name --service $computev2_1_svc --publicurl 'http://localhost:8774/v2.1/$(tenant_id)s' --adminurl 'http://localhost:8774/v2.1/$(tenant_id)s' --internalurl 'http://localhost:8774/v2.1/$(tenant_id)s'

# image
keystone endpoint-create --region $region_name --service $image_svc --publicurl 'http://127.0.0.1:9292' --adminurl 'http://127.0.0.1:9292' --internalurl 'http://127.0.0.1:9292'

# volume
keystone endpoint-create --region $region_name --service $volume_svc --publicurl 'http://localhost:8776/v1/$(tenant_id)s' --adminurl 'http://localhost:8776/v1/$(tenant_id)s' --internalurl 'http://localhost:8776/v1/$(tenant_id)s'

# volume v2
keystone endpoint-create --region $region_name --service $volumev2_svc --publicurl 'http://localhost:8776/v2/$(tenant_id)s' --adminurl 'http://localhost:8776/v2/$(tenant_id)s' --internalurl 'http://localhost:8776/v2/$(tenant_id)s'

#network Uncomment following to also create network endpoint
#keystone endpoint-create --region $region_name --service $network_svc --publicurl 'http://localhost:9696' --adminurl 'http://localhost:9696' --internalurl 'http://localhost:9696'

Changed in horizon:
status: New → In Progress
assignee: nobody → Travis Tripp (travis-tripp)
Changed in horizon:
assignee: Travis Tripp (travis-tripp) → Shaoquan Chen (sean-chen2)
Changed in horizon:
assignee: Shaoquan Chen (sean-chen2) → Brian Tully (brian-tully)
Changed in horizon:
assignee: Brian Tully (brian-tully) → nobody
assignee: nobody → Brian Tully (brian-tully)
Changed in horizon:
assignee: Brian Tully (brian-tully) → Shaoquan Chen (sean-chen2)
Changed in horizon:
assignee: Shaoquan Chen (sean-chen2) → Brian Tully (brian-tully)
Changed in horizon:
assignee: Brian Tully (brian-tully) → Shaoquan Chen (sean-chen2)
summary: - New Launch instance wizard should not display networks when neutron is
- not enabled.
+ [Launch Instance Fix] Should not display networks when neutron is not
+ enabled
Changed in horizon:
assignee: Shaoquan Chen (sean-chen2) → Travis Tripp (travis-tripp)
Changed in horizon:
assignee: Travis Tripp (travis-tripp) → Shaoquan Chen (sean-chen2)
Changed in horizon:
assignee: Shaoquan Chen (sean-chen2) → Travis Tripp (travis-tripp)
Changed in horizon:
assignee: Travis Tripp (travis-tripp) → Richard Jones (r1chardj0n3s)
Changed in horizon:
assignee: Richard Jones (r1chardj0n3s) → Travis Tripp (travis-tripp)
description: updated
summary: - [Launch Instance Fix] Should not display networks when neutron is not
- enabled
+ [Launch Instance Fix] - MultiRegion Support / Networks
description: updated
description: updated
Changed in horizon:
assignee: Travis Tripp (travis-tripp) → Brian Tully (brian-tully)
Changed in horizon:
assignee: Brian Tully (brian-tully) → Travis Tripp (travis-tripp)
Changed in horizon:
assignee: Travis Tripp (travis-tripp) → Shaoquan Chen (sean-chen2)
Changed in horizon:
assignee: Shaoquan Chen (sean-chen2) → Travis Tripp (travis-tripp)
Changed in horizon:
assignee: Travis Tripp (travis-tripp) → Shaoquan Chen (sean-chen2)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/164359
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=2d548313cc58bd47026930924dd4df222f87d362
Submitter: Jenkins
Branch: master

commit 2d548313cc58bd47026930924dd4df222f87d362
Author: Travis Tripp <email address hidden>
Date: Sat Mar 7 00:01:13 2015 -0700

    Launch Instance - MultiRegion Support / Networks

    This makes it so that networks are only provided
    if the network service is enabled.

    This bugfix also adds multi-region support.

    Details on how to setup a multi-region test
    to verify it in horizon are in the bug.

    Closes-Bug: #1432401
    Co-Authored-By: Shaoquan Chen <email address hidden>
    Co-Authored-By: Brian Tully <email address hidden>
    Co-Authored-By: Richard Jones <email address hidden>
    Change-Id: I4e98c18b579eb5fc9e1b76ddf57d22142a7ddeab

Changed in horizon:
status: In Progress → Fix Committed
Akihiro Motoki (amotoki)
Changed in horizon:
milestone: none → kilo-rc1
David Lyle (david-lyle)
Changed in horizon:
importance: Undecided → High
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: kilo-rc1 → 2015.1.0
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.