Bug 1031370 - neutron-dhcp-agent crashes due to "DistributionNotFound: Jinja2>=2.6"
neutron-dhcp-agent crashes due to "DistributionNotFound: Jinja2>=2.6"
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-neutron (Show other bugs)
4.0
Unspecified Unspecified
high Severity urgent
: beta
: 4.0
Assigned To: Terry Wilson
Ofer Blaut
: Regression, TestBlocker
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-17 05:27 EST by Rami Vaknin
Modified: 2016-04-26 13:48 EDT (History)
10 users (show)

See Also:
Fixed In Version: openstack-neutron-2013.2-8.el6ost
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-19 19:36:42 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
apevec: needinfo-


Attachments (Terms of Use)

  None (edit)
Description Rami Vaknin 2013-11-17 05:27:30 EST
Version
=======
rhos 4.0 on 6.5, puddle 2013-11-15.1, openstack-neutron-2013.2-7.el6ost.noarch


Description
===========
According to openstack-status, the neutron-dhcp-agent and neutron-openvswitch-agent services fail to start.

# openstack-status 
== neutron services ==
neutron-server:               inactive (disabled on boot)
neutron-dhcp-agent:           active
neutron-l3-agent:             inactive (disabled on boot)
neutron-metadata-agent:       inactive (disabled on boot)
neutron-lbaas-agent:          inactive (disabled on boot)
neutron-openvswitch-agent:    dead
== Support services ==
openvswitch:                  active
messagebus:                   active


From /var/log/messages
======================
Nov 17 09:00:04 puma09 abrt: detected unhandled Python exception in '/usr/bin/neutron-openvswitch-agent'
Nov 17 09:00:04 puma09 abrtd: New client connected
Nov 17 09:00:04 puma09 abrtd: Directory 'pyhook-2013-11-17-09:00:04-9554' creation detected
Nov 17 09:00:04 puma09 abrt-server[9584]: Saved Python crash dump of pid 9554 to /var/spool/abrt/pyhook-2013-11-17-09:00:04-9554
Nov 17 09:00:04 puma09 abrt: detected unhandled Python exception in '/usr/bin/neutron-dhcp-agent'
Nov 17 09:00:04 puma09 abrtd: New client connected
Nov 17 09:00:04 puma09 abrt-server[9586]: Saved Python crash dump of pid 9579 to /var/spool/abrt/pyhook-2013-11-17-09:00:04-9579
Nov 17 09:00:04 puma09 abrtd: Directory 'pyhook-2013-11-17-09:00:04-9579' creation detected
Nov 17 09:00:04 puma09 abrtd: Package 'openstack-neutron-openvswitch' isn't signed with proper key
Nov 17 09:00:04 puma09 abrtd: 'post-create' on '/var/spool/abrt/pyhook-2013-11-17-09:00:04-9554' exited with 1
Nov 17 09:00:04 puma09 abrtd: Deleting problem directory '/var/spool/abrt/pyhook-2013-11-17-09:00:04-9554'
Nov 17 09:00:04 puma09 abrtd: Package 'openstack-neutron' isn't signed with proper key
Nov 17 09:00:04 puma09 abrtd: 'post-create' on '/var/spool/abrt/pyhook-2013-11-17-09:00:04-9579' exited with 1
Nov 17 09:00:04 puma09 abrtd: Deleting problem directory '/var/spool/abrt/pyhook-2013-11-17-09:00:04-9579' 


The reason
==========
[root@puma09 ~]# /usr/bin/python /usr/bin/neutron-dhcp-agent --log-file /var/log/neutron/dhcp-agent.log --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/dhcp_agent.ini
Traceback (most recent call last):
  File "/usr/bin/neutron-dhcp-agent", line 6, in <module>
    from neutron.agent.dhcp_agent import main
  File "/usr/lib/python2.6/site-packages/neutron/__init__.py", line 40, in <module>
    replace_dist("Jinja2 >= 2.6")
  File "/usr/lib/python2.6/site-packages/neutron/__init__.py", line 26, in replace_dist
    return pkg_resources.require(requirement)
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 648, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 546, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: Jinja2>=2.6
Comment 1 Ami Jeain 2013-11-17 07:06:17 EST
reproduced only in a distributed installation (i.e. one controller and one compute, where the dhcp agent was installed)
Comment 2 Alan Pevec 2013-11-18 08:26:10 EST
Right, issue is that
Requires:       python-jinja2-26
is only in openstack-neutron-vpn-agent subpackage.
When using parallel installable, all forced requirements must be met in the main python-neutron subpackage:

--- a/openstack-neutron.spec
+++ b/openstack-neutron.spec
@@ -117,6 +117,7 @@ Requires:   python-eventlet
 Requires:      python-greenlet
 Requires:      python-httplib2
 Requires:      python-iso8601
+Requires:      python-jinja2-26
 Requires:      python-keystoneclient
 #Requires:     python-kombu
 Requires:      python-lxml
@@ -408,7 +409,6 @@ Summary:    Neutron VPNaaS agent
 Group:         Applications/System
 
 Requires:      openstack-neutron = %{version}-%{release}
-Requires:      python-jinja2-26
 
 %description -n openstack-neutron-vpn-agent
 Neutron provides an API to implement VPN as a service
Comment 4 Rami Vaknin 2013-11-20 03:41:14 EST
Verified on rhos 4.0 running on rhel 6.5 with 2013-11-18.8 puddle.
Now the dhcp and ovs agents does not crash anymore.
Comment 8 errata-xmlrpc 2013-12-19 19:36:42 EST
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.

http://rhn.redhat.com/errata/RHEA-2013-1859.html

Note You need to log in before you can comment on or make changes to this bug.