This extension adds the OS-EXT-VIF-NET:net_id param
so that users can determine vif plunged into which network now.
DocImpact
Change-Id: I56bef5c45f7f545aa5e9b13760dff1c802da0f8f
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
"nova net-list" does not return network uuid even when the uuid is
available, and instead returns only the id. This is because the
"network_dict" function in the extension improperly uses "in" to check
for a Network model object. This also reduces compatibility in the API.
Fixes bug: 1162409
Change-Id: I30d4c8bfa37d89123f35ee8cc7c67f0e819262a7
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
Logging needs to be setup properly before we try to log
something. Fix a test case that loads the code but does
not execute the code that results in the LOG being setup
properly.
Fixes LP# 1161031
Change-Id: I9d5bc6b87cfb25243f00e17b532d4485dc4454e4
There was no tests in test_db_api for instance_type_extra_specs_*
methods.
Add tests to ensure that all works.
blueprint db-api-tests
Change-Id: Ie88aa776574c5ddf37a1adcf7cc2c9e70c6eb810
Soft delete all duplicate rows with the same (project_id, instance_type_id)
except one with the biggest value in `id` column.
Create UC on columns (project_id, instance_type_id, deleted)
Add tests for migration
Fix instance_type_access_add method
Replace Select then Insert -> Try to Insert.
blueprint db-enforce-unique-keys
Change-Id: Id70509337e78f3bf778501f2c77aa03263580ef0
instance_get_all_by_host_and_node() had 4 different joins being done.
The resource tracker is the only consumer of this method and does not
need the joins. This optimization will save many unnecessary rows from
being fetched during the update_available_resource() audit task.
Change-Id: I414c219e4563634e270007fe3d0fa980b273e795
As part of the move of plugins to entrypoints, take advantage of the
entrypoints based console scripts, which will make our command line scripts
available for unittesting.
Part of blueprint entrypoints-plugins
Co-authored-by: Michael Still <mikal@stillhq.com>
Change-Id: I5f17348b7b3cc896c92263dd518abb128757d81f
If the instance types are not stashed, fallback to
the conductor API to retrieve them.
bug 1164110
Change-Id: I1f0ef48e072f8580980de5bd8d43cf2206cd7d27
This patch fixes bug 1161226 and mac address conflicts when migrating or
resizing an instance using the PowerVM driver. This will ensure that if
a migration or resize is taking place on the same host, a temporary mac
address will be assigned to the original LPAR so there is no conflict on
the VIOS when a second LPAR is started with the same address.
Change-Id: I59db484defb789f3a7c0eddbd5ef9e92efc22419
The sfdisk code that landed uses -D, which ends up subtracting space
from the first partition - this plays havoc with precisely sized disk
images due to a bug in the automatic adjustment code. Instead we
directly specify the spare space to be allowed.
Additionally, sfdisk can be used much more simply, avoiding any room
for us to make arithmetic errors, and reducing the opportunity for
race conditions with udev so this change does that.
Change-Id: I7f95e867d8775f49698cbbf4b1be40e69db9d538
The existing code assumes that `legacy_net_info` is always in legacy
mode, meaning a list of tuples which causes it to break when passed a
new-style NetworkInfo object.
Fixes bug 1164152
Change-Id: I2131d9b24045cd7531454b65d97776b11ec3ab02
The method will now take a response code as an additional
parameter and will validate it against the actual one.
Fixes bug 1156684
Change-Id: Idba3f54ed50b359d9230707fb45e7c5ea68e6b7d
On the host init, starting with a deleted instance which has been
previously evacuated from the host results in an InstanceNotFound
exception. Catch and log this, and then call driver.destroy() so
that the hypervisor driver can clean up the deleted instance.
If we don't do this during host init, it will cause problems during
periodic tasks.
Fixes bug 1155152
Co-authored-by: Devananda van der Veen <devananda.vdv@gmail.com>
Change-Id: I979a698b8e739b9335f37b81e789285f91977a8e
Updates _update_usage_from_migrations so that it grabs the instance
associated with a migration before updating usage.
Bug 1163622
Change-Id: I64acef912ae71ea5c7fb66e9fcaafe5750c63eaf
In order to aid mine (and likely others) understanding of this
code it seems to make sense to document what these special whitelisted
attributes are.
Change-Id: I1c11484fc74e898df5d25ab94ed0cdb288accd67
`content` can be passed in as None, so we need to set it to the empty
list if that occurs.
This also fixes the bad-practice of using a mutable data-type as a
default argument.
Fixes bug 1163598
Change-Id: Ie991c9452a21cfb036d3955a094ec345805d63d1
Instead of previously looping potentially forever for a block
device mapping to become created from the volume api, basically
blocking a greenthread until this happens we now will have a number
of attempts (defaulting to 10) that we will wait for the volume api
to create said block device mapping (or error out).
Fixes bug 1162064
Change-Id: I6ff0b42aad48df735d09f91a0a9fe98e6abcf2eb
Since Eventlet clears exceptions between greenthread switching, we need
to save that exception so it can be re-raised.
The _error_out_instance event handler did not wrap the quotas call with
the save_and_reraise_exception, so the original exception was lost.
Fixes bug 1163552
Change-Id: I69d28917aae1d787351cd800f8996532e5485eb2