q-agent-cleanup.py defects

Bug #1434196 reported by Andrew Woodward
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Ilya Shakhat

Bug Description

to follow up on code defects identified in CR on

https://review.openstack.org/#/c/158996

@ rev 2

154 @retry() @retry() 153
155 def _get_agents(self, use_cache=True): def _get_agents(self, use_cache=True): 154
Kamil Sambor Feb 26 12:37 AM
you never use use_cache, the same in methods below

@ rev 8

285 self.log.error(
286 "ERROR (rc={0}) while execution {1}".format(

Przemyslaw Kaminski Mar 6 12:40 AM
This is incorrect, code would be broken in case format raises an error. Safe way is to do:
self.log.error('xxx %s', variable)
This remark applies to all log calls in this file.

643 cleaner = NeutronCleaner(options=vars(args), log=LOG)

Przemyslaw Kaminski Mar 6 12:40 AM
Why do you use vars(args) instead of just args I cannot understand. All variables are present in args, this is a proper object, just get its values when you need them. Why put options.get('xxx') everywhere, it reduces readability and has worse performance.

Changed in fuel:
milestone: none → 6.1
importance: Medium → High
assignee: nobody → Sergey Vasilenko (xenolog)
Revision history for this message
Mike Scherbakov (mihgen) wrote :

This is, in fact, requirement to proceed with some refactorings of script. This is not a blocker for 6.1 (not exactly high bug), and we are struggling to get resources for many other bugs in Fuel currently in order to meet deadlines.
I've assigned this bug to mos-neutron team, as I'd like the team to take ownership of this script, maintain it, and re-introduce in Neutron later, so it would not be a deployment hack around the vanilla service. Looks like we just need this functionality in Neutron.

Changed in fuel:
milestone: 6.1 → 7.0
assignee: Sergey Vasilenko (xenolog) → MOS Neutron (mos-neutron)
Changed in fuel:
assignee: MOS Neutron (mos-neutron) → Ilya Shakhat (shakhat)
Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
Bogdan Dobrelya (bogdando) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (master)

Reviewed: https://review.openstack.org/204075
Committed: https://git.openstack.org/cgit/stackforge/fuel-library/commit/?id=14240365c777a26bb467c14e322081e8864cc84f
Submitter: Jenkins
Branch: master

commit 14240365c777a26bb467c14e322081e8864cc84f
Author: Ilya Shakhat <email address hidden>
Date: Tue Jul 21 16:00:37 2015 +0300

    Use neutron-netns-cleanup utility

    Utility neutron-netns-cleanup is extended to cover cleaning features
    of both OCF and q-agent-cleanup. It is responsible for:
     * terminating in-namespace processes
     * removing net interfaces and OVS ports
     * removing namespaces
    New utility uses pyroute2 library and at least 3 times faster than
    the old solution.

    Closes-Bug: #1436414
    Closes-Bug: #1434196

    Change-Id: Id8f12e7a342ccad3c3362d70159101bb95d918fd

Changed in fuel:
status: In Progress → Fix Committed
Igor (ipukha)
tags: added: on verification
Revision history for this message
Igor (ipukha) wrote :

Verified on MOS 7.0 ISO #296

Changed in fuel:
status: Fix Committed → Fix Released
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.