A method for specifying 'priority' modules plus a way to rank the order
in which modules are applied has been added. Two new attributes
'priority_apply' and 'apply_order' are available in the payload
on create and update. In addition, an is_admin flag was added as an
automatic attribute, to be set when someone with admin credentials
creates a module or updates an existing module with 'admin-only'
options. This allows better control on the driver plugin
side with regards to security concerns, etc. The attribute is
now passed in to the guest 'apply' interface for use by the driver.
All three of these attributes are stored in the Trove database.
An admin can create a 'non-admin' module by passing in --full_access
on the command line (or python interface). This will cause an
error if any admin-only options are selected.
Scenario tests have been added to verify that the modules are
applied in the correct order. The timestamp for the 'updated'
field on the guest was also enhanced to allow for fractional
seconds, since most applies take less than a second.
The issue where modules were allowed to be applied even if
they belonged to a different datastore has been fixed and
scenario tests added to check for this case.
Change-Id: I7fcd0cf12790564ba62e7d6451fff96f763e539d
Implements: blueprint module-management-ordering
When someone has a pylint config file that has an error such as when a
merge goes bad, loading the file fails, and pylint motors along
happily with the default file (i.e. nothing ignored) and this is
confusing. Unless you happen to catch the little error that it prints
out.
Instead, just bomb out with an error.
Change-Id: Ie94dda35652f2a8f06502af72b68be73d61fc94a
Closes-Bug: 1639040
This is an initial attempt at supporting multiple regions. It should
handle the mechanics of deploying an instance/volume to a remote
region. Additional changes may be required to allow the guest
agent on the instance to connect back to the originating region.
Co-Authored-By: Petr Malik <pmalik@tesora.com>
Change-Id: I780de59dae5f90955139ab8393cf7d59ff3a21f6
Removed downgrade from all existing migrations.
Modified a test that verifies that no migrations have a downgrade.
Modified test _walk_versions to only do upgrades.
Removed exceptions from pylint.config
Related cross-project spec: https://review.openstack.org/152337
Closes-Bug: #1434103
Change-Id: I9a7c87ae3f4e2eff3a4a6df881d086d52062dbba
Postgresql has been implemented differently from
all other guest agents.
This has been causing difficulties with maintenance
and future development of Trove design.
It has been decided (Newton midcycle) to bring the guest agent
in line with others.
This patch set merges all Postgres service modules into
App/Admin classes.
This also resolves 20 pylint issues related to mixin usage.
Change-Id: I1b12a5296c59e9d3b08bcf34ac196d16189d525e
Since the config is not in a deterministic order makes it hard to
compare two config's and see what changed. Personally, I'm not
positive I understand this use-case; i.e. you have an existing config
file, you save it, and then rebuild and then diff the two files. I'd
have thought you'd just run check and the output of the tool was the
diff.
I however do see the value in sorting the file so that when someone
submits a change that includes a change to the config, reviewers can
see more easily what the change is doing.
Similarly, the output from pylint (errors) are generated one file at a
time and os.walk makes no guarantee of deterministic order. So we
should collect all errors (across all files) and then print an ordered
list for human consumption.
The intent is also to make pylint voting soon (in master). the changes
to contributing.rst and tox.ini are to make that easier. The config
file has also been sorted in place.
This change was motivated by an email exchange with Peter so I am
marking him as a co-conspirator.
The line numbers were removed from the tools/trove-pylint.config file
as these would change whenever the line numbers in the file changed
(since they are currently not being used in the comparison; they can
be re-added if deemed necessary at the cost of having every 'rebuild'
run create a different file).
The tools/trove-pylint.config was regenerated as well, since the
remaining two errors seem to be innocuous:
ERROR: trove/taskmanager/manager.py 392: E1101 no-member,
Manager.upgrade: Instance of 'BuiltInstance' has no 'upgrade' member
(new method introduced by instance upgrade; other BuiltInstance
member errors are already ignored.)
and
ERROR: trove/guestagent/datastore/experimental/postgresql/service/
access.py 80: E1101 no-member, PgSqlAccess.list_access: Instance ofi
'PgSqlAccess' has no '_find_user' member
(this is due to the fact that PostgreSQL is spread over multiple
files and pylint should cease to complain once
https://review.openstack.org/#/c/346082/ lands.)
Change-Id: I910c738d3845b7749e57910f76523150ec5a5bff
Closes-Bug: #1625158
Closes-Bug: #1625245
Co-Authored-By: Peter Stachowski <peter@tesora.com>
this is a pylint wrapper for Trove's tox tests. This commit includes a
basic infrastructure for running pylint through tox.
It also fixes some very obvious import errors that are flagged by the
tool. One is to handle missing imports for _ and _LE.
There is one instance where an exception is being raised but
trove.common.exception isn't imported, and another where an exception
is being incorrectly thrown.
A short readme is also provided.
Change-Id: I0a38f5efde3cb491f1f6c27f6c6500ab29987968
Partial-Bug: #1621636
In PY3, print should used as a function instead of a statement.
This is PY27 compatible as well.
For example, instances of the first case were replaced by the
second case:
>>> print 'help'
File "<stdin>", line 1
print 'help'
^
SyntaxError: Missing parentheses in call to 'print'
>>> print('help')
help
Partially implements: blueprint trove-python3
Change-Id: I21de65bc874d0fcfb51714857f8eaa97acb2f51d
Closes-bug: #1594741
Trove does not support Python 2.6 anymore starting with Kilo and might
not work correctly with it, so remove the classifier.
Change-Id: Ida17ce3ce76258442222b591846e1e1717119eed
* rename db_wipe to db_recreate
* make --repo-path an optional argument for db_wipe and use it
* add command line help strings for db_wipe
Closes-Bug: #1279734
Change-Id: I1a1d3ad56989026fb10f6c57bb479814dc51328e
Remove vim setting, Remove line containing:
comment - # vim: tabstop=4 shiftwidth=4 softtabstop=4
at the top of source code files, except for files in
openstack/common.
Change-Id: I5e2aad6dca8407890fc3c2afbda541bd4f124ea8
Closes-Bug: #1229324
PBR/Distribute generates binscripts for us. By moving the
binscript code into the source tree, we can unit test it
as well. Run setup.py develop to generate the binscripts for
development use.
implements blueprint entrypoints-for-binscripts
Change-Id: I9ad4bb4ddc55f64bcd806c588a795cd6e0847aa9
-API controller for backups
-adding swift url to the config
-Fixing failing tests
-Renaming 'instance' param.
Checking for NotFound models so that the returned error is friendly
-adding feature to list all backups from a specific instance
-Adding checks for creating/deleting/restoring backups when it is not completed
-Adding unit tests for backup controller
-adding check to see if file is in swift
-Adding skeleton code for delete backup in the task manager
-Fixed backups API to pass in the backup_id during create_backup.
-adding int tests for backup controller
-Adding backup list and delete int tests
-Adding list backups for instance test
-Adding quota for create backup
BP: https://blueprints.launchpad.net/reddwarf/+spec/consistent-snapshots
Change-Id: I35c2fefcce4b3009e76ba7232c52dabf502a3ac0
* Openstack-ci creates a tarball at tarballs.o.o when tag matches:
ref: ^refs/tags/([0-9]+\.)+[0-9]*
(alpha|beta|candidate|rc|a|b|c|r|g)[0-9]*$
Fixes bug#1131509
Change-Id: I5e3d00c57dfe977f6e9a01dea25b97c8fcdf0d1d
Grant, revoke, list user access.
Change user password and get single user.
Partially implements blueprint modify-users
Change-Id: I0001a7a9d1c527b88a1ed965f0f077c864e602cf
During a migration, waits for the guest and service to start up
following the status change to VERIFY_RESIZE. Confirms if everything
is all right, or reverts if not.
Implements blueprint migration-check-guest-status
Change-Id: Ia7c7ed1fd0070429fed93323ca559d1c0742bd8f
Added unit tests for reddwarf.guestagent.pkg module.
Added tests for package install, remove and version
Changing the test runner of unittests to be run by testr instead of probocis/nose
Remove probocis reference from the dbaas test
Moved dbaas.py to reddwarf/tests/unittests
tracked by bug #1090139
Change-Id: Ia25fbe996d04d39e83edef0369de0e7fccce579e
* Updated logging,cfg,setup to new oslo
* Split out the paste ini from the conf files
* Modified reddwarf-api/server to use new modules
* Modified reddwarf-manage to use new cfg
* Added rpc helper for rpc services
* Modified reddwarf-taskmanager to use rpc helper
* Modified reddwarf-guestagent to use new rpc helper
* Fixed guestagent api to use rpc proxy
* Fixed taskmanager module to conform to new rpc
* Updated guestagent manager/pkg to use new rpc
* Updated api paste to use keystoneclient auth_token
* Updated managers to use periodic tasks
Implements: blueprint reddwarf/upgrade-oslo
Change-Id: I9ad1b441eca855a4304454014ae746ec51bef8f3
pip dropped the -E option as of 1.1; now to install in a virtualenv,
you just explicitly activate the virtualenv. This commit fakes the
same behavior of explicitly specifying a virtualenv for installation
by altering tools/with_venv.sh to optionally take the -E flag
Fixes Bug #1081200
Change-Id: I470ba9563864337b8af2a79ae463e269ba66bf8f
The tests come from the Reddwarf Integration repository. wsgi_intercept
is used to allow the test code to hit the server code directly. It also
properly sets up the SqlLite database before each run.
* Adds an "event simulator" which queues up functions that would
normally be spawned with eventlet. The various sleep functions are
then swapped with a method that runs these faux-events.
* Adds many of the Reddwarf Integration tests. The idea is these
could still run in a richer, real environment, but are running here
enables us to quickly check feature breaks for each commit and
lowers the learning curve necessary to test the API. The downside
is some of these tests still have artifacts of their origins, such
as (unused) classes to connect to MySQL databases. Some more work
will be necessary to separate the "real mode" functionality of these
tests further.
Implements: blueprint tox-tests
Change-Id: I9857f265c1cb46832906ef5e6a0c7bb4a092e637
This gets rid of the misleading tests in this repo which have not been
relied on for most of this project's life (for historical reasons, tests
are currently stored in the reddwarf_lite-integration repo).
Change-Id: Ic452396ac50ea252bbd34d41638c2f337da3ed2a