Closed Bug 1125112 Opened 7 years ago Closed 6 years ago

Fix datasource's closing connections that no longer exist (AttributeError: 'NoneType' object has no attribute 'open')


(Tree Management :: Treeherder, defect, P3)



(Not tracked)



(Reporter: emorley, Unassigned)


(Blocks 1 open bug)


Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/newrelic-", line 66, in wrapper return wrapped(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/celery/app/", line 437, in __protected_call__ return*args, **kwargs)
File "/data/www/", line 38, in cycle_data call_command('cycle_data')
File "/usr/lib/python2.6/site-packages/django/core/management/", line 161, in call_command return klass.execute(*args, **defaults)
File "/usr/lib/python2.6/site-packages/django/core/management/", line 255, in execute output = self.handle(*args, **options)
File "/usr/lib/python2.6/site-packages/newrelic-", line 110, in literal_wrapper return wrapped(*args, **kwargs)
File "/data/www/", line 73, in handle jm.disconnect()
File "/data/www/", line 118, in disconnect dhub.disconnect()
File "/usr/lib/python2.6/site-packages/datasource/bases/", line 245, in disconnect if self.connection[host_type]['con_obj'].open:
AttributeError: 'NoneType' object has no attribute 'open'
Priority: P2 → P3
This exception has since gone away, however we should still fix datasource to report these properly.

Broken out from bug 1134140...

(In reply to Ed Morley [:edmorley] from bug 1134140 comment #1)
> This corresponds to this datasource line:
> 52a653911e450fb5c5e9359438fd90a87c85b82a/vendor/datasource/bases/SQLHub.
> py#L245
>             if self.connection[host_type]['con_obj'].open:
>                 self.connection[host_type]['con_obj'].commit()
>                 self.connection[host_type]['con_obj'].close()
> It seems like datasource should be:
> (a) Explicitly checking to see if self.connection[host_type]['con_obj'] is
> not None first, and raising an exception that's actually clear eg
> "Connections lost".
> (b) Handling the exception in such a way that we don't stop trying to close
> the remaining connections for other host types.
Summary: New relic exception during cycle_data " __builtin__:str: 'NoneType' object has no attribute 'open'" → Fix datasource's closing connections that no longer exist (AttributeError: 'NoneType' object has no attribute 'open')
We're moving away from datasource.
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.