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
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
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
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
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
* Replace use of deprecated function configure_auth_token_middleware
* Remove PKI configuration
* Remove support for non-RabbitMQ messaging
Change-Id: Ieb35df4d1d4af8f229b48bc86a707feb99a0f27f
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
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
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
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
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
Without this setting they are installed as Python 2 packages.
Partially implements: blueprint python-3
Change-Id: I1365ae23702abe81a82ba8c821788b1eeab62daf
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
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
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
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
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
This patch fixes typos and removes code that is uncessary since commit
9d5265ea82d5375bfbe49706459ba782ac6c448d was merged in blazar-nova.
Change-Id: Ibd53ad4a602ef2273feea35df1c2a49083e4cd67
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
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
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
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
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
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
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
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
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
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
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
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