An implementation to trigger crash dump depends on hypervisors. Inject_nmi is
just a libvirt implementation. The driver API name should be
"trigger_crash_dump" for the abstraction.
This patch only changes names of the driver API and an Exception. It has no
functional changes.
Change-Id: Icef57d346fac7f92132bc14e22d5b2652397a64a
Closes-Bug: 1547362
RPC API and ComputeManager both contain a function named
remove_volume_connection with the same arguments, but ordered
differently. This causes problems when called by
_rollback_live_migration.
This fix is more for future consistency, as this was affecting the
_ComputeV4Proxy class, which is present in stable/kilo but
no longer exists.
Change-Id: Iacadd5f015888c4181b8a332625ec746f991e239
Closes-Bug: #1538619
As data migrations can be of arbitrary complexity, it is very difficult
to nail down a framework other than just a method call that does all the
work. We want to be able to control how much work is done during each
run, but that's about it.
After writing a method that does the migrations, optionally limited by
the max_count argument that can be passed in, developers who introduced
the migration will just need to declare it as part of the
online_migrations tuple on the DbCommands class, and the operators can
simply run a single online_data_migration command to migrate all the
declared migrations.
See tests for some simple examples.
Change-Id: I23810de8fc0d3875daf19af08bc9b57461f177ee
Currently when, e.g., port binding fails on destination host nova
loses track of running VM. Operator needs to change record in DB
manually in order to recover VM in nova and then perform operations
on destination host to repair such VM. Because VM is on destination
host already it should be updated regardless of post live migration
at destination result.
Change-Id: Ibb5158f453abd9717e6d2ab501295351ca9d0dcf
Closes-Bug: #1379581
There is a duplicate dictionary key entry in test_vmops.py.
Removed duplicate key 'display_name' from dictionary.
TrivialFix
Change-Id: I4e779bceb26077b95bd3ae4ab19e60152c126e34
During live migration, there maybe exception when let scheduler
select destination, and live migration will abort. But the task
state of the instance still keep migrating, then we can not take
any action on this instance.
We need to recover the state of the task as None.
We should also recover the vm_state.
Change-Id: If1cae8f4c9037f7821554a94d4440f66d9538794
Closes-bug: #1536916
One use-case of guest VM network protection using SRIOV ports is having
two direct ports connected to a VM, each one is related to a network that
is connected to a different physical NIC on the host (e.g. phyNet1 on
eth0 and phyNet2 on eth1). In this use-case, due to some physical NICs
limitations it's advised to configure both ports with the same MAC
address (or else outgoing or incoming traffic will not reach its
destination in case of fail-over).
Snapshot creation on such VMs fails since libvirt's detach-interface
doesn't know which interface of the two to detach and fails. This is why
I've changed the call inside _detach_sriov_ports from (the equivalent
of) detach-interface to _detach_pci_devices with the source-device
pci address of the SRIOV VF (always present in the context of SRIOV
of course).
This fix was tested on a real environment containing the above type of
VMs. test_driver.test_detach_sriov_ports was slightly modified so
that the VIF from which data is sent to _detach_pci_devices will
contain the correct SRIOV values (pci_slot, vlan and hw_veb VIF type)
Change-Id: If3edc1965c01a077eb61984a442e0d778d870d75
Closes-Bug: #1529785
Having the truncation step as the last one meant we could truncate to
a trailing hyphen. This could potential cause a failure for an invalid
name. This commit reorders the normalization to put the truncation as
the first step which should avoid that problem.
Change-Id: I2219f6c73d882efc787127f02fda937f3e3b44eb
Closes-Bug: #1545153
This patch causes us to allocate a UUID for ComputeNode on create or
when loaded from the database. Since we don't currently have them,
query needs to handle this case to migrate us to the point where we
can add a uniqueness and non-null-ness constraint on that column in
the database. We take a small hit every time we query a compute node
that doesn't have a uuid, by generating it and saving it back to the
database immediately, but this only happens once.
Related to blueprint compute-node-inventory
Change-Id: I9e8bd5f2ed064923ed04feb864b42e4b2948812d
setUp calls rpc.init() twice for each test, once in each of:
self.useFixture(conf_fixture.ConfFixture(CONF))
self.useFixture(nova_fixtures.RPCFixture('nova.test'))
Stop calling rpc.init() in ConfFixture, and defer to RPCFixture for
initialization.
The calls to rpc.init() in ConfFixture were taking 0.01 seconds each.
0.01 seconds * 14784 tests = 2.5 minutes
Change-Id: I710399b9b9286884f3ed71522d2697680951c20e
Adds units tests for the changes made to the Neutron API to use the instance
hostname for Neutron. Also, a release note is added and some comments are
fixed.
Change-Id: Ie74cb5ee71ea464d0863b14577c7dc2c9b534cf6
Implements: blueprint neutron-hostname-dns
We want to make this part of the API the framework for building
nova-manage scripts hooks into, so we want to make sure the name
reflects this. We also add a no-op method to the NovaObjects base class
to emphasize this.
In the future we may want to add more knobs to this interface but that
should be easily doable since that method is not remotable.
Change-Id: Ia54101a017b735fb972d58b50c9cae37494872e5
The default value for the "live_migration_uri" flag should be
dependent on the "virt_type" flag, as the "connection_uri" flag is. This
way, an operator can set the "virt_type" flag without the need to check
for each individual uri.
DocImpact: Changed the default value of the "live_migration_uri" flag,
that now is dependent on the "virt_type".
Closes-Bug: #1298242
Change-Id: Id54f7bdfa14a19da41da554b13ba9496ee525c71
While reviewing config centralization patches I realized that
we have a fair few files where we import cfg or setup CONF, but
never actually use config variables.
This patch cleans those up, but I am sure we'll add more as we
move more flags around.
Change-Id: I5851bbae2fa198a4e9be149a5836bea813848d89
Newer versions of pysaml2 uses pycryptodome, so if by
accident if this library gets installed, Nova breaks.
paramiko folks are working on this:
https://github.com/paramiko/paramiko/issues/637
In the meanwhile, we should tolerate if either pycrypto
or pycryptodome is installed.
Closes-Bug: #1545370
Change-Id: If88beeb3983705621fe736995939ac20b2daf1f3
We already moved the CPU and RAM ratios to the compute nodes in Liberty
but we forgot to add the disk one. Adding it now.
That change specifically implies that nova.conf is consistent across the whole
cloud since what was formerly defined on the scheduler side will have its
definition by the compute nodes.
Co-Authored-By: Sylvain Bauza <sbauza@redhat.com>
UpgradeImpact
Change-Id: Id4b44dc4c3391563154a30406a5f1e7a2dc015b3
Partially-Implements: blueprint disk-allocation-ratio-to-rt
Displaying deleted flavor details throws 500 internal server error.
Added 404 HttpNotFound status code in "@extension.expected_errors".
APIImpact: Return 404 status code for list extra specs
for a deleted flavor.
Closes-Bug: #1538896
Change-Id: Iba33296c28c3c3d6ba60052fe434107ac9c00c61
ppc64le apparently is the same as other ppc plaforms in it's video
selection. This one line fix was put into a reported bug and addresses
this for people.
Co-Authored-By: xiaojinwei001@163.com
Change-Id: I44283f19823bf39159633fa93f575e306bcf1970
Closes-Bug: #1523742
The unit tests around instance multiple create were faking out the uuid
of the created instances to be aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa.
This worked because the instances are not actually created in the
database so unique constraints aren't violated.
However this led to mocking out the create for the RequestSpec object
which should not have been necessary because there is a database
available to these tests. That would have been fine except that there is
work in progress which relies on the RequestSpec having been written to
the database and getting that to pass tests was starting to rely on
mocks upon mocks upon mocks. Rather than go down that route this unwinds
the test strategy that requires the mocks in the first place.
Change-Id: I356d603bff59d49a9a44c59e0b99f9c16998b37e
populate_security_groups expects an instance object to be passed in and
just sets security_groups on it. An upcoming change needs this method
to return the SecurityGroupList object instead because it will not be
getting set on the instance at this point. This simply changes the
method to return the object rather than setting it on the instance.
Change-Id: Ifa40fc061ea041cfcc229ee7255b3c084f3bba6f