Commit Graph

58857 Commits

Author SHA1 Message Date
Balazs Gibizer a22fe2da97 Bump os-resource-classes to 1.1.0
The 1.1.0 lib contains the new packet rate related resource classes

Change-Id: Id5a720d91ee9bb0e660823219ec5a6b55bf523a1
2021-07-16 15:41:37 +02:00
Zuul 3545356ae3 Merge "tests: Silence SQLAlchemy warnings" 2021-07-15 11:43:52 +00:00
Stephen Finucane 0aea2ac903 tests: Silence SQLAlchemy warnings
While we wait for keystone to merge the patch to unblock oslo.db 10.0.0,
silence these warnings from newer versions of SQLAlchemy. TODOs are left
since we don't want to keep these around forever.

Change-Id: If48dd949ec4d69a09c87178f16d56a2517e21fd8
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2021-07-15 10:46:01 +01:00
Zuul 8354a75ad2 Merge "Use neutronclient's port binding APIs" 2021-07-14 18:43:05 +00:00
Stephen Finucane 982e2ee02d Use neutronclient's port binding APIs
Take advantage of the neutronclient bindings for the port binding APIs
added in neutronclient 7.1.0 to avoid having to vendor this stuff
ourselves.

Change-Id: Icc284203fb53658abe304f24a62705217f90b22b
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2021-07-14 11:19:11 +01:00
Zuul 9e7cd66869 Merge "docs: Replace 'nova boot' with 'openstack server create'" 2021-07-14 01:36:51 +00:00
Zuul 28665191f5 Merge "Make test_archive_task_logs deterministic" 2021-07-13 18:00:43 +00:00
melanie witt 87dba379ac Make test_archive_task_logs deterministic
The 'nova-manage db archive_deleted_rows --task-log' functional tests
involve manipulating time to assert archive behaviors when the --before
flag is also used.

While timedelta was used, set_time_override was not, so depending on
the date the test ran on + the number of days in the current month and
next two months, the test could fail. Task log audit periods are one
calendar month by default and the compute manager calls
last_completed_audit_period() without specifying a unit.

This changes the tests to use a time override to ensure predictable
behavior with regard to the audit period boundaries. The tests were
moved into their own test case classes in order to override the time
before services were started, so that the "service up" calculations
work as expected.

Closes-Bug: #1934519

Change-Id: I9b16a3a849937aba5b90ed1ab9a80b7f0103f673
2021-07-09 22:40:11 +00:00
melanie witt b84787d26a Add func test for nova-manage db archive_deleted_rows --before
This is inspired by database query filtering that occurs when --before
is passed to nova-manage db archive_deleted_rows. There is a comparison
WHERE deleted_at < before and not all database records populate it.

This verifies that no records are missed due to that comparision when
archiving with --before.

Related-Bug: #1751192

Change-Id: I44b79cfb236e94444740e32b0dd0a2344c29f340
2021-07-08 19:33:34 +00:00
Stephen Finucane d88fe2895b docs: Replace 'nova boot' with 'openstack server create'
Replace references to novaclient with OSC in the boot from volume guide.

This is essentially a revert of commit aa3964118, which was a revert of
an earlier attempt at doing this that fell down because it didn't
reflect the changes in CLI parameters between the different tools.

Change-Id: Ic99440dd618243517f64506e3da88885fc2c44c9
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2021-07-07 13:29:07 +00:00
Stephen Finucane 9cdecc81fb api: Handle invalid volume UUIDs during spawn
If a user requests an invalid volume UUID when creating an instance,
a 'VolumeNotFound' exception will be raised. This is not currently
handled. Correct this.

Change-Id: I6137dc1b6b51321fee1c080bf4b85197b19bf223
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-Bug: #1930448
2021-07-07 14:28:02 +01:00
Zuul eca7606251 Merge "[ironic] Minimize window for a resource provider to be lost" 2021-07-07 12:18:34 +00:00
Ghanshyam Mann dfda0c0482 Fix oslo policy DeprecatedRule warnings
Since 3.7.0, oslo policy started the DeprecationWarning[1] if
deprecated_reason and deprecated_since param are not passed
in DeprecatedRule or they are passed in RuleDefault object.

[1] https://github.com/openstack/oslo.policy/blob/3.7.0/oslo_policy/policy.py#L1538

Change-Id: Idbbc203c6ae65aee29f9463a4911bae2bb541f41
2021-07-04 16:00:55 -05:00
Zuul e7a7fd51d1 Merge "db: Clean up migration code" 2021-07-03 05:23:37 +00:00
Julia Kreger f84d5917c6 [ironic] Minimize window for a resource provider to be lost
This patch is based upon a downstream patch which came up in discussion
amongst the ironic community when some operators began discussing a case
where resource providers had disappeared from a running deployment with
several thousand baremetal nodes.

Discussion amongst operators and developers ensued and we were able
to determine that this was still an issue in the current upstream code
and that time difference between collecting data and then reconciling
the records was a source of the issue. Per Arun, they have been running
this change downstream and had not seen any reoccurances of the issue
since the patch was applied.

This patch was originally authored by Arun S A G, and below is his
original commit mesage.

An instance could be launched and scheduled to a compute node between
get_uuids_by_host() call and _get_node_list() call. If that happens
the ironic node.instance_uuid may not be None but the instance_uuid
will be missing from the instance list returned by get_uuids_by_host()
method. This is possible because _get_node_list() takes several minutes to return
in large baremetal clusters and a lot can happen in that time.

This causes the compute node to be orphaned and associated resource
provider to be deleted from placement. Once the resource provider is
deleted it is never created again until the service restarts. Since
resource provider is deleted subsequent boots/rebuilds to the same
host will fail.

This behaviour is visibile in VMbooter nodes because it constantly
launches and deletes instances there by increasing the likelihood
of this race condition happening in large ironic clusters.

To reduce the chance of this race condition we call _get_node_list()
first followed by get_uuids_by_host() method.

Change-Id: I55bde8dd33154e17bbdb3c4b0e7a83a20e8487e8
Co-Authored-By: Arun S A G <saga@yahoo-inc.com>
Related-Bug: #1841481
2021-07-02 13:02:02 -07:00
Zuul d03a600461 Merge "db: Synchronize function signatures" 2021-07-01 20:16:18 +00:00
Zuul e7c18ef9bf Merge "db: Copy docs from 'nova.db.*' to 'nova.db.sqlalchemy.*'" 2021-07-01 20:15:55 +00:00
Zuul efd9a4212b Merge "db: Remove 'nova.db.base' module" 2021-07-01 19:52:32 +00:00
Zuul 433267147b Merge "db: Fold in ForeignKey constraints" 2021-07-01 19:52:03 +00:00
Zuul 958d958ba2 Merge "fix sr-iov support on Cavium ThunderX hosts." 2021-07-01 17:27:09 +00:00
Zuul 3daf6d5fe5 Merge "Make explicit the network backend used in the CI jobs" 2021-06-30 19:44:54 +00:00
Zuul ee3b492506 Merge "Improve policy doc for supported scope info" 2021-06-29 17:49:53 +00:00
Zuul 80c9aec5a6 Merge "Remove PROJECT_ADMIN limitation from zero-disk and external-network policy" 2021-06-29 17:49:26 +00:00
Zuul f17c1ed7ab Merge "Make test_refresh_associations_* deterministic" 2021-06-29 17:15:24 +00:00
Zuul b280ab292b Merge "Fix typos in minimum version policy docs" 2021-06-29 17:14:27 +00:00
Zuul a70137f1d8 Merge "Add test coverage for API version headers in CORS" 2021-06-29 17:13:44 +00:00
Zuul 25e2184849 Merge "Fix error '404 Not Found'" 2021-06-29 13:15:43 +00:00
Sean Mooney a569a51fed fix sr-iov support on Cavium ThunderX hosts.
This change is a partial revert of
Ibf8dca4bd57b3bddb39955b53cc03564506f5754
to reintoduce a try-except which is required for
some non standard hardware.

On the Cavium ThunderX platform, it's possible to have
virutal functions which are netdevs which are not associated
to a PF. This causes the PF name lookup to fail.
Prior to Ibf8dca4bd57b3bddb39955b53cc03564506f5754
when the lookup failed it was caught and we skipped
populating the parent PF interface name.

This change restores that behavior.

Closes-Bug: #1915255
Change-Id: Ia10ccdd9fbed3870d0592e3cbbff17f292651dd2
2021-06-28 12:48:26 +00:00
Zuul 1f6c351712 Merge "zuul: Add nova-tox-functional-centos8-py36 job" 2021-06-25 15:40:20 +00:00
Zuul 9311f54149 Merge "tests: Allow bindep and test-setup.sh to run on EL distros" 2021-06-25 15:17:09 +00:00
Zuul 6b727634bc Merge "db: Fold in indexes" 2021-06-25 12:56:58 +00:00
Zuul ff40fb77c9 Merge "db: Use module-level imports for sqlalchemy" 2021-06-25 12:09:55 +00:00
Rodolfo Alonso Hernandez 17cca270a6 Make explicit the network backend used in the CI jobs
All Neutron CI jobs (except for unit, functional and fullstack jobs),
have explicitly defined the network backend used:
- linuxbridge
- ovs
- ovn

That was discussed and approved during the Neutron CI meetings [1].

[1]https://meetings.opendev.org/meetings/neutron_ci/2021/neutron_ci.2021-06-15-15.00.log.html

Depends-On: https://review.opendev.org/c/openstack/neutron/+/797051
Change-Id: I23889eb8ebc5911f6ac6c283bcd7316271a77715
2021-06-23 13:05:35 +00:00
Zuul e2f3d8f5ec Merge "Fix max cpu topologies with numa affinity" 2021-06-22 17:08:30 +00:00
Zuul 5979c64846 Merge "Test numa and vcpu topologies bug: #1910466" 2021-06-21 14:19:10 +00:00
Zuul 44ae850d3b Merge "api: Log correct client IP if load balancer in use" 2021-06-21 12:36:58 +00:00
ericxiett c31d3f96b1 Fix error '404 Not Found'
The link of `TLS everywhere` should be 'https://docs.openstack.org/
project-deploy-guide/tripleo-docs/latest/features/tls-everywhere.html'.

Closes-Bug: #1933062
Change-Id: I468b82edeb899b0a780f8b545ad23ee0428a93ea
2021-06-21 15:04:43 +08:00
Zuul a6983621d4 Merge "db: Remove unused DB methods" 2021-06-19 13:28:43 +00:00
Zuul 2b9bb13b76 Merge "db: Reintroduce validation of shadow table schema" 2021-06-19 01:04:15 +00:00
Zuul d4fef9c7b8 Merge "db: Remove 'nova.db.sqlalchemy.utils'" 2021-06-19 01:03:53 +00:00
Zuul 6f0256a8cc Merge "Handle OPERATION_FAILED error during detach" 2021-06-18 16:22:09 +00:00
Zuul 97f1741352 Merge "Add --task-log option to nova-manage db archive_deleted_rows" 2021-06-18 11:54:56 +00:00
Lee Yarwood b5b2e99824 zuul: Add nova-tox-functional-centos8-py36 job
The nova-tox-functional-py36 job was replaced with the current py38
version during Victoria by I1d6a2986fcb0435cfabdd104d202b65329909d2b.

However as clearly stated in both the Victoria and Xena runtime
reference documents python 3.6 remains supported through CentOS 8 and
later CentOS 8 stream.

This change reintroduces functional test coverage for py36 using a
CentOS 8 stream based job.

[1] https://governance.openstack.org/tc/reference/runtimes/victoria.html
[2] https://governance.openstack.org/tc/reference/runtimes/xena.html

Change-Id: I6ef77bd92f2595016a99d1953414d3f554f6b2eb
2021-06-18 12:34:44 +01:00
Lee Yarwood 085de864db tests: Allow bindep and test-setup.sh to run on EL distros
Only install mariadb on EL based hosts. Also when using mariadb and
postgresql on EL based distros we need to ensure each service is
configured and actually started before using either.

Co-Authored-By: Ade Lee <alee@redhat.com>
Change-Id: I7122933d85bd7d0333c2c35e0f1a8414c1baa6d5
2021-06-18 12:34:27 +01:00
Sean Mooney 387823b36d Fix max cpu topologies with numa affinity
Nova has never supported specifying per numa node
cpu toplogies. Logically the  cpu toplogy of a guest
is independent of its numa toplogy and there is no
way to model different cpu toplogies per numa node
or implement that in hardware.

The presence of the code in nova that allowed the generation
of these invalid configuration has now been removed as it
broke the automatic selection of cpu topologies based
on hw:max_[cpus|sockets|threads] flavor and image properties.

This change removed the incorrect code and related unit
tests with assert nova could generate invalid topologies.

Closes-Bug: #1910466
Change-Id: Ia81a0fdbd950b51dbcc70c65ba492549a224ce2b
2021-06-18 12:34:22 +01:00
Sean Mooney fe25fa13e0 Test numa and vcpu topologies bug: #1910466
This change reproduces bug #1910466
When hw:cpu_max_[sockets|cores|threads] is configured
in addition to an explict numa topologies and cpu pinning
nova is currently incapable of generating the correct
virtual CPU topology resulting in an index out of range
error as we attempt to retrieve the first topology
from an empty list.

This change reproduces the error via a new functional
test.

Related-Bug: #1910466
Change-Id: I333b3d85deed971678141307dd06545e308cf989
2021-06-18 12:15:27 +01:00
Zuul a0ec2de968 Merge "Move 'check-cherry-picks' test to gate, n-v check" 2021-06-17 21:42:14 +00:00
Zuul c9fd0c2951 Merge "gate: Remove test_evacuate.sh" 2021-06-17 12:19:23 +00:00
Zuul b60144e026 Merge "db: Remove dead code" 2021-06-17 12:19:00 +00:00
Stephen Finucane 4de5a92d4e db: Reintroduce validation of shadow table schema
This was removed in change I9b964c8e68051a995635a3d5f5aa09af2b0dcb82 but
it's still a valid thing to do. Reintroduce it, cleaning up the test in
the process by removing references to dump tables (which were removed
entirely in change I17db7cdaad2c6368092b4fb00d5959711ad249f9) as well as
references to migrations that no longer exist as they've been squashed.

Change-Id: I70219a094e473da113c9855b610c11faea50f3b3
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2021-06-17 11:10:22 +01:00