Commit Graph

44 Commits

Author SHA1 Message Date
Pierre Riteau 34b848aff2 Use configured endpoint type in url_for
The url_for function was defaulting to the public endpoint if no
specific endpoint type was passed as argument.

Also switch from admin to internal keystone endpoint by default and
replace use of a hardcoded endpoint type by the corresponding
configuration option.

As explained in [1], a recent devstack change switched off the creation
of an admin endpoint for keystone. Now that we support configuring
endpoint types, switch to using the public interface for keystone when
deploying blazar with devstack.

[1] https://review.opendev.org/c/openstack/blazar/+/816627

Change-Id: If20c20f6cfb6aa23cb6e19020301bf59044aa79c
2022-02-11 10:58:48 +01:00
Zuul 9a37ded919 Merge "Switch to using internal endpoints" 2022-02-10 17:11:50 +00:00
Pierre Riteau 77e0d4a007 Switch to using internal endpoints
This commit makes endpoint types configurable and uses the internal
endpoint as default for Blazar, except admin for reaching keystone to
keep legacy behaviour for now.

Update devstack configuration to use public endpoints, since internal
endpoints are not created by devstack anymore (except for keystone).

Change-Id: I6414be91a1b629df680641050cfd415252b0a3c5
Closes-Bug: #1960335
2022-02-10 13:44:48 +01:00
Pierre Riteau 4064f0eabd Update Nova scheduler filter configuration
Synchronise with default enabled_filters: RetryFilter and RamFilter were
removed from Nova. Also remove filters which were only required by
earlier implementations of instance reservation.

Change-Id: I7f60008d995266bda6d6880a952649f9b6477e3c
2022-02-07 15:33:52 +01:00
Pierre Riteau f055bbb5e9 CI: Fix breakage following devstack changes
A recent devstack change [1] has dropped all KEYSTONE_AUTH_* variables
except KEYSTONE_AUTH_URI. Use KEYSTONE_SERVICE_* variables instead.

Another change [2] switched off the creation of an admin endpoint for
keystone, which we need. Create it again until we update Blazar to stop
using it.

The devstack plugin was creating a keystonev3 service with endpoints
using port 5000. However, we have been using the main keystone service
on port 80 since commit 2d0cabb17d.
Update service name/type and endpoint URLs accordingly.

[1] https://review.opendev.org/c/openstack/devstack/+/735472
[2] https://review.opendev.org/c/openstack/devstack/+/777345

Change-Id: I5fdd5e6095e579e2584984870932284afd7cb934
2021-11-05 14:46:57 +01:00
Ghanshyam Mann ca1e5ffc62 Fix uwsgi path location
After fixing the uwsgi installation from source and uwsgi path
location on devstack side, we need to apply the same fix in
devstack plugins side too.

- https://review.opendev.org/#/c/577779/

NOTE(priteau): Enable Zuul jobs that were disabled in commit
fe0fea186a now that they are passing.

Change-Id: I93a945f10cf2b8d8c16d43ee80f9a03d8acf4328
Related-Bug: #1883468
2020-06-26 12:12:41 +02:00
Pierre Riteau b0b6e78ad3 Clean up DevStack plugin
* Replace use of deprecated function configure_auth_token_middleware
* Remove PKI configuration
* Remove support for non-RabbitMQ messaging

Change-Id: Ieb35df4d1d4af8f229b48bc86a707feb99a0f27f
2020-01-10 08:22:01 +00:00
Zuul edba1b37b7 Merge "[train][goal] Define new blazar-devstack-dsvm-ipv6-only job" 2019-09-27 10:37:18 +00:00
Ghanshyam Mann 584188dbcb [train][goal] Define new blazar-devstack-dsvm-ipv6-only job
As part of Train community goal 'Support IPv6-Only Deployments and
Testing' [1], we need to define the integration job which deploy
services on IPv6 and perform testing to make sure service listen and
communicate over IPv6 properly.

Blazar has legacy zuul jobs only so base zuulv3 IPv6 job 'devstack-ipv6'
and 'devstack-tempest-ipv6' cannot be used and we have to copy the whole
run.yaml to set the IPv6 setting and run the IPv6 verification script
via post_test_hook.

This commit adds the new job 'blazar-devstack-dsvm-ipv6-only' run on
gate and set the required IPv6 setting'.

It also updates Blazar code so that [DEFAULT]/os_auth_host is bracketed
when used to build URLs, as required for IPv6 addresses.

[1] https://governance.openstack.org/tc/goals/train/ipv6-support-and-testing.html

Change-Id: I9a598f591d3fbb40c90be5bd12913b851aff2c9f
Co-Authored-By: Pierre Riteau <pierre@stackhpc.com>
Story: #2005477
Task: #35882
2019-09-21 14:35:47 +00:00
Tetsuro Nakamura e7880088a0 Show global request ID in DevStack environment
Work in https://review.opendev.org/#/c/669079 enabled global request ID
in the debug log, but the global request ID is not shown by the default
log configuration which is used in the DevStack environment.

This patch changes the DevStack plugin to let Blazar use the same
logging configuration as other major services, enabling the global
request ID to show up in the debug log.

Change-Id: I343a7ccff82475f3aadb27d6ed741ac9b0ad2ef1
2019-09-06 15:50:20 +02:00
Tetsuro Nakamura 86a83a3dda Add floatingip plugin in devstack
Floating-ip plugin is partially supported in Stein release, but it is
not enabled by default for environment built by devstack because of
lack of the plugin configuration in blazar.conf file.

This patch adds the new plugin to the configuration file in
devstack environment.

Change-Id: Ifd43c21ccefbbe643849a8a825e61eb8bb63bd9c
Blueprint: floatingip-reservation
2019-05-27 08:58:48 +00:00
Pierre Riteau ef9764e3ca Update config group for option aggregate_freepool_name
The option "aggregate_freepool_name" from group "physical:host" is
deprecated. We need to use the option "aggregate_freepool_name" from
group "nova" instead.

Change-Id: Ib2566eed3385dc6a4fee581fa2cd025974c808e8
2018-11-26 18:33:16 +00:00
Zuul 455c209279 Merge "Support blazar-dashboard installation in DevStack" 2018-07-10 11:06:35 +00:00
Masahito Muroi 6b7b59f9ce Support blazar-dashboard installation in DevStack
Change-Id: I3311ada0f4be3ace6833d1d472b52eba800b5e03
2018-07-09 17:59:34 +00:00
Pierre Riteau 5914e22de4 Use the full OpenStackClient option name to specify region
Change-Id: I5b0945a23efe96b481e08871e87c988c8f63a224
2018-07-04 14:33:00 +01:00
Hiroaki Kobayashi 99cb6b5199 Register and document policy in code
This patch moves default policy definitions from file-based maintenance
to registering them in code following OpenStack standard[1].

[1] https://governance.openstack.org/tc/goals/queens/policy-in-code.html

Change-Id: I47afa929ebfa30e17c2dbeac31108ecbab67f067
Implements: blueprint policy-in-code
2018-06-11 17:36:13 +09:00
Zuul a9a202c86d Merge "Remove use of unsupported TEMPEST_SERVICES variable" 2018-03-01 12:48:51 +00:00
Pierre Riteau b43e7244e7 Allow DevStack to install Blazar projects as Python 3 packages
Without this setting they are installed as Python 2 packages.

Partially implements: blueprint python-3
Change-Id: I1365ae23702abe81a82ba8c821788b1eeab62daf
2018-02-02 18:36:14 +00:00
ghanshyam 3eb08cf460 Remove use of unsupported TEMPEST_SERVICES variable
TEMPEST_SERVICES global variable is not supported
by devstack since long back.
- I380dd20e5ed716a0bdf92aa02c3730359b8136e4
- I9c24705e494689f09a885eb0a640efd50db33fcf

This commit removes the unused TEMPEST_SERVICES setting
Related-Bug: #1743688

Change-Id: I1fe2b6161494648cd8d08860afcab1551e64bae2
2018-02-02 08:14:12 +00:00
Masahito Muroi 52d631472c Support DevStack installation with WSGI
This patch enables DevStack to deploy the blazar-api process as
a WSGI process. uWSGI deployment is enabled by default.

Partially Implements: blueprint deploy-api-in-wsgi
Change-Id: Ifc0810e51fb4ccdefe97d11ec14df2306afaa328
2017-12-15 17:55:54 +09:00
Zuul e42d8c6599 Merge "Add support for multi-region deployments" 2017-10-16 03:08:02 +00:00
Jenkins 4a099fd217 Merge "Remove verbose configuration parameter from DevStack plugin" 2017-10-06 01:53:15 +00:00
Pierre Riteau eec558da8d Add support for multi-region deployments
In multi-region deployments using a shared Keystone, with each region
using its own Blazar and Nova services, Blazar could not be configured
to be part of a specific region. It would use the first endpoint found
in the service catalog. As a result, Blazar in RegionTwo would try to
manage Nova hosts and aggregates in RegionOne.

This patch adds a new configuration option called os_region_name in the
[DEFAULT] section. If set, Blazar looks up the right endpoints for its
region. The DevStack plugin is also updated to use the correct region
and Keystone host (which is otherwise set to the default of 127.0.0.1).

Change-Id: I0e548103dbd3d50af366ad5c19c98724e22bdc3d
Closes-Bug: #1694754
2017-10-03 13:01:13 +01:00
Hiroaki Kobayashi 2f2f42651f Fix filter scheduler settings in DevStack plugin
Some necessary scheduler filters for instance reservation are not
enabled by the DevStack plugin. This patch fixes the problem.

Change-Id: I07a959b36578f3ec9188f5b86593bbbba6370b58
Closes-Bug: #1719278
2017-09-27 02:41:31 +00:00
Pierre Riteau dbe6c7f59e Remove verbose configuration parameter from DevStack plugin
Even though the verbose option has been removed from oslo.log for
several months, our DevStack plugin was still setting the verbose
configuration parameter for blazar.conf. This patch removes it.

Change-Id: I3d60e863951b7a97c8d07a6a5c52a513930266b4
2017-09-18 15:29:39 +01:00
Pierre Riteau 8ad244987c Clean up DevStack plugin code
This patch fixes typos and removes code that is uncessary since commit
9d5265ea82d5375bfbe49706459ba782ac6c448d was merged in blazar-nova.

Change-Id: Ibd53ad4a602ef2273feea35df1c2a49083e4cd67
2017-08-22 15:02:06 +01:00
Masahito Muroi 901a5d3d52 Enable DevStack to set up the new instance reservation feature
Partially implements: blueprint new-instance-reservation

Change-Id: Ic0f09e29b435aa0d563733872f1e2b1ea92259de
2017-08-07 10:55:29 +00:00
Jenkins 206394d47a Merge "Change the default value for the config blazar_az_prefix" 2017-07-03 03:14:23 +00:00
Masahito Muroi 31f88379b8 Remove the old instance reservation plugin
The old instance reservation feature is not supported from the
Ocata release of Blazar, since it relies on the v2 API of Nova
with has been removed. Additionally, the Blazar project has
started to implement a new instance reservation feature which
doesn't rely on deprecated Nova APIs.

This patch removes the old instance reservation plugin. If a
deployer specifies 'basic.vm.plugin' in the plugins config
parameter, the blazar-manager service will fail to start.

Partially implements: blueprint new-instance-reservation

Change-Id: If5b0efb4910b05cc3c2881bb705953528895f277
2017-06-27 17:32:24 +00:00
Hiroaki Kobayashi 683ab4ce5d Change the default value for the config blazar_az_prefix
Current default value for the config 'blazar_az_prefix' is 'blazar:'.
However, ':' should not be included in the name of availability zones.

According to the parse_availability_zone() [1] of the API class of Nova,
there is a legacy hack to allow admins to specify hosts via an
availability zone using az:host:node. That means ':' cannot be included
in the name of an availability zone itself. But Nova accepts the
invalid name with ':'. That is reported as a bug [2].

This patch changes the default value for the config blazar_az_prefix
from 'blazar:' to 'blazar_' which does not use ':'.

[1] https://review.openstack.org/gitweb?p=openstack/nova.git;a=blob;f=nova/compute/api.py;h=46ed8e91fcc16f3755fd6a5e2e4a6d54f990cb8b;hb=HEAD#l561
[2] https://bugs.launchpad.net/nova/+bug/1695861

Partial-Bug: #1695862
Change-Id: Iaff0b8e576dbcb56b89384ea236c3f121d4ffad1
2017-06-08 15:59:52 +09:00
Pierre Riteau 3de6f73e92 Fix physical host reservation for non-admin users
Originally, Blazar was using its service user to manage objects for
physical host reservation, e.g. host aggregates, which by default
requires admin rights. Commit 16d5f67ba7
started using a dedicated account configured with values
climate_username, climate_password, and climate_tenant_name. Commit
c9b7307cf3 removed this dedicated account
and started using trusts instead, so that operations were performed on
behalf of the user creating the lease (with the trustee being the blazar
service user).

While this works well if users creating leases are admins, non-admin
users will get errors because the default Nova policy prevents them from
running required operations associated with aggregates and hypervisors.

Since it is not clear why a dedicated account for admin operations was
required, this patch brings back the approach used before commit
16d5f67ba7, which was to use the service
account for admin operations. This allows non-admin users to create
Blazar leases.

The nova client setup is updated to authenticate against Keystone v3.

Change-Id: Iad86bb549aec13edd662965d2f91b68c856ae06c
Closes-Bug: #1663204
2017-06-02 16:00:54 +09:00
Pierre Riteau b9e5a33c66 Fix management of Blazar services by DevStack
Calls to screen_it and screen_stop should be replaced by run_process and
stop_process, as in Ia3843818014f7c6c7526ef3aa9676bbddb8a85ca. While
this code worked fine with screen, DevStack now defaults to managing
services with systemd.

This patch ensures Blazar services are correctly launched and stopped,
whether using systemd or screen.

Change-Id: I99744a2e2adc46682f2ff78bdf0b09608d83d9c2
Closes-Bug: #1691425
2017-05-17 12:45:44 +01:00
Hiroki Ito 2d0cabb17d Change keystone_authtoken configs
Blazar uses os_auth_host, os_auth_port and os_auth_version to the auth
uri for now. However, current approach can not be applied to uri with some
prefixes such like "http://127.0.0.1/identity".

In this patch, authentification is executed by using "keystone_authtoken"
configs. This patch enables us to use any forms of auth uri.

Closes-Bug: #1681419
Change-Id: I7c8728593ecf503b23d742a5f464af8a2a6e5253
2017-05-16 10:13:41 +00:00
Hiroaki Kobayashi 629d37c090 Change filter name in DevStack plugin
The Blazar-specific Nova scheduler filter is automatically enabled by
the DevStack installation script. This patch changes the filter name
from ClimateFilter to BlazarFilter.

Change-Id: I63698f6aa9a9785c7e14b599d8a930a4b369d429
2017-03-06 01:26:21 +00:00
Masahito Muroi 68d769bf71 Migrate climate namespace to blazar
Although the Climate project was renamed to Blazar in 2014, the code has
still been using the climate namespace.

This patch moves all code to the blazar directory and allows users and
operators to use the 'blazar' command namespace. The 'climate' namespace
remains O release to allow users of Blazar time to move their own
code to the blazar namespace, but will be removed in P release
development cycle.

Change-Id: Icbe6fab1051aae4ac819982a1fa4f323cb0bf2d0
Partial-Bug: #1662734
2017-03-02 09:36:14 +00:00
Jenkins e583820791 Merge "Enable DevStack to set Keystone service name in config" 2017-02-06 01:37:25 +00:00
Masahito Muroi 7019dc736b Enable DevStack to set Keystone service name in config
With default DevStack settings, the Keystone service name is defined as
'identity'. However, Blazar expects it to be 'identityv3' by default. It
is used to get the corresponding Keystone endpoint from the service
catalog.

This patch makes the value configurable, which Jenkins jobs can use to
set the Keystone service name.

Change-Id: I9fdd4207d31364697e9721db5ea96ccc34efbbe7
2017-02-03 10:48:47 +00:00
Jenkins b4364d9844 Merge "Fix service and endpoint creation in DevStack" 2017-01-31 10:17:56 +00:00
Jenkins 09b54f4e66 Merge "Use filter_scheduler config keys" 2017-01-25 16:14:20 +00:00
Masahito Muroi 5c9fd94c00 Use filter_scheduler config keys
scheduler_available_filters and scheduler_default_filters are deprecated
in Nova. Current config keys are available_filters and enabled_filters
under the filter_scheduler group.

Change-Id: Id53a2dc0dbbd90068b10d89873bba03ef4008155
2017-01-25 15:42:54 +00:00
Pierre Riteau 5111ffb5c2 Remove osapi_compute_extension configuration
The Nova config option osapi_compute_extension was deprecated in Mitaka.
Hence this option was completely removed in Newton, as v2 API was
removed and v2.1 API doesn't provide the option of configuring
extensions.

Change-Id: I53dd6a2653fe2c53658ca69bd70ac7dfaf0225ce
2017-01-24 10:12:54 +00:00
Pierre Riteau e0621c9b62 Fix service and endpoint creation in DevStack
DevStack removed support for specifying a Keystone catalog backend other
than sql in commit 985e958dda3e843442f76199caf63fa8b93680cc. However,
the variable KEYSTONE_CATALOG_BACKEND was still set, which meant the
blazar service and endpoint were still being created.

This variable was removed in fb73d85afe7df7b93b9a460372a8ad6558e887e0
which results in our DevStack plugin not creating the blazar service and
endpoint anymore.

Create service and endpoint unconditionally instead.

Note that the code creating a Keystone v3 service and endpoint is kept
even though Keystone v3 is now the default in DevStack. This is because
the Keystone endpoint in DevStack is now unversioned, which is not yet
supported by Blazar. We need Keystone v3 to use trusts.

Depends-On: I542461e609866b21f597b0c4a2954807c5b8f8b7
Change-Id: I76aea67f4b00d038e56b9f67ad0af0c5328b249c
2017-01-24 05:07:53 +00:00
Pierre Riteau c6f75760de Make DevStack create a freepool aggregate
Creating the Nova host aggregate used by Blazar as freepool for host
reservation was done automatically by the old extras.d plugin, but this
functionality was not migrated to the new DevStack plugin.

This commit creates the freepool before starting Blazar services. It
also uses the openstack client rather than the nova command.

Change-Id: Ifc6555855342ee274e01b1f1bc3ace913403d50a
2017-01-23 11:15:44 +00:00
Ildiko Vancsa b9213099bb Create Devstack plugin
Change-Id: I982c8441f61aea57da466315fc08c172865a05b6
2016-02-04 10:52:01 +01:00