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
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
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
Add ability to let scheduler decide on target host during live migration.
Implements: blueprint live-migration-scheduling
Change-Id: Id596fa3a0ef2b1b5faf854e4b4557b3c4b413e39
_get_instance_volume_block_device_info() is expecting an
instance dict-like object instead of instance_uuid
Fix bug 1129441
Change-Id: Id4d536553ce9858434c377653fa79562e1282a34
Using abbreviated config group names just makes the config file harder
to understand, so just use full name.
zk => zookeeper
Change-Id: Ia8b3ff9201365477003535600e419540deae7341
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
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
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
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
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
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
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
* 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
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
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