summaryrefslogtreecommitdiff
path: root/trove/db/sqlalchemy/migrate_repo/versions
Commit message (Collapse)AuthorAgeFilesLines
* Remove downgradeTrevor McCasland2016-10-0638-413/+0
| | | | | | | | | | | | 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
* Merge "Persist error messages and display on 'show'"Jenkins2016-07-161-0/+56
|\
| * Persist error messages and display on 'show'Peter Stachowski2016-07-011-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an error occurs in Trove, it is very difficult to determine the cause without access to the server logs. To make these errors available to the end user, they are now persisted in the database and can be viewed using the standard 'show' command. Also fixed TESTS_USE_INSTANCE_ID test path, as it somehow got broken over time. Change-Id: I84ed28ee73a24a2dd6bdbf895662d26e406e9fae Depends-On: I5d3339e9cbfd6aeb0c3ff6936fefa8dbe9e841f8 Implements: blueprint persist-error-message
* | Switch from MySQL-python to PyMySQLJeremy Stanley2016-06-301-1/+2
|/ | | | | | | | | | | | | | | | | | | | | As discussed in the Liberty Design Summit "Moving apps to Python 3" cross-project workshop, the way forward in the near future is to switch to the pure-python PyMySQL library as a default. https://etherpad.openstack.org/p/liberty-cross-project-python3 BaseMySqlRootAccess.enable_root(): catch also InternalError because the PyMySQL error is not wrapped into a SQLAlchemy OperationalError, but a generic SQLAlchemy InternalError. Similar change is made in 026_datastore_versions_unique_fix.py. This change requires a trove integration change to add the PyMySQL to the guest image: Id4d013d174ba40a453819f900aaa316a93e59b48. Partially implements: blueprint trove-python3 Co-Authored-By: Victor Stinner <vstinner@redhat.com> Depends-On: Id4d013d174ba40a453819f900aaa316a93e59b48 Change-Id: I65e8a8d5dc251a8b00529cdfb1a6ada3d5720f68
* Trivial: Remove unused logging importwangjunqing2016-04-232-6/+0
| | | | | Change-Id: I57a77fdac4674c5e82bb870916d74a31ba5503d1 Close-Bug: #1529541
* Fixes migrations for MySQL 5.6.* and MariaDB 10.1.*Victoria Martinez de la Cruz2016-03-301-3/+20
| | | | | | | | | | | | | | | | | | In MySQL 5.6/MariaDB 10.1 and later versions there was a change on the restrictions over foreign keys (FK). In 019-datastore-fix.py, we attempt to change a column that is part of a FK from NULL to not NULL. This sort of modifications are not longer allowed. This situation caused trove-manage db_sync and trove-manage db_migrate to fail. To workaround this, the FK check before executing the ALTER query is disabled and then reenabled. Change-Id: I666d01235f2c3225aca3fe7520ebdf6d53831cab Closes-Bug: #1473226
* Server support for instance module featurePeter Stachowski2016-03-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changeset handles the details of applying, removing, listing and retrieving 'modules' from Trove instances. See https://review.openstack.org/#/c/290177 for the corresponding troveclient changes. Scenario tests have been extended to cover the new functionality. These tests can be run by: ./redstack int-tests --group=module A sample module type 'driver' - ping - is included that simply parses the module contents for a message=Text string and returns the 'Text' as the status message. If no 'message=' tag is found, then the driver reports an error message. Due to time constraints, a few unimplemented parts/tests of the blueprint have been triaged as bugs and are scheduled to be fixed before mitaka-rc1. These include: Vertica license module driver: https://bugs.launchpad.net/trove/+bug/1554898 Incomplete module-instances command: https://bugs.launchpad.net/trove/+bug/1554900 Incomplete 'live-update' of modules: https://bugs.launchpad.net/trove/+bug/1554903 Co-Authored-by: Peter Stachowski <peter@tesora.com> Co-Authored-by: Simon Chang <schang@tesora.com> Partially Implements: blueprint module-management Change-Id: Ia8d3ff2f4560a6d997df99d41012ea61fb0096f7 Depends-On: If62f5e51d4628cc6a8b10303d5c3893b3bd5057e
* Server side of module maintenance commandsPeter Stachowski2016-02-251-0/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changeset handles the details of creating, updating, listing and deleting Trove 'modules.' Two new tables have been added to the Trove database: modules instance_modules although the instance_modules table is at present unused. Scenario tests have been written as well, to exercise the new functionality. These tests can be run by: ./redstack int-tests --group=module_create In the follow-up changeset, all module tests can be run by: ./redstack int-tests --group=module Since module support is available for all datastores (controlled by a CONF option) the module test has been added to the common modules group. Note: Trying to do admin tasks with none admin credentials results in an Unauthorized exception being thrown, instead of Forbidden. This is due to the fact that Forbidden is in the HTTPUnauthorized section of wsgi.py instead of the HTTPForbidden section. Moving the exception caused too many failures, so I created a 'Module' Forbidden exception and put it in the right section. Change-Id: I755b0431b33b870ae02d903527f071fd8e23130d Depends-On: I54d37025275dee4731ad49ebbd21612c4464e4c4 Depends-On: I779c24472d3d96a7b2fe4ed0284fd5869cdef93b Partially-Implements: blueprint module-maintenance
* Associate flavor types with datastore versionsRiddhi Shah2015-08-111-0/+61
| | | | | | | | | | | | | This feature provides the ability to associate flavor types with datastore versions.The trove-manage util will provide the ability to add or delete this information. All nova flavors are permitted for a datastore-version unless one or more entries are found in datastore_version_metadata, in which case only those are permitted. partially implements blueprint associate-flavors-datastores Change-Id: Ib012401f89d07c502f93d5ee1cd4abb6b738953a
* Switch to the oslo_log librarySergey Vilgelm2015-07-237-7/+8
| | | | | | | | Remove the log module of oslo-incubator. Move the WritableLogger wrapper to the base_wsgi module. Add oslo.log to the requirements. Change-Id: I724fa6090cebf40e7d7c78cc6b8458dfba9508a8
* Fixes hacking rulesSushil Kumar2015-05-2918-45/+46
| | | | | | | | | | | | | | | | | This patchset helps reducing the ignored pep8 errors. Fixed some ignored hacking rules, as listed follows: - E111 indentation is not a multiple of four - E122 continuation line missing indentation or outdented - E123 closing bracket does not match indentation of opening bracket's line - E128 continuation line under-indented for visual indent - E251 unexpected spaces around keyword / parameter equals - E265 block comment should start with '# ' - E713 test for membership should be 'not in' - H105 Don't use author tags - H306 imports not in alphabetical order Change-Id: Iadf2af4f6ec90420153ad63b5a41650392ef2cbd
* Support string flavor IDsAdam Gandelman2014-12-231-0/+35
| | | | | | | | | | | | | | | | | | This allows operating on Nova flavors with non-integer ids by adding a new str_id field to the view that always contains the unicode flavor id. The current id field will now contain a value only when the flavor's id can be cast to int, otherwise it will be None. Validation of flavor id when querying a flavor or creating an instance has been updated to include non-empty strings in addition to integers. This will require a patch to python-troveclient to properly fallback to str_id in absence of the integer id: https://review.openstack.org/#/c/123301/ Change-Id: Ie9cfefc6127bc76783cdf9668636342d7590b308 Closes-bug: #1333852
* Legacy MySQL datastore is shown on datastore-listEdmond Kotowski2014-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | On the 019_datastore_fix.py migration script the upgrade method was calling the has_instances_wo_datastore_version as a function pointer instead of passing the instance_table in and calling the function. This meant the if block was always true because it was just checking if the function exists and the create_legacy_version method was called everytime causing the "Legacy MySQL" datastore to be inserted even if there was no legacy trove instances. Now inject the instace_table into the has_instances_wo_datastore_version and everything works as expected. Updated the datastore integration tests to not rely on the Legacy MySQL datastore to exist by using the 10000000-0000-0000-0000-000000000001 GUID. Instead the test now asserts against the data_store by the name "Test_Datastore_1" which is the datastore the integration test intended to validate against. Closes-Bug: 1396427 Change-Id: Ifff33a962cc8d6ea150f6408d63b81412e196939
* Increase instances.task_description column sizeLi Ma2014-11-161-0/+29
| | | | | | | | | | | The instances.task_description column size is too small to use. This fix increases it to 255. The migration is totally safe and the downgrade operation is not needed. Change-Id: I658e0dea3d304409085162ec4a2b79f8473a71c4 Closes-Bug: #1334795
* Fixed database migration script issuesSimon Chang2014-09-196-36/+97
| | | | | | | | | | | | | | The db downgrade scripts are currently not dropping foreign key constraints, causing errors when the script tries to drop related tables on downgrade. This commit address issues in the migration scripts, and also introduces a new test script to test the migration scripts, so that issues can be prevented in the future. The new test script is based on the existing migration test script implementated in Nova. Change-Id: I240d81afc3e43fd3711de8c156cfb43fd14850bf Closes-Bug: #1347114
* Datastore Configuration Parameters stored in dbCraig Vyvial2014-09-031-0/+60
| | | | | | | | | | Changes: Add datastore configuration paramters to configuration model Add ability to CRUD configuration parameters adding a manage cmd to import the config params partially implements blueprint configuration-parameters-in-db Change-Id: I51d5281ba8922dc19c74e7c6e972f40e45416d50
* Clusters API Implementationamcrn2014-08-291-0/+77
| | | | | | | | | | | | | adds clusters api, with mongodb sharding as the first implemenation. Co-Authored-By: Michael Yu <michayu@ebaysf.com> Co-Authored-By: Mat Lowery <mlowery@ebaysf.com> Co-Authored-By: rumale <rumale@ebaysf.com> Co-Authored-By: Timothy He <the@ebaysf.com> Partially implements: blueprint clustering Change-Id: Icab6fc3baab72e97f3231eaa4476b56b8dafb2a3
* Add timestamps and instance count to config groupsTheron Voran2014-06-271-0/+35
| | | | | | | | | | | | | | | | | | This commit adds created and updated timestamps to the configuration groups list and details calls. It also adds instance_count to the configuration details call. Timestamps on configuration groups can serve as a secondary indicator for making config edits, as well as a potential time marker for correlating when detrimental config changes were made. It will also help to see how many instances use a particular config and users will be able to see up front how many instances the config changes will affect. Note that instance_count is generated on the fly and not stored in the config db, hence the getattr() usage. Change-Id: I0138a28e9fb4c0c045a1a26df3f8a282d80a7274 Implements: blueprint minor-config-edits Docimpact: change to configuration payloads
* Add slave_of_id to instance modelGreg Lucas2014-06-171-0/+38
| | | | | | | Add new 'slave_of_id' field to instance model and schema. partially implements blueprint replication-v1 Change-Id: I613eaed6057745f38ffffafad2c72a0338b2552a
* Add datastore version to backupsSteve Leon2014-06-121-0/+37
| | | | | | | | | | | | | | | This fix adds datastore information to the backup APIs. These API includes backup list, backup list by instance and backup show. Also this fix enhances backup-list to optionally receive a datastore to filter the backups by. The integration tests will fail until the update for the client gets merged: https://review.openstack.org/#/c/90462/ Change-Id: Icfec975b92cd9523e639ad6a2d6787ee4d4cb39d Implements: blueprint backup-metadata
* Add a new column and indexes to agent_heartbeatsdaniel-a-nguyen2014-06-091-0/+81
| | | | | | | | | | | | | | | | | | Includes a new index on instance_id Added a deleted and deleted_at column Includes an index for deleted too Includes in call to find all by version Includes call in _delete_resources() Fixed AgentHeartBeat delete call Corrected downgrade script as per SlickNik Needs the save method because of how we are calling create Reworked migration to create table from scratch Renamed migration from 026 --> 027 Exception handling, added not null to updated_at col Renamed migration from 027 --> 028 Change-Id: Ie0568850856c32fdbf9495c496339730d6b5beef Implements: blueprint upgrade-guestagent
* Adds the foundation for datastore capabilitiesKaleb Pomeroy2014-05-291-0/+61
| | | | | | | | | | | This allows for capabilities to be set in the mysql database capabilities table and associated to datastores with the datastore_capabilities table. This allows users to have datastore specific functionality that is configurable and able to be served to end users. This commit is for the groundwork for the capabilities API. Change-Id: I7153d435bf8c00dc2a874a66c7a2b64e8fbafa09 Partially-Implements: blueprint capabilities
* Specify correct constraint name for postgresqlJoe Gordon2014-05-201-1/+6
| | | | | | | | | | | | | | | | | The UniqueConstraint is not named 'name,' this causes postgres to fail with the following error: UTC ERROR: constraint "name" of relation "datastore_versions" does not exist The constraint name should be 'datastore_versions_name_key' in the case of postgresql. Since postgres isn't tested in trove's gate yet (Fix: I53e7fa2729542b88b43cd3de51e15118adaeec57) this has been tested locally to make sure it stack.sh (which runs trove-manage db_sync) works. Co-Authored-By: Nikhil Manchanda <SlickNik@gmail.com> Change-Id: I265925566b8e84d92c838cb3b39ad1f8502cd052 Related-Bug: #1321093
* Merge "Datastore_versions.name shouldn't be unique"Jenkins2014-05-201-0/+44
|\
| * Datastore_versions.name shouldn't be uniqueDoug Shelley2014-05-091-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The name column in the datastore_versions table is not supposed to be defined with a unique index. The migrate version 18 was intended to fix this but the method used to correct the column definition doesn't work. Added a migrate version 26 to use UniqueConstraint.drop() instead. After some discussion, it was decided that downgrade would be a no-op because it is difficult to reliably create a unique index on a column with data in it, and further, the column wasn't supposed to be unique in the first place. Change-Id: Ida552982de6702db6ed4d40c0167e7d542c0ded4 Closes-Bug: #1310834
* | Migrate v20 not handling exceptionDoug Shelley2014-05-091-5/+16
|/ | | | | | | | | | Version 20 upgrade creates 2 tables but the downgrade doesn't remove them (for a stated reason). If you downgrade and then upgrade, the upgrade will fail because the tables already exist. This fix add a try block around the upgrade to log an info message instead of failing. Change-Id: I37fbe002da7dc764d229575149e4062e38f75881
* Update sqlalchemy migrate scripts for postgresNikhil Manchanda2014-03-171-3/+13
| | | | | | | | | | | pgsql <= 8.3 was lax about char->other casting but this was tightened up in 8.4+. We must now specify the USING clause for such a cast to succeed. The SQL queries generated by sqlalchemy for pgsql don't support this, so an override is needed to support pgsql for the trove migrate scripts. Closes-bug: 1293465 Change-Id: I217fc861036911e61bafe706e338bb3b8f49e708
* Adding missing indexes for trove dbdaniel-a-nguyen2014-03-053-0/+155
| | | | | | | | Wraped creates in a try/except to avoid problems if idx exists Updated number-naming for scripts Change-Id: I81e59f2f54dab73fc794fae0df9e1751e5896530 Closes-Bug: #1214188
* Remove extraneous vim configuration commentsHe Yongli2014-02-278-16/+0
| | | | | | | | | | | 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
* Adding Incremental BackupsRobert Myers2014-02-071-0/+37
| | | | | | | | | | | | * Adding a config flag to register incremental runners * Adding InnoBackupExIncremental runner and restore strategy. * Adding save_metadata and load_metadata methods for swift storage strategy. * Adding incremental backup/restore integration test. Implements: blueprint incremental-backups Change-Id: I1f0d4e5967097498f86a5052c33c55471e24a137
* Ignore outdated messages sent to conductorEd Cranford2014-02-071-0/+41
| | | | | | | | | Adds a sent_at field to conductor messages in the manager so that messages that get out of sync on their way to conductor don't cause trouble by updating instances or backups with out-of-date information. Implements: blueprint conductor-ignore-old-messages Change-Id: If06d2f9c9f993100be66f71274240a59b05b66e3
* adding configuration group supportCraig Vyvial2014-02-061-0/+65
| | | | | | | | | | This allows users to make custom configurations groups and apply them to multiple instances. Configuration parameters that can be set are listed in the validation_rules.json file. implements blueprint configuration-management Change-Id: I99b0bfe51c131ace30774e75e30d620101ed2e0b
* Fix default_datastore migration scriptVipul Sabhaya2014-01-291-33/+104
| | | | | | | | Fixes the migration script introduced earlier to remove dependencies on the Trove database model classes. Change-Id: I71762baa095039f65e97b3413a7ff0fc3e0014ec Closes-Bug: 1259642
* Merge "make datastore_version_id required"Jenkins2014-01-231-0/+72
|\
| * make datastore_version_id requiredGreg Hill2014-01-221-0/+72
| | | | | | | | | | | | | | | | | | | | | | The datastore addition didn't migrate existing instances, which causes existing installations to blow up after upgrading. This commit addresses that by inserting best-guess dummy data into the db. Operators will need to clean up the values to match their actual usage. Change-Id: I7ae064cea9b654a4501b91877b779fb4073623af Closes-Bug: #1259642
* | Merge "Remove copyright from empty files"Jenkins2014-01-221-18/+0
|\ \ | |/ |/|
| * Remove copyright from empty filesAlexander Ignatov2014-01-161-18/+0
| | | | | | | | | | | | | | | | | | According to policy change in HACKING: http://docs.openstack.org/developer/hacking/#openstack-licensing empty files should no longer contain copyright notices. Change-Id: I3992a72c3614e2d0c65aee91e69d89ff806824fc Closes-Bug: #1262424
* | Datastores improvementsAndrey Shestakov2014-01-211-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | List of improvements: - added default_version field in datastore show output - admin can list deactivated versions too - admin can see extanded info about datastore version (image_id, packages) - add possibility to retrive version by uuid (without specified datastore) Implements: blueprint datastore-type-version-followon Change-Id: I9b0c3547fb6a881a01db9e6e3d8d72077bc5ee29
* | move datastore manager to the datastore versionCraig Vyvial2014-01-161-0/+63
|/ | | | | | | | | | This moves the datastore manager field to the datastore version object so that we can have managers per datastore version and they can be shared if nessesary. implements blueprint move-manager-to-datastore-version Change-Id: I1c889a01005ec482bcd44e0e19475bc972e1af04
* Removes unused import statements2014.1.b1Sushil Kumar2013-12-0312-33/+0
| | | | | | | | | Updates tox.ini to remove suppressed F401 standard. Updates the code files containing unused import statements Change-Id: Ib44bd1509fdb17f457a205f9e62caf85cebee830 Closes-Bug: #1257267
* Add support of datastore typesAndrey Shestakov2013-11-191-0/+76
| | | | | | implements blueprint db-type-version Change-Id: Ie87f72b898e993044803e7b37cad78372c2cd3f4
* PEP8. F841Denis M2013-09-261-1/+1
| | | | | Change-Id: Ie0362ad561cad0e5c371a1b282af900f0d459058 Implements: blueprint reduce-amount-of-pep8-ignored-rules-in-tox-tests
* Add service_type to the instances tableMichael Basnight2013-07-151-0/+37
| | | | | | implements blueprint add-service-type Change-Id: I21147ae1ebe277fc863ec2785ca0e702e8cb0d15
* Rename from reddwarf to trove.Michael Basnight2013-06-2415-0/+756
Implements Blueprint reddwarf-trove-rename Change-Id: Ia9ee609bbc06a1d8b9d6917642529f30347541fd