19162 Commits

Author SHA1 Message Date
Michael Still
76461c83d1 libvirt: Use uuid for instance directory name
This is done in a backwards compatible manner to deal with instances
started under the old regieme where we used a less unique name.

Resolves bug 1023865.

Change-Id: I4c9b7b291a30a7f3c2c9305c8fa346dc582bee88
2013-02-20 09:51:07 +11:00
Jenkins
f237685e8a Merge "Stub additional FloatingIP methods in FlatManager" 2013-02-19 20:23:35 +00:00
Jenkins
a6008026ac Merge "Assign unique names with os-multiple-create." 2013-02-19 20:23:20 +00:00
Dan Prince
5993324905 Add a safe_minidom_parse_string function.
Adds a new utils.safe_minidom_parse_string function and
updates external API facing Nova modules to use it.
This ensures we have safe defaults on our incoming API XML parsing.

Internally safe_minidom_parse_string uses a ProtectedExpatParser
class to disable DTDs and entities from being parsed when using
minidom.

Fixes LP Bug #1100282.

Change-Id: Ib90d6379320ff1d007f8a661f7ddaa286ba6918e
2013-02-19 09:12:01 -05:00
Jenkins
1b9b66ba21 Merge "Delete baremetal interfaces when their parent node is deleted" 2013-02-19 10:13:59 +00:00
Jenkins
1362c582f2 Merge "Remove unused nova.db.api:network_get_by_instance" 2013-02-19 10:13:42 +00:00
Jenkins
af65befd7e Merge "Fix _get_instance_volume_block_device_info call parameter" 2013-02-19 10:13:03 +00:00
Jenkins
399bfa66b7 Merge "Remove unused db calls from nova.db.sqlalchemy.api" 2013-02-19 10:12:09 +00:00
Jenkins
9a0d70f854 Merge "Remove unused db calls" 2013-02-19 08:44:11 +00:00
Jenkins
2526178028 Merge "Fix a typo in two comments. networksa -> networks" 2013-02-19 08:43:50 +00:00
Jenkins
f68befa7a0 Merge "create new cidr type for data storage" 2013-02-19 08:17:41 +00:00
Jenkins
90ac3270a8 Merge "Add support for instance vif traffic control." 2013-02-19 07:14:25 +00:00
Jenkins
df9e5dd7fe Merge "Live migration with an auto selection of dest" 2013-02-19 07:14:09 +00:00
Jenkins
b9e7da43f1 Merge "Add select_hosts to scheduler manager rpc" 2013-02-19 07:13:50 +00:00
Jenkins
749d7a3a2f Merge "Do not use abbreviated config group names (zookeeper)" 2013-02-19 07:08:48 +00:00
Jenkins
49ead39086 Merge "Small spelling fix in sqlalchemy utils." 2013-02-19 07:08:22 +00:00
Jenkins
3e1e38f9a5 Merge "Fixes a race condition on updating security group rules" 2013-02-19 05:05:19 +00:00
Jenkins
9d9bed9e68 Merge "Fix hacking tests on osx" 2013-02-19 03:38:29 +00:00
Jenkins
733070fa9d Merge "Add and check data functions for test_migrations 141" 2013-02-19 02:43:32 +00:00
Jenkins
f62eb73d3f Merge "Add image to request_spec during resize" 2013-02-19 02:02:25 +00:00
Sean Dague
30c2a8f66e create new cidr type for data storage
it turns out that the 149 migration was overly agressive in its
IPAddress conversion, as we actually have a few columns that are
really CIDR values. This means that 39 chars isn't enough space to
store even a normalized IPv6 cidr in the worst case (you need 4
more to support /127).

We must also normalize IPv6 address cidrs otherwise 43 chars isn't
long enough. This was more of a problem in theory, than in practice,
as real IPv6 addresses rarely are non compressible.

This adds a migration to bump up the CIDR columns to 43 characters.
There is an infinitessimal chance that someone using mysql and long
IPv6 values might loose data in 149 because of truncation. This
doesn't address that, which would require modifying 149.

The native pg CIDR column type is not used because it would require
additional scrubbing of the data as CIDR is invalid if any host bits
are set (and it will fail on type conversion).

Fixes bug #1127696

Change-Id: I54539ac9c257d726bc4db5943169b5284cc847d3
2013-02-18 17:11:48 -08:00
Jenkins
7106ba954e Merge "Add libvirt XML schema support for resource tuning parameters" 2013-02-19 01:02:49 +00:00
Jenkins
1ed88abf30 Merge "remove intermediate libvirt downloaded images" 2013-02-19 01:02:22 +00:00
David Ripton
d9c457a777 Fix a typo in two comments. networksa -> networks
Change-Id: I925fbf55f9a52d3866693b32f138e1b09efbbad8
2013-02-18 19:36:06 -05:00
Hans Lindgren
20f1a991cb Live migration with an auto selection of dest
Add ability to let scheduler decide on target host during live migration.

Implements: blueprint live-migration-scheduling
Change-Id: Id596fa3a0ef2b1b5faf854e4b4557b3c4b413e39
2013-02-19 01:27:01 +01:00
Joe Gordon
a8dc27b54e Remove unused nova.db.api:network_get_by_instance
Change-Id: I908aaafa149c6548271fd9a3cc91225f2cbdb841
2013-02-19 00:19:52 +00:00
Joe Gordon
0d417fa735 Remove unused db calls from nova.db.sqlalchemy.api
*  instance_metadata_get_item
*  _instance_system_metadata_get_item
*  instance_type_extra_specs_get_item
*  aggregate_metadata_get_item

Change-Id: If25db80f2fc2da1d26fd5588a5c24131fe05d24e
2013-02-18 23:50:29 +00:00
Joe Gordon
0123dea839 Remove unused db calls
* virtual_interface_delete
* instance_get_all_by_project

Change-Id: Ie0b90802ccef72bd56d3508e7796194517f7a5ef
2013-02-18 15:47:30 -08:00
Michael Still
27c7ab85c8 Small spelling fix in sqlalchemy utils.
Change-Id: Iabc7c3d6a3cee6496b19811ad29b336a63cd0529
2013-02-19 09:28:54 +11:00
Yun Mao
376dafd32f Fix _get_instance_volume_block_device_info call parameter
_get_instance_volume_block_device_info() is expecting an
instance dict-like object instead of instance_uuid

Fix bug 1129441

Change-Id: Id4d536553ce9858434c377653fa79562e1282a34
2013-02-18 17:24:49 -05:00
Joe Gordon
b1da6f7124 Do not use abbreviated config group names (zookeeper)
Using abbreviated config group names just makes the config file harder
to understand, so just use full name.

zk => zookeeper

Change-Id: Ia8b3ff9201365477003535600e419540deae7341
2013-02-18 14:23:04 -08:00
Jenkins
b23c557cc8 Merge "Enable multipath for libvirt iSCSI Volume Driver" 2013-02-18 22:06:40 +00:00
Vishvananda Ishaya
d066a50e9a Fix hacking tests on osx
There were a few incompatibilities with the hacking tests and
OSX. Readlink -f doesn't work so use cd and pwd instead. Importing
a module with path separators doesn't work, so recursively import
the module. Finally the extra / in the find command was not needed.

Add a 'set -e' to run_pep8 to make sure test fails on any error

Ignore paste as it doesn't have an __init__ in its top level directory

Change-Id: Ifc66da7b872faa08f3be98f8b10486181ba77861
2013-02-18 12:12:23 -08:00
Jenkins
9e2b990f22 Merge "Fix script argument parsing." 2013-02-18 17:58:46 +00:00
Erik Zaadi
933365a583 Enable multipath for libvirt iSCSI Volume Driver
Implements: blueprint libvirt-volume-multipath-iscsi

nova/virt/libvirt/volume.py:LibvirtISCSIVolumeDriver can now
make use of multipath (behavior defined by use_multipath flag)
runs a scsi inquiry to the storage vendor (iSCSI portal)
asking for more portals, logins to the discovered portals and uses a
multipath device (/dev/mapper/XX) instead of a singlepath device
(/dev/disk/by-path/ip-IP:PORT-iscsi-IQN-lun-X).

This improves IO speed and robustness, since if one iSCSI portal goes
down, there are still others to take care of IO.

Change-Id: I30489234b8329f576cf2cbb0ef390670dbee5b95
2013-02-18 16:51:46 +02:00
David Scannell
53a7538a84 Add select_hosts to scheduler manager rpc
This adds a select_hosts(...) method to the scheduler manager
rpc that allows other services to query it for the best suited
host instead of relying on it to proxy its messages.

This can be used by extensions that need the scheduler to determine
the best-fit host but want to prepare and send their own messages
to that host.

Change-Id: I5b4760114dfcdb0464fac8ea81f46f7532ac0580
2013-02-18 15:00:18 +01:00
Kurt Taylor
8890f40e1b Add and check data functions for test_migrations 141
Before the 141 migration test is run, _prerun_141 populates the migrations
table with a generated uuid. The _check_141 function checks that
the uuid migrated properly down to 36 char.

Partially implements: blueprint migration-testing-with-data

Change-Id: I43b47f69a94720bf9487eb30576035493700ddca
2013-02-18 08:51:19 -05:00
OpenStack Jenkins
fbe79705eb Merge "Imported Translations from Transifex" 2013-02-18 10:15:30 +00:00
Jenkins
931515378c Merge "Remove race condition (in TaskLog)" 2013-02-18 10:15:14 +00:00
Jenkins
121cdcb7e8 Merge "Add generic dropper for duplicate rows" 2013-02-18 09:54:59 +00:00
Jenkins
b91843666c Merge "Fix typo/bug in generic UC dropper" 2013-02-18 09:21:56 +00:00
Jenkins
1490831c45 Merge "clean up missing whitespace after ':'" 2013-02-18 09:21:23 +00:00
Boris Pavlovic
0963a81587 Remove race condition (in TaskLog)
Delete all duplicate rows with same (task_name, host, period_beginning,
period_ending) expect one with the biggest value in `id` column.

Create UC on fields (task_name, host, period_beginning, period_ending)

Replace Select then Insert -> Try to Insert.

blueprint db-unique-keys

Change-Id: I99f45a6de6630482e9c56738f894cc55a37fffaf
2013-02-18 05:31:02 +04:00
Boris Pavlovic
cf6e7ac1e4 Add generic dropper for duplicate rows
Add generic function that help us to drop duplicated rows from table,
before creating unique constarints. It is very usefull in migrations,
because it will allow DBA to make migrations without IntegrityError
exceptions.

It deletes all duplicates of rows except row with max value in id column.

blueprint db-unique-keys

Change-Id: I7e48d3eb78cf9a5d30752541b143b0c9fa1f838a
2013-02-18 05:30:51 +04:00
OpenStack Jenkins
6aa3447498 Imported Translations from Transifex
Change-Id: I1016d574022230b3fdfd6ae580a657aeb45bb1a0
2013-02-18 00:03:20 +00:00
Jenkins
d0c059e6b7 Merge "Correct spelling of quantum" 2013-02-17 21:38:14 +00:00
Boris Pavlovic
5d272b3eb5 Fix typo/bug in generic UC dropper
Change *fields -> *columns.

There should be tests for other backends mysql and postgres
but at this moment it is not so easy to implement it.

Fixes bug 1123848

Change-Id: I65a618760d499501589d5536c9f7dc64483b19ed
2013-02-17 23:17:44 +04:00
Pádraig Brady
1501a4e4f7 remove intermediate libvirt downloaded images
* nova/virt/images.py (fetch_to_raw): When converting a downloaded
image to raw, ensure we delete the original download image.
I.E. the .part file.  The regression was introduced in 7c265343.
* nova/tests/test_libvirt.py (test_fetch_raw_image): A new test
for this function which wasn't tested previously.

Fixes bug: 1125068
Change-Id: Ie6f2cff1a554b8500fd66f0832566ae1b317be40
2013-02-17 05:02:32 +00:00
Yaguang Tang
7e04e0f6ac Add support for instance vif traffic control.
Part 2 for blueprint quota-instance-resource, by adding exposed params
"vif_inbound_average, vif_inbound_burst, vif_inbound_peak,
vif_outbound_average, vif_outbound_burst, vif_outbound_peak" through
nova flavor-set, user can implement instance net traffic control policy.
for example:
nova flavor-set m1.medium set vif_inbound_average=10240000,
then the max inbound speed is 10MB/s. The usecase details of other params
will be noted on openstack-manuals.

Partly implement blueprint quota-instance-resource
DocImpact
original reviews https://review.openstack.org/#/c/14151/

Change-Id: I9934daadbf0e136e88530f5c23b556d070395bd0
2013-02-17 11:57:03 +08:00
Yaguang Tang
082c4ca417 Add libvirt XML schema support for resource tuning parameters
Extend the libvirt XML config classes to support for CPU, disk IO,
network traffic tuning parameters.

Blueprint: quota-instance-resource
DocImpact
original reviews https://review.openstack.org/#/c/14151/

Change-Id: I2827ea0e731fefe5bbaec6c385268a3f5b89f7f6
2013-02-17 11:57:03 +08:00