potential bugs found by pylint

Bug #1043884 reported by Yun Mao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Critical
Rongze Zhu

Bug Description

cinder/quota.py:130: [E, allowed_instances] Module 'cinder.db' has no 'instance_data_get_for_project' member
cinder/quota.py:173: [E, allowed_floating_ips] Module 'cinder.db' has no 'floating_ip_count_by_project' member
cinder/quota.py:185: [E, allowed_security_groups] Module 'cinder.db' has no 'security_group_count_by_project' member
cinder/quota.py:198: [E, allowed_security_group_rules] Module 'cinder.db' has no 'security_group_rule_count_by_group' member
cinder/db/api.py:559: [E, quota_usage_update] Undefined variable 'project_id'
cinder/db/sqlalchemy/api.py:503: [E, _ec2_volume_get_query] Module 'cinder.db.sqlalchemy.models' has no 'VolumeIdMapping' member
cinder/db/sqlalchemy/api.py:509: [E, _ec2_snapshot_get_query] Module 'cinder.db.sqlalchemy.models' has no 'SnapshotIdMapping' member
cinder/db/sqlalchemy/api.py:895: [E, volume_get_active_by_window] Undefined variable 'or_'
cinder/db/sqlalchemy/api.py:1275: [E, quota_usage_get] Module 'cinder.db.sqlalchemy.models' has no 'QuotaUsage' member
cinder/db/sqlalchemy/api.py:1282: [E, quota_usage_get] Module 'cinder.exception' has no 'QuotaUsageNotFound' member
cinder/db/sqlalchemy/api.py:1291: [E, quota_usage_get_all_by_project] Module 'cinder.db.sqlalchemy.models' has no 'QuotaUsage' member
cinder/db/sqlalchemy/api.py:1305: [E, quota_usage_create] Module 'cinder.db.sqlalchemy.models' has no 'QuotaUsage' member
cinder/openstack/common/notifier/api.py:74: [E, notify_decorator.wrapped_func] Module 'cinder.context' has no 'get_context_from_function_and_args' member
cinder/volume/driver.py:723: [E, RBDDriver.copy_image_to_volume] Undefined variable 'os'
cinder/volume/driver.py:724: [E, RBDDriver.copy_image_to_volume] Undefined variable 'os'
cinder/volume/san.py:118: [E, SanISCSIDriver._execute] An attribute affected in cinder.volume.driver line 87 hide this method
cinder/volume/utils.py:38: [E, notify_usage_exists] Module 'cinder.utils' has no 'utcnow' member
cinder/volume/xensm.py:19: [E] No name 'virt' in module 'cinder'
cinder/volume/xensm.py:20: [E] No name 'virt' in module 'cinder'

Revision history for this message
John Griffith (john-griffith) wrote :

A number of these will be cleaned up when the quota implementation patch lands. Will go through remaining issues after that.

Changed in cinder:
milestone: none → folsom-rc1
assignee: nobody → John Griffith (john-griffith)
importance: Undecided → High
assignee: John Griffith (john-griffith) → nobody
importance: High → Critical
Rongze Zhu (zrzhit)
Changed in cinder:
assignee: nobody → Rongze Zhu (zrzhit)
Revision history for this message
Rongze Zhu (zrzhit) wrote :

Hi John, We need to update cinder/openstack/common in another commit , because:

"cinder/openstack/common/notifier/api.py:74: [E, notify_decorator.wrapped_func] Module 'cinder.context' has no 'get_context_from_function_and_args' member"

Do we need to move nova/virt/xenapi/* to cinder ? Because cinder/volume/xensm.py use it.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
status: New → In Progress
Revision history for this message
John Griffith (john-griffith) wrote :

Hi Rongze,

We need to hold off on this until the quotas patches land then take another look. Your patch would remove all of the db/api functionality that those patches use.

As far as xen, I talked to Renuka about this yesterday and we're trying to decide if we're going to have SM support in cinder for Folsom or not. The changes she made to Nova were significant and she's not sure about the time needed to bring Cinder up to speed.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/12252
Committed: http://github.com/openstack/cinder/commit/590d3e7b0f74524093725a2e28150b083a77cf96
Submitter: Jenkins
Branch: master

commit 590d3e7b0f74524093725a2e28150b083a77cf96
Author: Rongze Zhu <email address hidden>
Date: Fri Sep 7 11:16:36 2012 +0800

    Fixes potential bugs found by pylint

    Partial fixes bug #1043884

    * remove _ec2_volume_get_query and _ec2_snapshot_get_query in
    cinder.db.sqlalchemy.api, because they no longer be used in cinder.
    * import openstack.commmon.utils.timeutils, because notify_usage_exists use it.

    Change-Id: I3e989b940b6a99ac7751c940fa766aa13c61607b

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: folsom-rc1 → 2012.2
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.