13117 Commits

Author SHA1 Message Date
watanabe isao
8f036fd340 Mitigate restriction for fixed ips per dhcp port
When number of fixed ips per dhcp port exceeds max_fixed_ips_per_port,
a dhcp resync will be triggered.

The bug report stated how simply this issue can be triggered.
Moreover, "max_fixed_ips_per_port" value should be used for non-DHCP
port only and DHCP port is not affected by this parameter.

Change-Id: Iaa9ed6949383ba6a7ce0b3ffd9dcced663126317
Co-authored-by: NGUYEN TUONG THANH <thanhnt@vn.fujitsu.com>
Closes-Bug: #1179713
2015-12-31 17:01:00 +07:00
Jenkins
d8a57788a1 Merge "Wrong usage of "an"" 2015-12-30 20:22:48 +00:00
Jenkins
8b66198033 Merge "Wrong usage of "a"" 2015-12-30 20:15:01 +00:00
Kyle Mestery
0de1d8d4ca dhcp: Default to using local DNS resolution
It's pointless to not include default DNS resolution for Neutron.
This adds a new config option (dnsmasq_local_resolv) which defaults
to 'True' and will allow for DNS name resolution to work out of
the box. The caveat is that if the 'dnsmasq_dns_servers' is set it
will override the 'dnsmasq_local_resolv' setting, thus allowing
operators to explicitly set their own DNS servers.

DocImpact: Default to using local DNS resolution with the DHCP agent.

Change-Id: I17a884f467d307432a06f67a9dd93ed2fa6081a3
Closes-Bug: #1466117
Signed-off-by: Kyle Mestery <mestery@mestery.com>
2015-12-30 12:06:16 -06:00
Harshada Mangesh Kakad
4fe1864351 Fixing the deprecated library function.
os.popen() is deprecated since version 2.6. Resolved with use of
subprocess module.

Change-Id: I2ff32c4dc37c543696125ac755dc4adb69ddacdf
Partial-Bug: #1529836
2015-12-30 08:35:44 -08:00
shihanzhang
cb3c6fe8a9 Remove unused variable use_call in ovs-agent
The patch Id28248f4f75821fbacf46e2c44e40f27f59172a9 makes agent
always reporting its state with RPC call() method, so the variable
self.use_call was unused, this patch removes it.

Change-Id: I2e15d9ea2f35dce710858db8c8c6efd8c8304a23
2015-12-30 15:55:35 +08:00
hgangwx
0995ebda7f Wrong usage of "an"
Wrong usage of "an" in the messages:
"Gets called when an port gets added to or removed"
"Create an command to add an OVS bridge"

Should be:
"Gets called when a port gets added to or removed"
"Create a command to add an OVS bridge"

Totally 2 occurrences in Neutron base code.

Change-Id: I40756ed3eff7d2f672b2e0203b59ea5b8ff224c3
2015-12-30 01:15:56 +08:00
hgangwx
283e5db691 Wrong usage of "a"
Wrong usage of "a" in the messages:
"'%s' is not a integer"
"Create a address scope"
"Return True if port has as a allowed address pair"
"But if a agent does not report its status"
"a ipv4 link-local address"
"Retrieve and return a extended information about a network"
"It could be a eui-64 address, a random IPv6 address"
"push a elastic-recheck query for it (see below)"
"is not a enforced requirement"
"a ovs_lib.VifPort object"

Should be:
"'%s' is not an integer"
"Create an address scope"
"Return True if port has as an allowed address pair"
"But if an agent does not report its status"
"an ipv4 link-local address"
"Retrieve and return extended information about a network"
"It could be an eui-64 address, a random IPv6 address"
"push an elastic-recheck query for it (see below)"
"is not an enforced requirement"
"an ovs_lib.VifPort object"

Totally 9 occurrences in Neutron base code.

Change-Id: I0f980fc8c98524db3d194ecb779f76abb37eb31c
2015-12-30 01:15:16 +08:00
Jenkins
a6547e9cf0 Merge "Change log level from error to warning" 2015-12-28 19:20:18 +00:00
Jenkins
f7e2a4080c Merge "Allow to control to use constraint env for functional jobs" 2015-12-28 12:12:39 +00:00
ChangBo Guo(gcb)
06174a41e4 Trival: Remove unused logging import
Change-Id: I13298e642f25c9f70dcff9b1e056b418edf0a461
2015-12-26 12:49:56 +08:00
Jenkins
550ab90c1b Merge "Add tests that constrain db query count" 2015-12-25 16:34:32 +00:00
Akihiro Motoki
477b390b32 Allow to control to use constraint env for functional jobs
VPNaaS functional tests now use dsvm-functional instead of
*-constraints. Always assuming *-constraints breaks the functional
jobs which is not run in a constrainted environment yet.

Paritial-Bug: #1529027
Change-Id: I3a4f1d61d13f1e444f7624d68d121d04d81eb724
2015-12-25 23:40:22 +09:00
Oleg Bondarev
226c999de3 DVR: optimize check_ports_exist_on_l3_agent()
Currently the function gets all ports on the subnet and iterates
through them to find dvr serviceable ports on a particular host.
This patch makes it a single DB query to see if any port exists
matching criterias.

Partial-Bug: #1513678
Change-Id: Ie17885497aacb8fda4a2c4a05f19d08991038557
Co-Authored-By: Oleg Bondarev <obondarev@mirantis.com>
2015-12-25 17:20:05 +03:00
Jenkins
f95dce7785 Merge "Correct state_path option's help string" 2015-12-25 04:52:54 +00:00
Kevin Benton
a8c715ab0f Don't call add_ha_port inside a transaction
Calling add_ha_port inside a transaction will break the delete_port
error recovery logic. This patch prevents the scheduler from doing
that. It also adds a note to add_ha_port and a runtime check to
prevent the function from working with an active transaction.

Change-Id: I39e2bb70527a8ff4a47668f44abb81d0fede3786
Closes-Bug: #1529037
2015-12-24 09:55:06 -08:00
Jenkins
904cdc723b Merge "Ignore non rules related qos_policy changes" 2015-12-24 09:00:54 +00:00
Kevin Benton
18e2117e3d Call _allocate_vr_id outside of transaction
_allocate_vr_id is called from _set_vr_id, which was starting a
transaction before calling it. This caused an error when the retry
logic was triggered inside of _allocate_vr_id since it would
encounter a DB exception and put the transaction into a bad state
that couldn't be used on the retry.

This patch just stops _set_vr_id from starting a transaction because
it didn't serve a purpose. It also stops _allocate_vr_id from allowing
subtransactions when it starts a transaction, since it's retry logic
isn't compatible with them.

Co-Authored-By: Ann Kamyshnikova <akamyshnikova@mirantis.com>
Closes-Bug: #1528201
Change-Id: If7bcae39098f40f5ee9db78d3190bf9fdaf6438b
2015-12-24 01:00:32 -08:00
Jenkins
1a74e569f2 Merge "dibbler: fix import order" 2015-12-24 08:17:49 +00:00
zoukeke@cmss.chinamobile.com
2631a495d8 Change log level from error to warning
The service respawning action of ProcessMonitor is normal handling. So
the log level in external_process.py should not be error.

Closes-Bug: #1528850
Change-Id: Ie335f521b09310a577eb4fb03946dfba484eef61
2015-12-24 12:51:26 +08:00
Jenkins
1a0cbdff78 Merge "Return availability_zone_hints as list when net-create" 2015-12-24 04:12:53 +00:00
lei zhang
fbcf8e6b14 Fix Security-rule's port should not set to 0 when Protocol is TCP/UDP
security rule port can be set value 0 when protocol is TCP/UDP

This patch add port check in def_validate_port_range(self, rule),when
protocol is TCP or UDP,port value 0 should not accepted

APIImpact
Change-Id: I57836d730db602de2a6704fd11a13c74ac38a716
Closes-Bug: #1527016
2015-12-24 02:17:56 +00:00
Jenkins
bf9e4133eb Merge "Add address scope to floating IPs in RPC response to L3 agent" 2015-12-24 00:07:41 +00:00
Jenkins
6dc9a79579 Merge "reject leading '0's in IPv4 addr to avoid ambiguity" 2015-12-23 23:04:40 +00:00
Jenkins
d6287bd5c5 Merge "Add constant to L3 extension for floating ips" 2015-12-23 21:38:35 +00:00
Jenkins
623a2ff0d8 Merge "API: _validate_ip_address should not raise an exception" 2015-12-23 19:42:48 +00:00
Miguel Lavalle
8f4eb2d38f Add constant to L3 extension for floating ips
Add a constant string to the L3 extension to access floating ips in request and
response dictionaries

Change-Id: I161ab583f4eca3a8f0ddda1dd533780591e3423d
2015-12-23 18:34:57 +00:00
Gary Kotton
47a8518e49 dibbler: fix import order
The commit 4b329c345c7820ff12bf25a91228cdfbf99500df added the file
and the imports did not adhere to the existing conventions.

Third party imports should be grouped together.

In addition to this it removes an unncesary new line.

TrivialFix

Change-Id: Ieeb4d20887ba8e90ea4f7850101b97ccd6e86658
2015-12-23 10:34:21 -08:00
Carl Baldwin
02439b6730 Add address scope to floating IPs in RPC response to L3 agent
The L3 agent needs to know the address scope of the fixed ip of each
floating ip because floating ips are a way to cross scope boundaries.
Without the scope information, there could be ambiguity and no way to
know which scope to send it to.

[1] https://review.openstack.org/#/c/189741/

Change-Id: Id9f8c12954a6efbf4d9b99c011652eefbe5f5145
Partially-Implements: blueprint address-scopes
2015-12-23 10:16:15 -07:00
Jakub Libosvar
a459950da3 Add firewall blink + remote SG functional tests
This tests that firewall still does its purpose even when rules are
being updated. That means there is no short period of time where
security groups are inactive during update.

Part of this patch introduces Pinger class. This object provides
capability of sending ICMP packets asynchronously and after
it's stopped it provides statistics like how many packets were
sent and how many were received. Note the difference between
assert_ping() functions, which are synchronous.

Another testing of remote security groups is also added.

Related-bug: #1461000
Change-Id: I6251ee264396f8dbc9b284758b96e5cdc6ac500b
2015-12-23 16:52:02 +00:00
Jakub Libosvar
a94777a005 Add test cases to testing firewall drivers
Part of this patch is also preparation for having common test plan for
firewall driver testing.

Following test cases were implemented:
 - dhcp works by default
 - dhcp server is prevented on vm by default
 - ip spoofing from vm
 - allowed address pairs allows traffic to given ip
 - arp can go through
 - ingress/egress traffic with src/dest port ranges

Related-bug: #1461000
Change-Id: Ib00c99f236855e6556f43f4ffc55014c73b077bb
2015-12-23 16:52:02 +00:00
Jenkins
c429ee18b6 Merge "Run functional gate jobs in a constrained environment" 2015-12-23 16:35:14 +00:00
Irena Berezovsky
aee20b968a Ignore non rules related qos_policy changes
QoSAgentExtension should invoke QoSAgentDriver
to reflush qos policy rules only if there is any rules related change.
QoS policy changes, such as description change, should not cause
reconfiguration of the qos policy rules.

Closes-Bug: #1509232
Change-Id: I036b0449c7b5521adeb32602a0c0e6cf2d27510a
2015-12-23 16:06:26 +00:00
Swaminathan Vasudevan
c2483b73c2 Remove check on dhcp enabled subnets while scheduling dvr
In check_ports_exist_on_l3agent we have an optimization fix
that checks for the subnets associated with the router and if
the subnets have dhcp enabled we go ahead and create the
router if it is a dvr_snat agent.

This was introduced in liberty since we saw some race condition
in the gate with single node failures.
It may not be completely right, since the dhcp agents can
run on non dvr_snat nodes as well.

Based on recommendation from the reviews, and a recent upstream
patch that sends notification on port create, we would want to
remove this and monitor the situation.

This would reduce the load on check_ports_exist_on_l3agent for
non dvr_snat nodes.

Depends-On: I40b8684f6ec9ddd31753f7bbbdb364d1c0ec838a
Related-Bug: #1513678

Change-Id: I0f50dc1101b2013caf03a64a4f48e2d03ea87b26
2015-12-23 23:16:15 +08:00
Jenkins
a5b22858b8 Merge "DVR: Remove get_port call from dvr_update_router_addvm" 2015-12-23 12:33:05 +00:00
Jenkins
de7e9343bd Merge "update docstring for get_ports_on_host_by_subnet" 2015-12-23 11:44:00 +00:00
Jenkins
0bb97acca2 Merge "XenAPI: Fix netwrap to support security group" 2015-12-23 03:46:38 +00:00
Jenkins
ce703f7b91 Merge "Force L3 agent to resync router it could not configure" 2015-12-23 03:46:21 +00:00
armando-migliaccio
fce50f3beb Run functional gate jobs in a constrained environment
This patch modifies the gate hooks to run jobs with upper constraints.

Change-Id: I9eb1eb8e61381e9bb45678af8a24fa88a99e2c8f
2015-12-22 19:31:59 -08:00
lzklibj
044c04fb5d update docstring for get_ports_on_host_by_subnet
This patch updates docstring for get_ports_on_host_by_subnet, to
tell that the method will only get dvr serviced ports, not all ports
for given subnet and host.

Change-Id: I85ea5a9e37b6c894f7d51e73c10143b208a29f0e
2015-12-23 11:28:50 +08:00
Jenkins
455fee6b89 Merge "Updated from global requirements" 2015-12-23 02:54:32 +00:00
YanXingan
4082f729c9 Correct state_path option's help string
Make it consistent with neutron/common/config.py

Change-Id: If7a57247f65280db9dced69068f8c8f5d7e243d5
2015-12-23 10:24:13 +08:00
Jenkins
a3b47c475a Merge "Restore _validate_subnet/uuid_list not to break subproject gates" 2015-12-23 01:50:40 +00:00
OpenStack Proposal Bot
e1115a7de7 Updated from global requirements
Change-Id: I3782e12d497174fa30394f7d0e70d944f992d45f
2015-12-23 00:34:19 +00:00
Jenkins
b600129553 Merge "Don't raise if polling manager is running when stopped" 2015-12-22 21:00:23 +00:00
Jenkins
38fa3ce848 Merge "DVR:Fix _notify_l3_agent_new_port for proper arp update" 2015-12-22 11:14:54 +00:00
Akihiro Motoki
b147f60f9a Restore _validate_subnet/uuid_list not to break subproject gates
https://review.openstack.org/#/c/258867/ removed
_validate_subnet_list and _validate_uuid_list.
_validate_subnet_list is being used in VPNaaS and VPNaaS gate
is now broken. We need to remove validators more carefully
because subprojects may use them.
This commit restores them once.

Change-Id: I9c40b9d67a8364f698cc9bf604e4e1f4caea413e
Closes-Bug: #1528435
2015-12-22 19:22:30 +09:00
Jenkins
fb8200978f Merge "Add abstractmethod to FirewallDriver abstract class" 2015-12-22 09:45:42 +00:00
Assaf Muller
5086a0ba7a Delete test_restart_l3_agent_on_sighup
After looking at the test and its scope, it seems like 100% of the
code it tests is owned by oslo.service. That library has its own tests,
is there value in keeping the test in Neutron?

Change-Id: I0d8a22cc8127e183c1f55790f4b04dea2d30d356
Closes-Bug: #1518921
2015-12-21 17:50:36 -05:00
Jenkins
c4e1402e62 Merge "Add functional test for availability_zone support" 2015-12-21 22:16:07 +00:00