Commit Graph

1532 Commits

Author SHA1 Message Date
OpenDev Sysadmins b0aac7b51b OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:51:24 +00:00
Zuul 1112e6a669 Merge "Added test cases for validating total_ips_per_port quota" 2018-02-07 16:32:33 +00:00
Sourav Banerjee ad28b1d152 Added test cases for validating total_ips_per_port quota
Various test cases for validating total_ips_per_port quota
have been added. These test cases are for public, service
and isolated networks, using both an admin and a non admin
context.

Change-Id: I65b91bdd545c5855bec045f180a506d97bd9693e
Closes-Bug: #1747419
2018-02-07 20:42:43 +05:30
Zuul dbdc35d1cf Merge "Prevent flake8 errors from getting suppressed" 2018-02-06 18:03:10 +00:00
Zuul c4eeb27c3a Merge "Deleting a port without sg does not hit redis" 2018-02-06 17:46:53 +00:00
Sourav Banerjee 38528ca4d6 Prevent flake8 errors from getting suppressed
Flake8 errors, if present, do not show up if run_tests.sh is used. It is
used by Jenkins on creation of a pull request, upon which the tests fail
without flake8 specific information showing up in the log.
Adding PYTHONUNBUFFERED=1 before the flake8 command in run_tests.sh solves
this problem.

Change-Id: I040873b859cca7c0500bd7d600d8de6121cc70a5
Closes-Bug: #1747420
2018-02-05 21:11:02 +05:30
Sourav Banerjee 6e9ae2fc1b Deleting a port without sg does not hit redis
Introduced a check in security_groups.py which calls delete_vif
(which in turn hits redis) only if security_groups is present
in the kwargs passed to the delete_port function.

Introduced changes in test_unmanaged_driver.py which change
test_delete_port by explicitly passing a security_group kwarg &
test_delete_port_redis_is_dead by asserting that delete_vif
isn't  called as there is no security_group kwarg. Added a new
test case test_delete_port_no_security_group that verifies that
delete_vif isn't called if no security_group kwarg (or an empty
list) is passed.

Change-Id: I00648f6d490e883175d6592ae64e8c742d35a035
Closes-Bug: #1747417
2018-02-05 21:07:08 +05:30
Sourav Banerjee d8ed2b6b2b Enhance exc_wrapper to handle internal exceptions
The idea was to reuse the existing exception handling decorator
in quark/utils.py to use the same decorator to handle exceptions
in internal methods. The enhanced decorator accepts an arguement
to specify if we are handling exceptions in an internal method.

Existing exception handling for api methods do not change.
This commit adds the enhanced wrapper and relevant unit tests, in
addition to adding the wrapper to internal calls in ports.py

Change-Id: I2aa2e3bdd06ff8f839f65e462b885c34b024c157
Implements: blueprint enhance-exc-wrapper
2018-02-05 20:33:04 +05:30
inimitableharish 43c8359db5 OnMetal Driver Can't Handle 404s on Port Delete
When quark tries to delete an onmetal port that no longer
exists downstream, it should happily ignore the 404 and
move on.Instead, it complains and retries before eventually
giving up. This is due to not catching the correctexception
from the neutron client.This doesn't present as a 500 to
any clients, as the exception is caught and ignored,
but it gums up the logs and wastes time making requests
multiple times.

Implements: Exception handling
Closes-Bug: #1738277
Change-Id: I4ccd9be891e6c533ceb68427d47ed658bf27f4a8
2018-01-17 10:44:37 +05:30
Kyle Haley 92fa456c71 Removing deprecated dispose method call
The dispose method call against neutron.db.api has been removed in this
iteration of neutron (Ocata). Removing this call as it may not have ever
been needed based on the accompanying comment on that line.

Change-Id: I3d8c5d50650abda8064eb860118ae2e40d3662a5
Closes-Bug: 1714536
2017-09-05 11:14:28 -07:00
Kyle Haley 500817ab95 Adding updates to quark-agent to fix race condition
These updates to redis_base allow quark-agent to check for a potential
race condition that can occur from the time quark-agent acknowledges a
security group rule set needs to be updated and when it acknowledges
that rule set has actually been applied. quark-agent will now store
security group rules before and after it has executed scripts on the
hypervisor. If the rule sets do not match, that means an update has
occurred while the hypervisor scripts were executing. quark-agent will
not ack those changes and allows the next cycle to pick them up.

Change-Id: Ieae13f7b22b8e463cba2ccce82fb94699838926a
Closes-Bug: 1713860
2017-08-29 15:57:34 -07:00
Alexander Medvedev 5546679525 Updates to docker dev deployment
Pinned neutron version and other fixes to make the dev docker env run.

Change-Id: I4bbd121489fa04d871a3665c45f21050cd0bf4c3
Closes-Bug: #1713805
2017-08-29 16:37:11 -05:00
Kyle Haley 025efa5558 Adding additional logging information
Adding additional parameters to gunicorn access log format. This
provides additional information for metrics investigations as well as
for troubleshooting.

JIRA:NCP-2148
Change-Id: Ieb9c4a75cf3c11c9addbb3f7ca3038d47bc657a0
2017-02-17 17:15:33 -08:00
Kyle Haley 0c9b306104 Refactor extensions to align with upstream
Upstream moved ExtensionDescriptor into neutron-lib as well as some
functionality revolved around retrieving the plugin from NeutronManager.
This refactor moves libraries around in order to align quark with
upstream neutron's expectations.

JIRA:NCP2115
Change-Id: Ie922d7778d370491166a00952bec7cea7f7b5a84
2017-02-17 11:53:43 -08:00
Alexander Medvedev c12330227a support update for security group rule
Change-Id: I47aad285b6b7fdf584e0c7215c71f1047965499a
JIRA: NCP-2078
Closes-Bug: #162354
2016-11-25 20:28:59 -06:00
Kyle Haley 97f45f791b Moved base model from neutron.db to neutron_lib.db
Deprecation warnings indicated that model_base and NeutronBaseV2 had
moved to neutron_lib.db.model_base. Fixed imports to prevent future
packaging issues.

JIRA:NCP-2107
Change-Id: Ie0fb0e35eb85939662c1cc6682d109cfcd62caab
2016-11-16 11:45:22 -08:00
Kyle Haley 2dac6968f7 Fixed deprecated libraries in extensions
Some libraries were moved from neutron.api.v2 to neutron_lib in various
locations. The old imports were removed where not needed and new
neutron_lib libraries were added.

JIRA:NCP-2107
Change-Id: Ie7daa4f7a679322e0dc5cd473e1bd26c3b8ba41b
2016-11-16 10:51:47 -08:00
Jenkins 0b093f81c4 Merge "Remove Static Path Sphinx" 2016-10-03 20:14:10 +00:00
Brian Stajkowski e215d3d260 Remove Static Path Sphinx
No static path is required as we don't have anything to move
from a static directory.  This will ensure the gate tests pass.
Also, moved docs to doc as gate failure isn't looking at docs
folder, and updated tox environment run.

Change-Id: I2d6d7e42eafef8e052006a4938e7950279f2f60c
Closes-Bug: #1628113
2016-10-03 19:53:47 +00:00
Jenkins d0d8e8567a Merge "Made sg updater elevate during job creation" 2016-10-03 17:00:25 +00:00
Jenkins 66d8a74761 Merge "Fix oslo_db deprecation warnings" 2016-09-29 14:00:11 +00:00
Alexander Medvedev 6770597bc3 Extended security groups API to include FAWS fields
Added new fields: "external_service" and "external_service_id"

Change-Id: I0ec8427893f7838847883761de9c2349fa4a00ba
JIRA: NCP-2078
Closes-Bug: #1624354
2016-09-28 14:55:39 -05:00
Justin Hammond 12208f4f2d Made sg updater elevate during job creation
Change-Id: I232dca65c9be3427c95c300eaafaa84f401b40b7
JIRA:NCP-1172
2016-09-23 11:57:10 -05:00
Kyle Haley 2c748d7937 Fix oslo_db deprecation warnings
Migrate neutron.db.sqlalchemyutils.paginate_query to
oslo_db.sqlalchemy.utils.paginate_query. All calls to
to paginate_query now require a sort key, so tests and
defaults had to be updated which trickle down to
paginate_query in quark/db/api.py .

JIRA:NCP-2067
Change-Id: I9133c5d8e128e62fbf4e23004315a3bb55891db6
2016-09-19 13:13:23 -07:00
Alexander Medvedev 764224c456 FAWS: added DB fields for SG migration tool.
Change-Id: I4733ed43c160ab449394918ed61cc6636e595eb8
Closes-Bug: #1623727
JIRA: NCP-2077
2016-09-14 19:24:14 -05:00
Kyle Haley 391fd5bb7c Fix with statement deprecation warnings
Refactor nested statements for multiple context managers to
remove deprecation warnings. Additionally, refactor imports
to use current exception libraries.

JIRA:NCP-2066
Change-Id: Ie3953d109c13d03bf5028d54dc3f53d8d3649315
2016-08-31 18:15:13 -07:00
Kyle Haley 8d49a9ef6b Add constraints file to fix cryptography version
Adding constraints file to limit cryptography version.

JIRA:NCP-2061
Change-Id: I12bdd46fd017814016b71667faf59f21ca5dee03
2016-08-30 09:24:35 -07:00
Kyle Haley 68af52752a Fix deprecation warnings with _ in _i18n
Deprecation warnings began popping up in tox tests. We needed
to import the _ function from neutron._i18n . We can no longer use
the built in _ function.

ATTR_NOT_SPECIFIED was moved from neutron.api.v2 to
neutron_lib.constants . Changed imports to resolve
the deprecation warning.

JIRA:NCP-2058
Change-Id: I78d66de235d827ab8eeb53e4c48f38c233b73d10
2016-08-30 07:47:54 -07:00
Alexander Medvedev 6a56ce2e60 enable_dhcp should be explicitly set to False in create_subnet
Change-Id: I900cd9417c9b21e336ac39db89aefc8b5cdf5fbb
JIRA:NCP-1997
Closes-Bug: #1618173
2016-08-29 15:21:12 -05:00
Alexander Medvedev 01516fd828 load_admin_roles is not a valid argument
Change-Id: I2618592c8af863dafa2049e6d6075bb9f3b109e9
JIRA:NCP-2056
Closes-Bug: #1618162
2016-08-29 13:10:23 -05:00
Justin Hammond 60fb3f908a Work on making worker plugins
JIRA:NCP-1172

Fixed redis-base to use configurable min_sentinels

Must enable environment variable for this to work

SG Update workflow:

- PUT to /security-groups
    - Parent task is made and sent to producer RPC
         - Creates the task id and then returns it to the main call
         - Then starts making sub tasks for each port associated with the SG
            - Each sub task will perform the required redis calls and update
              its provided subtask to completed (or error)
- Returns normal SG body + task information

Updated the workflow to use the rule_id as the resource_id for the TX

Transactions now autocomplete after updating their subtransactions

Conflicts:
	quark/db/migration/alembic/versions/HEAD

Change-Id: I44545f2edb410d19e3156ee934dca283857c10d9
2016-08-26 10:27:17 -05:00
Jenkins 24d4d0a302 Merge "Enable DeprecationWarning in test environments" 2016-08-15 15:55:19 +00:00
Jenkins 198c6cc117 Merge "Add ability for admins to reserve ip addresses" 2016-08-12 19:55:41 +00:00
Jenkins ef9c07e77c Merge "Add ability to enable/disable drivers by region" 2016-08-12 17:47:46 +00:00
Kyle Haley a6025cd1d5 Add ability for admins to reserve ip addresses
Give users with admin context the ability to reserve a deallocated
ip address. Also, give users with admin context the ability to get
information about IP addresses that have been deallocated.

JIRA:NCP-1884
Change-Id: I75358a1fd3b10af293a496d662020cc94b227ec4
2016-08-12 08:26:44 -07:00
Kyle Haley 2f9ae126cb Add ability to enable/disable drivers by region
Currently, POST to ports can specify a driver (ex. - ironic)
that would attempt to access resources that do not exist in
that region. Adding ability to enable/disable drivers by region
using neutron.conf

Change-Id: Id9fc1bcf2daba14d970b500165544256f373bdbb
JIRA:NCP-1810
2016-08-11 13:30:23 -07:00
Kyle Haley c6f5207967 Throw meaningful exception bad network config
In the unmanaged driver, create port will fail with a KeyError
if a network_id is used that isn't configured properly in
neutron.conf (ie - bridge isn't defined). Added checks and
meaningful error for users.

Change-Id: Ief9c2371100063ff679858abc5fdf7cc24ec9dda
Closes-Bug: #1611440
JIRA:NCP-2012
2016-08-10 13:59:56 -07:00
Henry Gessau 1fb34ad8e6 Enable DeprecationWarning in test environments
Many deprecations are triggered early (on imports, for example)
before the warnings are enabled by the WarningsFixture in the
base test class.

To make sure all DeprecationWarning messages are emitted we enable
them via the PYTHONWARNINGS environment variable.

Change-Id: Ica6397a04efdb089b2ae631906886b3ac44862f5
2016-08-10 14:26:33 +00:00
Justin Hammond 229843006f Accept new column name for tenant_id
JIRA:NCP-2032

Uses project_id for tenant_id column now and will 'alias' the lookups
appropriately.

Change-Id: I3e3cdd69b8fefaa1336344aedbfd8f30d42193b7
2016-08-09 12:32:48 -05:00
Jenkins 79b768afed Merge "Finalize Docker Images" 2016-07-29 17:04:12 +00:00
Jenkins 3348bb8873 Merge "Cleanup README.rst" 2016-07-29 16:58:32 +00:00
Brian Stajkowski 076a75f48f Move Neutron Install Req to Test-Req
Move requirement for neutron to test-requirements as this is for
tox testing.  PIP installations are failing due to this.

Change-Id: I54f218ec6d522296def62522d416518534659109
2016-07-26 15:22:57 -07:00
Alexander Medvedev be9f815458 Fixes for quark UT warnings
Silenced a few more warnings from UTs.
Many subnet create_ and update_ methods add new objects to the session.
Unit tests, however, mock those methods frequently.
Hence, the objects are not added to the session, which results in multiple warnings.
Since, we test the logic and don't care about the actual data written to
a database, we can also mock the session commit method to avoid warnings.

Change-Id: I6c129e801f25876b03e28c863328d3ad391034ad
Closes-Bug: #1604970
JIRA:NCP-1835
2016-07-20 16:30:39 -05:00
Major Hayden 71ceeabc68
Cleanup README.rst
This patch fixes some dangling whitespace and an indention problem
around the removal of the six module.

Change-Id: Iae56c3ca1ea7e1eccacff2695ab5a288469faae8
2016-07-18 15:07:37 -05:00
Brian Stajkowski bc719c05cc Finalize Docker Images
Docker images set in place with working build packages.  This is
the last iteration of these images.

Change-Id: I29b44e03e9e7835ecd900187559ef8219561f0b9
2016-07-18 12:32:18 -07:00
Alexander Medvedev f4f0f92158 Stop db migration warning
A warning similar to this is issued during the quark's test suite run:
quark/.tox/py27/local/lib/python2.7/site-packages/alembic/util/messaging.py:69:
UserWarning: Skipping unsupported ALTER for creation of implicit
constraint
The fix is to re-implement column add/drop using batch ops.

Change-Id: I2b00da332254a42d20d2bf34a59cef03e50ef133
Closes-Bug: #1603586
JIRA:NCP-1835
2016-07-15 19:01:21 -05:00
Jenkins a4e2fd5367 Merge "Fixes to ip billing after integration testing" 2016-07-15 19:03:27 +00:00
Alexander Medvedev c0a5a6bb59 Fixes to ip billing after integration testing
* do not notify of ip address create/delete events when create failed
* fixed double notify for ipv6 addresses
* fixed timestamps to always set microseconds to 0 to conform to Yagi
* added rollback detection to CommandManager
* added CommandManager UT

Change-Id: Ied17d344b5b5773907495f4b34bf1cd3e1e89b8e
JIRA:NCP-2002
Closes-Bug: #1602708
2016-07-14 09:58:26 -05:00
Jenkins a03c663804 Merge "Update Docker Images" 2016-07-13 19:17:41 +00:00
Brian Stajkowski 929542ee0e Remove Quark.Wiki Submodule
Remove quark.wiki

Change-Id: Ieb1688fcb0c91461c0f0c3818de111bd5854c65e
2016-07-13 10:23:27 -07:00