Methods for executing commands/scripts and upload
files to remote host via ssh of sshutils.SSH class
were rewritten using the paramiko lib.
Related: blueprint serverdto-ssh
Change-Id: I1786d5c4d4b6e9c661ec84785dd9255ab39de4aa
This patch involves the deployment as a new entity that represents all
operations on an installation. Also, this patch only introduce the
deployment on several levels and keeps the legacy logic of the task
workflow. So, it's not the separation but only preparation for that.
The copy of log_task_wrapper was created to use the legacy approach of
logging.
Removed unused statuses from the class rally.consts._TaskStatus, some of
them moved to the rallyconsts._DeployStatus.
Change-Id: Ibb90977e68dcd8ba1224b1ff6951d2c0bd7dbf9e
Implements: blueprint independent-deploy
The patch improves the benchmark config format in that it moves some technical
parameters for each scenario run (like "times", "tenants" etc.) in a special
"config" section and also renames the "concurrent" parameter to "active_users",
which is way more clear for the end-user.
A typical benchmark config now would look like this:
"benchmark": {
"NovaServers.boot_and_delete_server": [
{"args": {"flavor_id": 1,
"image_id": "73257560-c59b-4275-a1ec-ab140e5b9979"},
"execution": "continuous",
"config": {"times": 10, "active_users": 2,
"tenants": 3, "users_per_tenant": 2}}
]
}
The new mandatory "execution" parameter indicates the means of scenario
execution and can now be set to only one value, namely "continuous". Another
execution type, "periodic", will be implemented in another patch.
The patch also improves unittest coverage for possible benchmark config issues
and replaces some nested mock calls with a better wrapper syntax.
Blueprint flexible-benchmark-config
Change-Id: Iabc90838aa8ad9cb44d73892852ed21c652ad274
This patch fixes of updating rally.objects.{Task|Deployment} objects.
Now, objects have got a correct update of an encapsulated value of
internal representation of objects.
Change-Id: Iad775974c75bf28a83631753894eceafef06f6ab
Implements: blueprint independent-deploy
The objects have got a similar interface methods: __init__, get, delete,
delete_by_uuid. The API of DB was also changed.
Change-Id: I7c5962c14b2dd701b9c474d8c5cd8b5198621dd5
Implements: blueprint independent-deploy
The task failed when engine not found at EngineFactory.get_engine.
Change-Id: Ic0837977573b23d47bec44d2c40839c9a5d2b8c2
Implements: blueprint independent-deploy
In course of time, apt database goes outdated, and 404 errors occured
when attempting to apt-get install. So, before doing apt-get install,
apt-get update is needed.
Change-Id: Ibe79b692d33e641d8c521c4ef58c5db7e991536a
The db.deploy module contains the Deployment class with an abstract
methods. Those methods provides high levels operations on the
deployments.
Change-Id: Ibca797832ebbc96247703cdfc8b0958d10a71ddd
Implements: blueprint independent-deploy
This patch is the first step of the separation of deployments from
tasks. The Deployment model represents an installation of OpenStack.
This model is related with the Task model through a many-to-one
relation. Now the relattion is optional because Task.deployment_uuid can
be nullable. It will be fixed in next patches.
The db.api was extended by a deployment function. The functions provide
operations to create, get, update and delete deployments.
This patch also adds index for the field uuid of the Task model.
Change-Id: I41bef0ccebdc27cd97b1db663ff3d8a9f0a5509d
Implements: blueprint independent-deploy
This patch fixes the broken "test_start" test that not cleans a monkey
patched of rally.orchestartor.api.start_task method.
Change-Id: Ic38f98c2b651b19a7ddf10cec98a86ec700b089a
Closes-Bug: #1250981
Btrfs snapshots will provide fast cloning with very small
initial disk usage.
blueprint lxc-engine
Change-Id: I9d7524c67e5f16be6419fca6c968f50f53c900f6
Move prepare_host method from LxcProvider to LxcContainer.
Also make code some more clean.
Added configure_container.sh script which make initial
configuration within container.
Removed LxcProviderStaticIpTestCase. Now all provider's code
is covered in LxcProviderTestCase.
blueprint multihost-deploy
Change-Id: Icfe483d61deeadf3afae2eef2b74cdb1770c2a70
1) Rename sample-task.json to sample-task-boot-and-delete.json to be more
specific; also restructure it a bit to bring it into compliance with
sample-task-soft-reboot.json;
2) Add sample-cloud-verification.json that shows how to use verification.
Blueprint rally-docs
Change-Id: I8fa4f92c74ec49d8637cba131c9cd309028dc73a
The task is removed together with related results. In addition to the
removal operation the change contains atomistic DB API method to
retrieve results of a task.
bp cli-task-improve
Change-Id: I58f10e28a8d12a63f903bb26b2ef464719ad8f0b
This patch adds a helper sleep_between() method to the base.Scenario class
thus enabling the subscenarios to use it. The method performs a time.sleep()
call for a random amount of seconds from the given range and also counts the
amount of seconds slept to take them to account while calculating the running
time of a scenario.
Here also the NovaServers.boot_and_delete_server gets changed using the new
sleep_between method(): it can now (optionally) perform a sleep between
booting and deleting a server.
Blueprint benchmark-scenarios
Change-Id: I2a76dadbd8413cef0650c2af7cf5125188cb35ba
Got following issues with Fedora and CentOS:
* only tcp port 22 is open by default
* requiretty is true in sudoers
* no /sbin in $PATH
Change-Id: I7467864059512c1aee2645c0cba46a80db7a055b
Fixes rally NovaServers.boot_server benchmark bug which occurs due to
invalid attribute reference of the classes nova client. This bug appears
to have been introduced when rally switched a dict based set of clients.
The updates herein also permit the boot_server benchmark to function if
no networks are created on the Cloud. In this case the boot call does
not pass down a nic to provision.
This commit also includes boot_server unit tests to provide (obviously)
missing coverage for the benchmark method.
Closes-Bug: #1246407
Change-Id: Id8ca25f5060074a57ff97f1bfa54454dcc30654f
Implements a benchmark scenario which will boot a server and then
"bounce" it with specified operations: stop/start, soft reboot and hard
reboot.
A builder utility class is also provided which permits callers define,
bind, validate and build wrapper functions which encapsulate
calling an action method 1 or more times.
Partial implementation of blueprint benchmark-scenarios
Change-Id: I3cfba5c1ad1aff614027f52c13ebb63a420f4a2b
The soft deletion of objects in data store is not suitable for the
benchmark. The testing results became irrelevant after removal.
The rally.db.api.task_list ceases to support the active parameter.
Implements: blueprint rally-hard-delete
Change-Id: Ia9477423cebd26499e968f923961ee0f29685d8a
1. Create openstack clients in the ScenarioRunner.run method, i.e. one time
for all scenario loops (speedup);
2. Get rid of the useless Scenario.class_init() method
3. Move cleanup inside the scenario loop run to enable the cleanup
implementations to delete the user's resources the scenario was run with;
Blueprint test-engine
Change-Id: I7f8d439baaf4a86539e6cebe7ac83d8fddcd4a47
Fixes an internmitten py test failure related to File
"tests/serverprovider/test_provider.py", line 64, in
test_get_available_providers. The issue causes the gate jobs to fail on
a patch submission and appears to be a timing error with respect to when
the "inner" test classes ProviderA, ProviderB and ProviderC are visable
in the py runtime.
Change-Id: I74555693135cd69f2d5771de24c410c0bed25244
With this change servers is easy accessible with ssh:
server = ServerDTO(...)
server.ssh.wait() # wait for ssh is available
server.ssh.execute("reboot")
blueprint serverdto-ssh
Change-Id: I15a962927331cec80b63d759a2717b171ca41e6f
Following methods added:
* execute: execute command
* execute_script: execute local script on remote host
* upload: upload file
* wait: wait for ssh is available
Added exceptions SSHException and SSHTimeout
blueprint serverdto-ssh
Change-Id: Ibb261e0561e4104f4b41414b53d5a67d8b267a01
Remove start/stop logging message from buisness logic.
Use rally.utils.log_task_wrapper for such purpose.
Implement bp logging
Change-Id: I87b5679d34e3a69d5f6fcf3829e73cce73ca9416
It is more clear to use TestCase for all tests, and DBTestCase for DB tests.
Also removed some strange code from rally/tests.py
Change-Id: Ib0ea34850c4dd5d6671b00114d570650190d09a4
The current implementation of the scenario runner runs all the benchmark
scenarios from the admin account returned in the endpoints config from the
deploy engine. It uses thus only one tenant and one user to emulate all the
load on the cloud which is a bit unrealistic.
This patch allows the user to add "tenants" and "users_per_tenant" parameters
to the test config, like:
"NovaServers.boot_and_delete_server": [
{"args": {"flavor_id": 1,
"image_id": "73257560-c59b-4275-a1ec-ab140e5b9979"},
"times": 10, "concurrent": 2,
"tenants": 3, "users_per_tenant": 2}
]
The scenario runner then creates the necessary amount of temporary tenants and
users and uses them randomly while executing benchmark scenarios.
Blueprint test-engine
Change-Id: I5a85a344ed73242d5b33f7af88e222c049f95dd4
test_lxc_install() testcase eventually fails while running on a local machine
because of a path string issue. This patch fixes this by using os.path.abspath.
Change-Id: I9507469f725772a41378379bf23cbaae1741dcea
To be able to perform some administrative tasks like listing/creating tenants
etc., the keystone client needs to use a public address which is not guaranteed
in case of using the "auth_url" parameter only. This patch adds the "endpoint"
parameter to the input of the keystone client constructor + authenticates the
client on this URL so that it gets fully functional.
Change-Id: I50ef23d4f916de8596aa2fea6f1babdb7742798f
Closes-Bug: #1243273
In this scneario we are going to run a lot of VMs one by one.
Usually one network has about 500 fixed ips (or we will get performance issues)
So if we are going to run 2k vms we should use at least 4 networks.
To simplify configuration of this test. We will by default chose
random network to get ip for vm.
Change-Id: If5d8c52b4f02315be2bcc542baf43cdcc0989316
Mocks unit test sleep to return immediately mitigating any unit test
sleep time taken for the cleanup tests.
Change-Id: I16aead4bbeeb5e90740f6b9bddcff627c8a33cc2