[openstack-dev] [oslo-incubator] rpc.cleanup method is not reachable due to wrong import of rpc module

Ihar Hrachyshka ihrachys at redhat.com
Mon Aug 4 14:56:08 UTC 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 04/08/14 16:36, Malawade, Abhijeet wrote:
> Hi all,
> 
> 
> 
> rpc module is not imported properly in nova, cinder, neutron
> projects. It is imported from wrong package.
> 
> In oslo-incubator  'rpc' module is used in
> openstack/common/service.py file and it is present at
> openstack/common package.
> 
> (https://github.com/openstack/oslo-incubator/blob/master/openstack/common/service.py#L48
>
> 
<https://github.com/openstack/oslo-incubator/blob/master/openstack/common/service.py%23L48>)
> 
> 
> 
> But this 'rpc' module is present at base package in 'nova' and
> 'cinder' project while it is present at neutron/common/ package in
> neutron project.
> 
> 
> 
> Nova : https://github.com/openstack/nova/blob/master/nova/rpc.py
> 
> Cinder :
> https://github.com/openstack/cinder/blob/master/cinder/rpc.py
> 
> Neutron : 
> https://github.com/openstack/neutron/blob/master/neutron/common/rpc.py
>
> 
> 
> 
> This openstack/common/service.py is synced form oslo-incubator in
> each project. Because of this if we make change in specific project
> then these changes will  get removed after re-synced
> oslo-incubator code.
> 
> The same thing happened in nova project. This patch 
> (https://review.openstack.org/#/c/81833/ 
> <https://review.openstack.org/%23/c/81833/>) has merged into nova
> code, but it is overwritten after syncing oslo-incubator code.
> There is comment on this patch by 'Mark McLoughlin' regarding the
> same.
> 
> 
> 
> I have filed bug for this issue in oslo : 
> https://bugs.launchpad.net/oslo/+bug/1334661
> 
> And also I have pushed patch for same. But this patch will fail
> for 'Neutron' project.
> 
> 
> 
> I think we have to try importing 'rpc' module from all possible
> places till it gets imported properly

I wonder whether calling rpc.cleanup() is a part of any public
documentation for service.py. Looks like the module makes assumptions
about consuming projects that are incorrect. Why not leaving cleanup
to consumers instead (perhaps by allowing consumers to optionally pass
a cleanup method to Service.__init__() to call later in .wait(), if
needed)?

> 
> OR we need to change location of 'rpc' module in projects for 
> uniformity. (ie to put 'rpc' module at some common place)
> 
> 
> 
> Could you please give me your opinions on the same.
> 
> 
> 
> Thanks,
> 
> Abhijeet
> 
> 
> ______________________________________________________________________
>
> 
Disclaimer:This email and any attachments are sent in strictest
> confidence for the sole use of the addressee and may contain
> legally privileged, confidential, and proprietary data. If you are
> not the intended recipient, please advise the sender by replying
> promptly to this email and then delete and destroy this email and
> any attachments without any further use, copying or forwarding
> 
> 
> _______________________________________________ OpenStack-dev
> mailing list OpenStack-dev at lists.openstack.org 
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCgAGBQJT358IAAoJEC5aWaUY1u57bVgH/24jF0ocismtVCDlock67ytt
XdBo/iiS2l6ohikIrJg1F9qbPfxMRG92i7aPyK6DbouKeb15cKB4efitUcqrPp7i
1GwZX+yuAKMc/IpzPIIi/gHmYxLHdMMt4+H+O0ULsnfMTg6LGJQrwGVeweBy1qW1
vCAV4HinhNCv07YSR7QLqyl862a4bM5KKtzJYOmsio6a9cu4gDRI2gDcj9pr9TYL
tzUpOrOgm2DIHBE6PNSdP7hkvTe1NwM+tcV7FXOCE3gyGakWkvExxWrSLmOI05t6
UuFUeDQwpiLwODPR1sczuwQhBFm+v65Vhp+etvlp9PqAm27Hhr4S7UxOJP51N0k=
=AXGE
-----END PGP SIGNATURE-----



More information about the OpenStack-dev mailing list