rpc.cleanup method is not reachable due to wrong import of rpc module

Bug #1334661 reported by Abhijeet Malawade
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Medium
Abhijeet Malawade
oslo-incubator
Invalid
Medium
Abhijeet Malawade

Bug Description

In nova service rpc.cleanup method is not getting called because 'rpc' is not imported properly.

rpc = importutils.try_import('nova.openstack.common.rpc')
It should be
rpc = importutils.try_import('nova.rpc')

'rpc' module is not present in nova/openstack/common package.
As it is present in nova package it should be imported from there only.

Also rpc cleanup method should not be called while restarting the service as ideally cleanup task should be done only while exiting from the service. In case of SIGHUP signal, service gets restarted and tries to cleanup the rpc.

Tags: oslo ntt
description: updated
Changed in oslo:
assignee: nobody → Abhijeet Malawade (abhijeet-malawade)
Revision history for this message
Ben Nemec (bnemec) wrote :

This is not a bug in Oslo AFAICT. It sounds like an Oslo rpc reference wasn't cleaned up in Nova when it converted to oslo.messaging. I'm not even sure where this bad import is happening (it would be good to link to the file where you see this), but it's likely that something needs to be imported from oslo.messaging.

Changed in oslo:
status: New → Invalid
Changed in nova:
assignee: nobody → Abhijeet Malawade (abhijeet-malawade)
Revision history for this message
Abhijeet Malawade (abhijeet-malawade) wrote :

Hi Ben,

Here is the nova service file where it is trying to import 'rpc' module from openstack common package.
https://github.com/openstack/nova/blob/master/nova/openstack/common/service.py#L48

Also same thing is happening in cinder. In cinder also it is trying to import 'rpc' module from
openstack comman packge, but 'rpc' module is present in cinder package.
https://github.com/openstack/cinder/blob/master/cinder/openstack/common/service.py#L47

Because of this I taught that we fix this in oslo-incubator and then sync to specific projects.

Ben Nemec (bnemec)
Changed in oslo:
status: Invalid → Triaged
importance: Undecided → Medium
Revision history for this message
Ben Nemec (bnemec) wrote :

Ah, okay, then that is a bug in Oslo. We will need to fix service.py to use either rpc or oslo.messaging, depending on which is available. Another similar change was recently merged, and something like that should work here too: https://github.com/openstack/oslo-incubator/commit/109e325eec054aefe4fcef4b928a46a6d7247e05

Matt Riedemann (mriedem)
Changed in nova:
status: New → Triaged
importance: Undecided → Medium
tags: added: oslo
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo-incubator (master)

Fix proposed to branch: master
Review: https://review.openstack.org/103049

Changed in oslo:
status: Triaged → In Progress
Changed in oslo:
assignee: Abhijeet Malawade (abhijeet-malawade) → Abhishek Kekane (abhishek-kekane)
Changed in oslo:
assignee: Abhishek Kekane (abhishek-kekane) → nobody
Changed in oslo:
assignee: nobody → Abhijeet Malawade (abhijeet-malawade)
Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

Some discussion on the dev mailing list about the right way to fix this: http://lists.openstack.org/pipermail/openstack-dev/2014-August/thread.html#41828

Changed in oslo-incubator:
status: In Progress → Invalid
Changed in nova:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.