Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--autoreload doesn't work in Vagrant VM when modules live in a Shared Folder #1880

Closed
donspaulding opened this issue Feb 19, 2014 · 2 comments

Comments

@donspaulding
Copy link

We run django/celery in Vagrant VMs for local development. We see the following error repeatedly dumped into the log files on our Vagrant VMs, but not in production with the exact same codebase. The message is repeated on the order of every 2-3 seconds.

[2014-02-19 12:47:07,193: ERROR/MainProcess] Error in timer: TypeError("'NoneType' object has no attribute '__getitem__'",)
Traceback (most recent call last):
  File "/var/projects/pcp/virtualenv/local/lib/python2.7/site-packages/kombu/async/hub.py", line 153, in fire_timers
    entry()
  File "/var/projects/pcp/virtualenv/local/lib/python2.7/site-packages/kombu/async/timer.py", line 64, in __call__
    return self.fun(*self.args, **self.kwargs)
  File "/var/projects/pcp/virtualenv/local/lib/python2.7/site-packages/kombu/async/timer.py", line 132, in _reschedules
    return fun(*args, **kwargs)
  File "/var/projects/pcp/virtualenv/local/lib/python2.7/site-packages/celery/worker/autoreload.py", line 113, in find_changes
    self.on_change(modified)
  File "/var/projects/pcp/virtualenv/local/lib/python2.7/site-packages/celery/worker/autoreload.py", line 90, in on_change
    return self._on_change(modified)
  File "/var/projects/pcp/virtualenv/local/lib/python2.7/site-packages/celery/worker/autoreload.py", line 291, in on_change
    modified = [f for f in files if self._maybe_modified(f)]
  File "/var/projects/pcp/virtualenv/local/lib/python2.7/site-packages/celery/worker/autoreload.py", line 285, in _maybe_modified
    if digest != self._hashes[f]:
TypeError: 'NoneType' object has no attribute '__getitem__'

This is obviously deep within the celery codebase. I'm not sure what circumstances would cause self._hashes == None perpetually. The only thing I can think of is that we're sharing our project code via Vagrant/VirtualBox's Shared Folders functionality (but none of the other python modules, they're installed in the VM's virtualenv). We've seen this approach wreak havoc with os.stat() calls in other projects, so that's why I'm wondering if it's the culprit in this case as well.

I'm happy to answer any additional questions that would help narrow down the cause of this.

Thanks,
Don

@pashinin
Copy link

I have problems with autoreload and Vagrant VM too. Actually I can start Celery worker, it just will NOT pick up any tasks from RabbitMQ: #2249

edmorley pushed a commit to mozilla/treeherder that referenced this issue May 10, 2016
Since the celery auto-reload feature which it enables hasn't been
working for some time regardless:
celery/celery#1658
celery/celery#1025
celery/celery#1880
edmorley pushed a commit to mozilla/treeherder that referenced this issue May 11, 2016
Since the celery auto-reload feature which it enables hasn't been
working for some time regardless:
celery/celery#1658
celery/celery#1025
celery/celery#1880
@ask
Copy link
Contributor

ask commented Jun 23, 2016

Closing this, as we don't have the resources to complete this task.

--autoreload will be undocumented in 4.0

@ask ask closed this as completed Jun 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants