Due to the high memory footprint of current Python ns-metadata-proxy,
it has to be replaced with a lighter process to avoid OOM conditions in
large environments.
This patch spawns haproxy through a process monitor using a pidfile.
This allows tracking the process and respawn it if necessary as it was
done before. Also, it implements an upgrade path which consists of
detecting any running Python instance of ns-metadata-proxy and
replacing them by haproxy. Therefore, upgrades will take place by
simply restarting neutron-l3-agent and neutron-dhcp-agent.
According to /proc/<pid>/smaps, memory footprint goes down from ~50MB
to ~1.5MB.
Also, haproxy is added to bindep in order to ensure that it's installed.
UpgradeImpact
Depends-On: I36a5531cacc21c0d4bb7f20d4bec6da65d04c262
Depends-On: Ia37368a7ff38ea48c683a7bad76f87697e194b04
Closes-Bug: #1524916
Change-Id: I5a75cc582dca48defafb440207d10e2f7b4f218b
Security group rule setting remote_ip_prefix 0.0.0.0/0 for ipv4 or
::/0 for ipv6 plays the same role as the sg rules without setting
remote_ip_prefix. We could treat them as duplicate.
Change-Id: Ic9213e77d3b03aded7fc34d486066c8af4a3b2a1
Closes-Bug: #1534113
This deprecates get_locked_port_and_binding and removes
its usage from ML2.
This function was misleading because it uses with_lockmode('update')
which does not actually block concurrent uses in galera multi-writer
deployments. A lock violation in multi-writer will manifest as a
deadlock at that end.
The revision service plugin already provides us with protection from
concurrent updates within a transaction via a compare and swap on the
revision number that will manifest as a staledataerror in races. This
error can then be retried by the retry decorator in the same way a
deadlock on multi-writer would.
This also will help us avoid trying to carry this db locking into
oslo versioned objects.
Partially-Implements: blueprint adopt-oslo-versioned-objects-for-db
Change-Id: Id9f14db607cc5c6ca02293cb7e87bc1e68301808
With the callback system these tests can be simplified greatly.
Their heavy use of mocking has made them difficult to work with
and questionable in value.
These replacement tests are much shorter and verify the expected
transaction semantics without any mocking.
TrivialFix
Change-Id: If9612897cbde8fbe8aa8a19fc946b57e85290ce7
This switches to the use of subqueries for 1-m relationships
which will result in a higher constant query factor but will
eliminate the potential for cross-product explosions.
Closes-Bug: #1649317
Change-Id: I6952c48236153a8e2f2f155375b70573ddc2cf0f
Add support for oslo.db's DBError to is_nested_instance
so we can check for IntegrityErrors in DBErrors easily
that come back from oslo.db.
This will enable the patch that depends on this to detect
port creation/network delete races very easily and retry
them.
Change-Id: I617f2549caced6547d478caba968710ad8f913b3
This patch enhances the tag mechanism for subnet, port, subnetpool,
router resources. The tag-ext as new extension is added so that
tag supports their resources.
APIImpact: Adds tag support to subnet, port, subnetpool, router
DocImpact: allow users to set tags on some resources
Change-Id: I3ab8c2f47f283bee7219f39f20b07361b8e0c5f1
Closes-Bug: #1661608
This adjusts the ML2 dict extend functions to pass the
same session to the drivers that was used to generate
the sqlalchemy object that will be passed to them. This
will prevent reloading objects in a separate session that
can result in a performance hit or reads to an entirely
different server than the one that the object was generated
from.
Partially-Implements blueprint: enginefacade-switch
Change-Id: Id2dbb13e8aa5fcb86fab8e815033e57e6f0e98e8
The namespace proxy should only be handling config options passed in
via commandline. To achieve that it overwrites default config file
detection by explicitely passing in an empty list, however it did
not overwrite default config dir detection.
Starting with oslo.config 3.20.0, a default config_dir setting reads
files from $service.conf.d.
As Newton shipped with oslo.config 3.17, which did not expose this new
feature, this is a fix for Ocata only and does not affect Upgrade.
Change-Id: Id2dffe6f53afbfd48128d91c5d807be8785534eb
Closes-Bug: #1661106
This adds a service plugin to introduce random delays
and deadlocks to DB operations to make it easier for
us to see that retry decorators are correctly applied
and race conditions are handled.
Change-Id: I8e283c1b53165faee548d26b3560a2c883dfb977