summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | Fix failed iscsi tgt delete errors with new tgtadmJohn Griffith2012-08-012-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that the tgtadm patches are working, one problem was detected The delete target operation would fail, and as a result lvremove would fail due to an open connection. There were a number of issue using the config file method, but the most reliable way is to just use the iqn since we're going to perform an os.unlink on the config file anyway. devstack volumes.sh tests now pass and the detach/delete calls are succesful. Adjust test_iscsi for modifications to delete Change-Id: Ic34ca2194b8d75fb84a06dfba6793106eb8055fe
* | | | | | | | Merge "Send a full instance in terminate_instance."Jenkins2012-08-015-106/+128
|\ \ \ \ \ \ \ \ | |_|/ / / / / / |/| | / / / / / | | |/ / / / / | |/| | | | |
| * | | | | | Send a full instance in terminate_instance.Russell Bryant2012-08-015-106/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the terminate_instance method of the compute rpc API to take a full instance over rpc instead of just the instance UUID. This cuts down on database access needed by nova-compute. This is the final change for instances in rpcapi.py. \o/ Unfortunately, I discovered that the scheduler isn't properly using rpc API versioning when talking to compute nodes, so some of the methods used by the scheduler still need some love. Part of blueprint no-db-messaging. Change-Id: Ic62450346ea90b9a6d64e282e992a21a4dd6ab64
* | | | | | | Merge "Revert "Check for selinux before setting up selinux.""Jenkins2012-08-011-3/+1
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | |
| * | | | | | Revert "Check for selinux before setting up selinux."Pádraig Brady2012-07-301-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing code used trycmd(readlink) precisely because /etc/selinux might not exist. The presented traceback in the bug is only debug info. Also the change will not work with libguestfs for example, where the nova user can't access mount points mounted by root. After discussion on IRC it was decided to reduce debugging output in a subsequent commit. Reverts: 9bea239f Change-Id: Id07eae5b330332f36ad7caa786593e486aa36469
* | | | | | | Merge "Prevent instance_info_cache from being altered post instance"Jenkins2012-08-012-1/+5
|\ \ \ \ \ \ \
| * | | | | | | Prevent instance_info_cache from being altered post instanceTrey Morris2012-07-312-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out people have found ways to use the info cache everywhere. The problem is when these ways require information about deleted instances the info_cache may not be accurate. This patch prevents the info_cache from being altered after it is marked as deleted and marks an instance's info_cache as deleted towards the beginning of the destroy process to ensure it doesn't get blown away by a cache refresh somewhere along the way. Change-Id: I0d5c2f1fc7e5f8f6c1154958986bb775ced07443
* | | | | | | | Merge "maint: don't require write access when reading files"Jenkins2012-08-014-4/+4
|\ \ \ \ \ \ \ \
| * | | | | | | | maint: don't require write access when reading filesPádraig Brady2012-08-014-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change 'r+' to 'r' for open() when just reading. The '+' is uneeded and distracting. Change-Id: I8c611ab6d63e165f86e588992011f73f69565249
* | | | | | | | | Merge "Fix get_diagnostics RPC arg ordering."Jenkins2012-08-012-2/+6
|\ \ \ \ \ \ \ \ \
| * | | | | | | | | Fix get_diagnostics RPC arg ordering.Dan Prince2012-08-012-2/+6
| | |_|_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updates the ordering of the compute managers get_diagnostics call so it works correctly with the current wrap_instance_fault and checks_instance_lock decorators. To work correctly 'instance' needs to be the first argument after the context. Fixes LP Bug #1031788. Change-Id: Ia7105eb272cd2932fc4f25b297ecab9e5ab8dbe2
* | | | | | | | | Merge "XenAPI: Fix race-condition with cached images."Jenkins2012-08-014-36/+141
|\ \ \ \ \ \ \ \ \
| * | | | | | | | | XenAPI: Fix race-condition with cached images.Rick Harris2012-08-014-36/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The core problem is that XenServer's `VDI.copy` call drops the destination file directly into the SR. This means that half-completed files are visible with no way to distinguish these from fully-copied files. We had some code that attempted to mitigate this issue by checking physical_utilisation against an expected value. The problem with this code is that it didn't account for VDI chaining where the physical_utilisation would not necessarily match the parent. The net effect of this was that 'cloned' VDIs would never be found because their physical_utilisation was far below what was expected. The work around is to create our own `_safe_copy_vdi` which is isolated and atomic. Long term, `VDI.copy` should be fixed so that half-completed files are never stored in the SR. Change-Id: I6eb3cb5259f9ee1c7394e58f76105a8b39bfc720
* | | | | | | | | | Merge "Add check exit codes for vlans"Jenkins2012-08-011-4/+8
|\ \ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / / |/| | | | | | | | |
| * | | | | | | | | Add check exit codes for vlansChuck Short2012-07-311-4/+8
| | |_|_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add check_exit_code to check the ip address creation in ensure_vlan. Ignores error code '2' and '0' and '254' from iproute2, which means the address has been added or removed. A further audit of return codes will come later. LP: #1011640 Change-Id: Ie95b106446c9f136fa079d95df7a14fe50046696 Signed-off-by: Chuck Short <chuck.short@canonical.com>
* | | | | | | | | Merge "Setting root passwd no longer fails silently."Jenkins2012-08-016-19/+61
|\ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / |/| | | | | | | |
| * | | | | | | | Setting root passwd no longer fails silently.Eoghan Glynn2012-08-016-19/+61
| | |_|_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes LP 1022961 Previously an attempt to set the root password would fail silently if for example the driver did not support this action. To avoid the user being misled that the password change had succeeded, we now report any failure by changing the MEP for set_admin_password RPC from cast to call. Change-Id: I1fd7b925e9226d30892f3a7cc4ddb938ff678a55
* | | | | | | | Use instance_get instead of instance_by.Dan Prince2012-08-011-1/+1
| |_|_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updates the network manager to use db.instance_get instead of db.instance_by (which doesn't exist). This change seems to have slipped in in the recent vifs UUID conversion code. Fixes LP Bug #1031756. Change-Id: Ie487a2f845a722a5e7923e26a550d74f553e8afc
* | | | | | | Merge "Fix ip6tables support in xenapi bug 934603"Jenkins2012-08-011-1/+4
|\ \ \ \ \ \ \
| * | | | | | | Fix ip6tables support in xenapi bug 934603Mate Lakat2012-07-271-1/+4
| | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | Change-Id: Id7c4b0c4f8710652249b5c4fcb82abd5cccde6dd
* | | | | | | Merge "Set default keystone auth_token signing_dir loc."Jenkins2012-08-011-0/+1
|\ \ \ \ \ \ \ | |_|_|_|/ / / |/| | | | | |
| * | | | | | Set default keystone auth_token signing_dir loc.Dan Prince2012-07-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updates the nova api-paste.ini file with a custom signing_dir for Nova. This works around potential multi-service permission issues which can occur when multiple OpenStack services share a common signing directory. Change-Id: I99df63838fd41a4cade99b54da9511978b0d1a86
* | | | | | | Merge "Tidy up nova.image.glance"Jenkins2012-08-017-51/+16
|\ \ \ \ \ \ \
| * | | | | | | Tidy up nova.image.glanceBrian Waldon2012-07-307-51/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add comment explaining relevance of _is_image_available * Drop superfluous log statements * Drop GlanceImageService.delete_all as it has never been implemented * Drop the 'features' kwarg for GlanceImageService.update * Code simplification Change-Id: Ie538dd93dec729fb060bbcddfbddcba6cf303e52
* | | | | | | | Merge "Update targets information when creating target."Jenkins2012-07-312-2/+2
|\ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / |/| | | | | | |
| * | | | | | | Update targets information when creating target.Chuck Short2012-07-312-2/+2
| | |_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tgt-admin needs to use --execute --update to tell tgtd to re-read its configuration files when target is created. (LP: #1031509) Change-Id: I71fe4d90a8cc9bcf7a4817aefd6de52e216102a4 Signed-off-by: Chuck Short <chuck.short@canonical.com>
* | | | | | | Merge "Send a full instance in change_instance_metadata."Jenkins2012-07-314-18/+24
|\ \ \ \ \ \ \
| * | | | | | | Send a full instance in change_instance_metadata.Russell Bryant2012-07-314-18/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the change_instance_metadata method of the compute rpc API to take a full instance over rpc instead of just the instance UUID. This cuts down on database access needed by nova-compute. These methods were moved in rpcapi.py and test_rpcapi.py but only because the rest of the file was in alphabetical order. The move puts it in the right place to maintain that order. Part of blueprint no-db-messaging. Change-Id: I7dd2fb7480010893f66c753b3d31a4556009efe0
* | | | | | | | Merge "Send a full instance in unrescue_instance."Jenkins2012-07-314-15/+30
|\| | | | | | |
| * | | | | | | Send a full instance in unrescue_instance.Russell Bryant2012-07-314-15/+30
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the unrescue_instance method of the compute rpc API to take a full instance over rpc instead of just the instance UUID. This cuts down on database access needed by nova-compute. Part of blueprint no-db-messaging. Change-Id: I9a693b347ce583aa350f4c10531b53e0f9813577
* / / / / / / Avoid recursion from @refresh_cacheEoghan Glynn2012-07-313-2/+5
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the decorator current called out indirectly to nova.api.network.api.API.get_instance_nw_info(), which is also decoratored by @refresh_cache. Change-Id: I8b71e2f6c85d007cde0da32890168c922102a7d8
* | | | / / Compute: Error out instance on rebuild and resize.Rick Harris2012-07-312-163/+148
| |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a rebuild or a resize fails, then we should error out the instance. This code takes an idiom we already use in the compute manager and adds it to the rebuild and resize code. Change-Id: Ia90c038eb4677e109d58e9b79bb8a05490689c9f
* | | | | Merge "Instance cleanups from detach_volumes."Jenkins2012-07-311-8/+6
|\ \ \ \ \
| * | | | | Instance cleanups from detach_volumes.Michael Still2012-07-301-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can just use members of the instance dictionary without turning them into local variables, as we don't need to populate instance_uuid manually, as that is done by the @checks_instance_lock decorator. Change-Id: I2046d5688c2f5122624dc338680b7ddd850ed330
* | | | | | Merge "Use event.listen() instead of deprecated listeners kwarg"Jenkins2012-07-311-22/+17
|\ \ \ \ \ \
| * | | | | | Use event.listen() instead of deprecated listeners kwargJohannes Erdfelt2012-07-311-22/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes bug 1031405 The listeners kwarg is deprecated in SQLAlchemy 0.7.0. Since 0.7.3 is the minimum required version of SQLAlchemy, use the new event.listen() API instead. Change-Id: I3d2bd2e65dbc6787d1c9b69ffd0bcff85c157869
* | | | | | | Merge "Prefer instance in reboot_instance."Jenkins2012-07-311-7/+6
|\ \ \ \ \ \ \
| * | | | | | | Prefer instance in reboot_instance.Michael Still2012-07-291-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we're passed through an instance, or something which is immediately turned into an instance, we should prefer using the full instance inside compute methods. This is especially useful for log messages, as it allows users to format the messages more than they can if only the UUID is passed. Change-Id: I29370f33a63817f3e45d453499bd46131b947d7e
* | | | | | | | Merge "Avoid associating floating IP with two instances."Jenkins2012-07-314-15/+129
|\ \ \ \ \ \ \ \
| * | | | | | | | Avoid associating floating IP with two instances.Eoghan Glynn2012-07-314-15/+129
| | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Addresses LP 1029911. Associating an already-associated floating IP with another instance results in the floating IP being first disassociated from the original instance and then associated with the second instance. However when this transfer of the floating IP to the second instance occurs, the network info held in the database instance info cache was previously only updated for the second instance (via the @nova.network.api.refresh_cache decorator). As a result, the floating IP was initially reported as being associated with *both* instances. This misreporting is temporary - eventually the periodic heal_instance_info_cache task will roll around and purge the inaccurante network info for the original instance. However depending on the frequency configured for this task and the size of the instance population, it could take a while for the refresh to occur. This issue is addressed by immediately purging the obsolute network info when the reassignment occurs. Change-Id: Ibfb04997ff4a983d144d81350857cb07475aff54
* | | | | | | | Merge "Xen: VHD sequence validation should handle swap."Jenkins2012-07-311-0/+3
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | |
| * | | | | | | Xen: VHD sequence validation should handle swap.Rick Harris2012-07-301-0/+3
| | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The VHD sequence validation code was erroneously counting `swap.vhd`, which caused it to raise an exception when a corresponding numbered VHD was not found. The fix is to simply ignore the `swap.vhd` file. Other unknown VHDs will generate an exception, but from a sanity-checking perspective, this is a Good Thing(tm). Fixes bug 1030939 Change-Id: Ic82ae27a4af7ea8f7669fd006aea1a310b691218
* | | | | | | Merge "sync openstack-common log changes with nova"Jenkins2012-07-311-17/+21
|\ \ \ \ \ \ \
| * | | | | | | sync openstack-common log changes with novaSean Dague2012-07-301-17/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | don't throw exceptions if %(color)s tag is used fixes bug #1030078 If the log format strings include the %(color)s key in them and you enable file logging, your log files won't work, and instead you'll see exceptions on the console as the default python log handler doesn't support that keyword. This approach stubs out the extra keywords to be empty strings to avoid the KeyError. Tests are also added to demonstrate the KeyError as defined behavior, and test that color codes can be passed. Change-Id: I24b2f45dd5a38b27b8cc5a70e0084d367e218172
* | | | | | | | Merge "reduce debugging from utils.trycmd()"Jenkins2012-07-311-2/+0
|\ \ \ \ \ \ \ \
| * | | | | | | | reduce debugging from utils.trycmd()Pádraig Brady2012-07-301-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the case where the command fails, we're returning the err anyway and the caller can log if required. In the discard_warnings=True case, then the caller has explicitly asked to suppress the warnings, so don't log this noise either. Fixes bug: 1030609 Change-Id: I075c21aa6508182ae6dd030cf41ec31916559957
* | | | | | | | | Merge changes I3ec871de,I401beb93,Iddcc7cb0,Id581d23dJenkins2012-07-314-59/+82
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * changes: Fix arg to get_instance_volume_block_device_info(). Send a full instance in snapshot_instance. Send a full instance in set_admin_password. Send a full instance in rollback_live_migration_at_destination.
| * | | | | | | | | Fix arg to get_instance_volume_block_device_info().Russell Bryant2012-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Michael Still caught this bug while reviewing an earlier patch in this patch series. This code was passing an instance ID to this function, but it expects an instance UUID. Not really related to, but tied up in the patch series for blueprint no-db-messaging. Change-Id: I3ec871deadd13a8117f16ad46c31b0a9c8a016db
| * | | | | | | | | Send a full instance in snapshot_instance.Russell Bryant2012-07-304-22/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the snapshot_instance method of the compute rpc API to take a full instance over rpc instead of just the instance UUID. This cuts down on database access needed by nova-compute. Part of blueprint no-db-messaging. Change-Id: I401beb932e329683c3434ecd643db345aa217492
| * | | | | | | | | Send a full instance in set_admin_password.Russell Bryant2012-07-304-23/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the set_admin_password method of the compute rpc API to take a full instance over rpc instead of just the instance UUID. This cuts down on database access needed by nova-compute. Part of blueprint no-db-messaging. Change-Id: Iddcc7cb068090faa98f0bb87307e09d5b0ebf0c2