q-agent-cleanup.py defects
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:/
@ 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(
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) |
Changed in fuel: | |
assignee: | MOS Neutron (mos-neutron) → Ilya Shakhat (shakhat) |
Changed in fuel: | |
status: | Confirmed → In Progress |
tags: | added: on verification |
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.