Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1193582

Summary: [Neutron][Staypuft] Single Controller fails to create router
Product: Red Hat OpenStack Reporter: Joe Talerico <jtaleric>
Component: ruby193-rubygem-staypuftAssignee: Scott Seago <sseago>
Status: CLOSED ERRATA QA Contact: Alexander Chuzhoy <sasha>
Severity: high Docs Contact:
Priority: high    
Version: 6.0 (Juno)CC: aberezin, adahms, ajeain, dmacpher, ftaylor, kambiz, mburns, rhos-maint, yeylon
Target Milestone: z2Keywords: ZStream
Target Release: Installer   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ruby193-rubygem-staypuft-0.5.0-20.el7ost Doc Type: Bug Fix
Doc Text:
Previously, the default value of the 'l3_ha' option was set to 'true' in all circumstances. This would cause deployments with a single controller to fail or exhibit errors such as "HANotEnoughAvailableAgents: Not enough l3 agents" when running neutron-related commands under certain conditions. With this update, the 'l3_ha' option is now automatically set to 'false' in deployments with a single controller, preventing neutron-related commands from failing due to this state.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-07 15:08:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joe Talerico 2015-02-17 16:03:21 UTC
Description of problem:
Deploying with a single controller then trying to create a router results in error: 

2015-02-17 10:53:53.005 423 ERROR neutron.api.v2.resource [req-ea6ef748-2191-4aa1-895c-e16f22a10b90 None] create failed
2015-02-17 10:53:53.005 423 TRACE neutron.api.v2.resource Traceback (most recent call last):
2015-02-17 10:53:53.005 423 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/site-packages/neutron/api/v2/resource.py", line 87, in resource
2015-02-17 10:53:53.005 423 TRACE neutron.api.v2.resource     result = method(request=request, **args)
2015-02-17 10:53:53.005 423 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/site-packages/neutron/api/v2/base.py", line 448, in create
2015-02-17 10:53:53.005 423 TRACE neutron.api.v2.resource     obj = obj_creator(request.context, **kwargs)
2015-02-17 10:53:53.005 423 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/site-packages/neutron/db/l3_hamode_db.py", line 360, in create_router
2015-02-17 10:53:53.005 423 TRACE neutron.api.v2.resource     self.delete_router(context, router_dict['id'])
2015-02-17 10:53:53.005 423 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/site-packages/neutron/openstack/common/excutils.py", line 82, in __exit__
2015-02-17 10:53:53.005 423 TRACE neutron.api.v2.resource     six.reraise(self.type_, self.value, self.tb)
2015-02-17 10:53:53.005 423 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/site-packages/neutron/db/l3_hamode_db.py", line 356, in create_router
2015-02-17 10:53:53.005 423 TRACE neutron.api.v2.resource     self._create_ha_interfaces(context, router_db, ha_network)
2015-02-17 10:53:53.005 423 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/site-packages/neutron/db/l3_hamode_db.py", line 299, in _create_ha_interfaces
2015-02-17 10:53:53.005 423 TRACE neutron.api.v2.resource     num_agents = self.get_number_of_agents_for_scheduling(context)
2015-02-17 10:53:53.005 423 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/site-packages/neutron/db/l3_hamode_db.py", line 265, in get_number_of_agents_for_scheduling
2015-02-17 10:53:53.005 423 TRACE neutron.api.v2.resource     num_agents=num_agents)
2015-02-17 10:53:53.005 423 TRACE neutron.api.v2.resource HANotEnoughAvailableAgents: Not enough l3 agents available to ensure HA. Minimum required 2, available 1.



ruby193-rubygem-staypuft-0.5.19-1.el7ost.noarch

Comment 5 Mike Burns 2015-02-26 17:18:36 UTC
*** Bug 1196770 has been marked as a duplicate of this bug. ***

Comment 6 Scott Seago 2015-03-06 17:12:38 UTC
PR is here and merged: https://github.com/theforeman/staypuft/pull/427

Comment 8 Alexander Chuzhoy 2015-03-16 17:25:27 UTC
Verified:
Environment:
rhel-osp-installer-client-0.5.7-1.el7ost.noarch
openstack-foreman-installer-3.0.17-1.el7ost.noarch
rhel-osp-installer-0.5.7-1.el7ost.noarch
ruby193-rubygem-staypuft-0.5.21-1.el7ost.noarch
openstack-puppet-modules-2014.2.12-1.el7ost.noarch
ruby193-rubygem-foreman_openstack_simplify-0.0.6-8.el7ost.noarch



Was able to create a router on a deployment with 1 controller:


[root@maca25400702875 ~(openstack_admin)]# neutron router-list
+--------------------------------------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------+
| id                                   | name | external_gateway_info                                                                                                                                                                   | distributed | ha    |
+--------------------------------------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------+
| 4b716c59-64bd-41c3-92e8-c5d7ff3f88e4 | r1   | {"network_id": "e281aca7-a5f2-448b-bb6a-a92146483264", "enable_snat": true, "external_fixed_ips": [{"subnet_id": "4c799bc4-be40-4744-9690-410a6b5e2834", "ip_address": "10.8.30.102"}]} | False       | False |
+--------------------------------------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------+
[root@maca25400702875 ~(openstack_admin)]# neutron router-show r1
+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field                 | Value                                                                                                                                                                                   |
+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| admin_state_up        | True                                                                                                                                                                                    |
| distributed           | False                                                                                                                                                                                   |
| external_gateway_info | {"network_id": "e281aca7-a5f2-448b-bb6a-a92146483264", "enable_snat": true, "external_fixed_ips": [{"subnet_id": "4c799bc4-be40-4744-9690-410a6b5e2834", "ip_address": "10.8.30.102"}]} |
| ha                    | False                                                                                                                                                                                   |
| id                    | 4b716c59-64bd-41c3-92e8-c5d7ff3f88e4                                                                                                                                                    |
| name                  | r1                                                                                                                                                                                      |
| routes                |                                                                                                                                                                                         |
| status                | ACTIVE                                                                                                                                                                                  |
| tenant_id             | 2ac3d5ad4c764903aeb1d9e3efcff0a1                                                                                                                                                        |
+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

Comment 10 errata-xmlrpc 2015-04-07 15:08:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-0791.html

Comment 11 Andrew Dahms 2015-06-30 23:36:06 UTC
Setting 'requires_doc_text' to '-' in accordance with a discussion with mburns where it was clarified that this issue has now been resolved.