* In order to complete the tempest plugin split goal, we need to
refactor the blazar tempest plugin so that we can easily consume.
* use six.moves import range instead xrange to avoid flake8 error
Change-Id: I88f2a961d770d6deebd9af567d6407e677c102ae
When the user specifies end_time and executes update API,
check that resources are correctly released at lease end time.
It confirm that the instance created during the lease period
have been removed by lease end.
Change-Id: Ic1076905ad5f2fc894036b045743eacb5c2db9bd
Partial-bug: #1694181
scenario manager in tempest plugin was copied from
Tempest to avoid any plugin break.
This copied version of scenario manager is using lot of
Tempest interfaces. Many of them are not stable and might
change which can break plugin.
For example - https://review.openstack.org/#/c/503875/3
This commit shrinks the scenario manager copy to keep
only required methods.
Change-Id: I1a3b654afed303bdea77177d18aa294fd6d00d7d
The reserved host for blazar users are released when the lease expires,
and host aggregate that created for Blazar is deleted.
Check the instance created during the expiration has been removed
by release of host.
Change-Id: Ied3c766a1d7d839eb4301b494e4b35c75151f242
Partial-bug: #1694181
Eventlet monkey patching needs to be done as early as possible,
otherwise previous library imports are not patched correctly. This fixes
issues with concurrent requests receiving a 500 Internal Server Error
with a traceback including the following message:
AttributeError: 'function' object has no attribute 'get'
This commit also adds a new Tempest scenario to test for this issue by
running concurrent requests against the Blazar service.
Change-Id: I9be2b6787a151d54ca9cce5c91fa9e11e727ce0b
In tempest, alias 'admin_manager' has been moved to 'os_admin'
in version Pike, and it will be removed in version Queens [1].
[1] https://review.openstack.org/#/c/467852/
Change-Id: Ia4db56b3561f5019a61abdc8650729b7777c1289
The code deleting instances when leases end runs Nova queries as the
Blazar service user. Because it was not using the optional all_tenants
parameter, the query would only return instances owned by the service
project.
This commit sets the all_tenants parameter, allowing the query to return
all existing instances on the host no matter which project started them.
It also extends the Tempest host reservation scenario to delete the
lease and verifies that the instance is correctly terminated.
Change-Id: I6fed0ca12505c94a709f8070dfc6e26d2093345f
Closes-Bug: #1699107
This reverts commit 124ac0557a.
The root cause of the gate issue is fixed in Nova
I142f97d691fa55e9824714c9c224f998ad72337e.
Change-Id: I50081d615b1d47215e1e35e62ac2cb14fb1c63ad
The function 'tempest.test.attr()' has been moved in Pike to
'tempest.lib.decorators.attr()' and will be removed in a future
version[1]. This patch replaces 'tempest.test.attr()' with
'tempest.lib.decorators.attr().'
[1] Iaafbb112b6eee458089cc49918359a8a8d0485e2
Change-Id: I2598c6ad24fe4df172db56b79f4aaa4a96a2d23e
The host reservation scenario test fails because of a bug in Nova:
https://bugs.launchpad.net/nova/+bug/1693438. This patch is a temporary
workaround until the issue is fixed in Nova.
Change-Id: I50b6c92ab930f70479f4524ea675509019567f6a
The QA team will refactor scenario tests in Pike. They asked all
projects which use tempest.scenario.manager to hold a copy of the file
in a projects tree[1].
This patch copy the file into blazar tree.
Note: We should migrate to consume Tempest stable interfaces and remove
the file (contrib/tempest/tempest/scenario/manager_freeze.py) in the
future.
[1] http://lists.openstack.org/pipermail/openstack-dev/2017-February/112938.html
Change-Id: I66f3652ef6322c89f418ca91b321ff766514e099
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
The existing Tempest scenario test in Blazar only supports instance
reservation. However, the Blazar service currently only supports host
reservations.
This patch adds a Tempest scenario test for host reservation. It checks
that Blazar correctly reserves a host for a reservation and that an
instance created with the reservation ID as scheduler hint is correctly
scheduled to the host.
Change-Id: Ibbf33ff6344bdc26e005e1fa4252c317fdbdfb90
Closes-Bug: #1659216
test.call_until_true has been deprecated since Newton on Tempest side,
and now Tempest provides test_utils.call_until_true as the stable
library method. So this patch switches to use the stable method before
removing old test.call_until_true on Tempest side.
Change-Id: Ifa2b736c566d178ef7f5aa10056381f592a813dd
Needed-by: Ide11a7434a4714e5d2211af1803333535f557370
Instance reservation feature in Blazar is now not supported because
of commit 97a4a7e89fbfca53018e096236ea6ed7ab4c0cf2 that stops Nova v2
API to support its API extentions mechanism. It causes the
Tempest gate job to always fail.
Change-Id: I5e515f077b030a85563cc55aeb7e4240627d2f6f
Tempest has changed its test framework, but blazar's scenario test
doesn't follow the changes. It causes some scenario test errors.
This patch makes the blazar's scenario test follow up-to-date Tempest
framework.
Change-Id: I1bfe5c5fc61c8036d3e016f3efb8ec2703745848
Depends-On: I0e57f4ee4655a8658419bfaaffad524369ee10b9
It's better not to use python-client for API testing in gate since
if both server side and client side use the wrong schema and so on,
gate test can't detect the error.
Change-Id: I87b5fccd6354e3725f615fb67b3eea0083a80407
Tempest removed the oslo-incubator logging module from their
code base in March 2015. Our tempest tests were still using it,
which was causing import errors.
Change-Id: I3bb9a832cd9c9c2b4136cb5ce20d06dbb8f2c837
Since Blazar was in Winter, lots of tech debt was added.
This big change is actually trying to provide a +1 from Jenkins voting jobs.
ie.
- fix calls to oslo_config
- correct unittests failing due to removed assert_called()
- remove pep8 check for verifying blazar.conf (can be readded later)
- fix oslo_messaging imports
Not sure it's fully functional, Tempest needs to be fixed too but I
hope the gate will allow that change to pass.
Change-Id: Ib70b5b48b47626fc2613ee894d1162219417994f
Climate's Devstack library currently uses keystone client to create
users, services and endpoints. Use openstack client instead of keystone
client to create the same. This seems to be the Devstack preferred way
to do these things.
Change-Id: I7f93460903de530ec88274ba43c78316dc7b6316
Closes-Bug: 1312215
References to climate in the docs have been renamed to blazar reflect the new name and enable uploadig docs to readthedocs. Also updated the docs to reference the new architecture image.
Change-Id: I594849afb6268892a03cc716a1707dcde835fa52
Closes-Bug: 1324581
This patch fix a bunch of errors which will arrive after we
will start use new hacking version.
Change-Id: I49721f1ba9f3f017da00212a9fdc5b87d5afaedf
Closes-Bug: #1330536
The __init__ method of the OfficialClientManager Tempest class changed
since we implemented our Tempest test. Now this method receives only one
parameter with all the credentials instead of three (user, password,
project). To fix this the ResourceReservationScenarioTest was modified
to use the new API. Also a not valid import was fixed and some minor
things of the test were fixed.
Change-Id: Ic79bdfb0e85d7a47310978a5c3ebd6a37195795e
Closes-Bug: #1326532
Controllers (and API endpoints) should be able to be selected using
configuration flags, as we do for plugins
TODO:
- Extra Hooks to be configured using stevedore
Implements blueprint: pecan-wsme
Implements blueprint: api-extensions
Change-Id: I12f1bc1accbc870aacb0d1e08c9e0d08223c4b18
The code repo for climate has been change to blazar, but devstack
is still using old climate repo, this caused devstack install failed.
This patch was update the repo to blazar for climate in devstack.
Change-Id: I864aa6e4c4c91fac5521bc63ed984286e1935a22
After climate was installed by devstack, it was changing nova default
scheduler filters:
scheduler_available_filters = climatenova.scheduler.filters.climate_filter.ClimateFilter
scheduler_default_filters = ClimateFilter
But the default scheduler filters for nova is the following after
installed by devstack without climate.
scheduler_available_filters = nova.scheduler.filters.all_filters
scheduler_default_filters = RetryFilter, AvailabilityZoneFilter,
RamFilter, ComputeFilter, ComputeCapabilitiesFilter, ImagePropertiesFilter,
ServerGroupAntiAffinityFilter, ServerGroupAffinityFilter
So after installed devstack with climate, nova scheduler filters should
be as following:
scheduler_available_filters = climatenova.scheduler.filters.climate_filter.ClimateFilter
scheduler_available_filters = nova.scheduler.filters.all_filters
scheduler_default_filters = RetryFilter, AvailabilityZoneFilter,
RamFilter, ComputeFilter, ComputeCapabilitiesFilter, ImagePropertiesFilter,
ServerGroupAntiAffinityFilter, ServerGroupAffinityFilter, ClimateFilter
Change-Id: I74272d3282425baeb96a2862b22a26ab0a35a5df
Closes-Bug: #1316417
Adding infrastructure to support standalone scenario testing
for Climate.
To make it happen, we had to mimic the way that tempest was
handling the scenario tests and since we weren't allow to modify
tempest code, we built a similar hierachy (check manager and scenario
classes and their parents).
As long for the config_resource_reservation file, we added some
params to handle the timeout checks
The test added follow these steps:
1) Create an instance with the hint parameters
* start_date: now + 1 minute
* end_date: start_date + 3 minutes
2) check vm was shelved
3) check vm became active
4) check that a new lease is created on climate
5) check its param
6) wait lease end
7) make sure VM was snapshoted and removed
Test duration: between 3 and 5 minutes
Partially implements: blueprint climate-tempest-testing
Change-Id: I023866ec8f19cfa8fec16c8fb9af4ed014160fe0
The Devstack commit 3317437caca5eb769ab4c6d3ea7c5d3e062517e2 removed
the osapi_compute_extensions configuration option from lib/nova.
This caused that when our Devstack implementation sets this
configuration option, the default value were missed. This default value
is important because is the one that loads all the default Nova
extensions, which causes a lot of HTTP 404 at Nova API.
For this reason, our Devstack implementation was modified in order to
set this default value when this option is not set by any other project.
Change-Id: I04698643ac00b4b52b05f28a6c46522991734fc4
Closes-Bug: #1312368
The configuration that sets the DefaultReservationController as
nova extension in devstack was removed. This configuration made
some tempest test fail because the VMs were not in active state.
Change-Id: I6b12f236db764fd95b2b7a44f4340612cb52d817
Closes-Bug: #1300365
Refernces from tenant to project were made in several
places, including DB, HTTP Headers, configuration items,
json in responses and devstack integration. Additionally,
a migration script using Alembic was included.
Implements: blueprint tenant-to-project-ref
Change-Id: I4b21182f555ccd412a4ca4e0ce753f07edcd07f8
Added support for DB migration using Alembic.
Modified devstack/lib/climate to sync the database during the
configuration of Climate.
Added the actual state of the sqlalchemy models in a migration script.
This will be the first version, and will be used by devstack and the
migration tests.
Added a new console_script to the setup.cfg: climate-db-manage. This is
the CLI is used as a wrapper of the alembic functionality.
Added alembic>=0.4.1 as dependecy.
Added some README with documentation about the DB migrations.
Change-Id: I390ccfac1e436db0b04339e60f9f6795b22b8f7e
Implements: blueprint schema-data-migration-with-alembic
* Install climate, climate-nova and climate client
* Sets all needed climate configs, even the nova ones in order to use
climate-nova
* Starts/Stops climate-api and climate-manager
* Creates the Keystone V3 service/endpoint if don't exists.
Change-Id: I7c5014fc61238206ea589b01f3ec0ecac005d846
Implements: blueprint climate-devstack-gating
Co-Authored-By: Pablo Andres Fuente <pablo.a.fuente@intel.com>