← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1432401] Re: [Launch Instance Fix] - MultiRegion Support / Networks

 

** Changed in: horizon
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1432401

Title:
  [Launch Instance Fix] - MultiRegion Support / Networks

Status in OpenStack Dashboard (Horizon):
  Fix Released

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'

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1432401/+subscriptions


References