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

Working with latest django 1.6x? #16

Open
ericmachine88 opened this issue May 27, 2014 · 8 comments
Open

Working with latest django 1.6x? #16

ericmachine88 opened this issue May 27, 2014 · 8 comments

Comments

@ericmachine88
Copy link

Have anyone tried to make it work with the latest django and other dependencies?

I am getting a lot of errors, even I force django==1.2.

Any help? Thanks.

@tobami
Copy link
Owner

tobami commented May 27, 2014

I can have a look. Can you elaborate on "lot of errors"?

Try with Django 1.4 and post the stacktrace you get.

@tobami
Copy link
Owner

tobami commented May 27, 2014

Alright. I looked it up, and it only works up to django 1.3.x

I have pinned all packages in the requirements.txt file and explained how to install using pip.

Can you please try, in a fresh virtualenv, pip install -r requirements.txt?

@ericmachine88
Copy link
Author

Hi tobami,

Thanks for helping out.

I have 2 problems after following your approach.

FYI, I am using python 2.7.6.

a)
When I try to run "python manage.py syncdb", I got this error

Traceback (most recent call last):
File "manage.py", line 4, in
import settings # Assumed to be in the same directory.
File "/home/eric/tobamiupdates/overmind-master/overmind/settings.py", line 96, in
PUBLIC_KEY = open(os.path.expanduser("~/.ssh/%s" % PUBLIC_KEY_FILE)).read()
IOError: [Errno 2] No such file or directory: '/home/eric/.ssh/id_rsa.pub'

I am currently testing this on ubuntu 14.04 LTS server. I tested on server based versions, still same issue. I have setup OpenSSH server too, but no difference.

However, if I manually created the folder .ssh and id_rsa.pub following this tutorial

https://help.ubuntu.com/community/SSH/OpenSSH/Keys

and manually update the settings.py

from "~/.ssh/%s" to "/root/.ssh/%s"

then this error will be gone.

Not sure this is the right way to overcome the problem?

b) However, if I try to run "sudo python manage.py syncdb", I get a new error.

File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
RuntimeError: maximum recursion depth exceeded while calling a Python object

Quite long errors, but at the end is a max recursion issue.

However if I upgrade to django latest version, that error will disappear but more errors will popup e.g. importmodule not found...

Any tips? Thanks.

@tobami
Copy link
Owner

tobami commented May 28, 2014

Using sudo can cause several problems. Did you try to use the keys you created in your home directory?

And no, don't try to update django. We can address tha later

On Wed, May 28, 2014 at 2:50 AM, ericmachine88 notifications@github.com
wrote:

Hi tobami,
Thanks for helping out.
I have 2 problems after following your approach.
FYI, I am using python 2.7.6.
a)
When I try to run "python manage.py syncdb", I got this error
Traceback (most recent call last):
File "manage.py", line 4, in
import settings # Assumed to be in the same directory.
File "/home/eric/tobamiupdates/overmind-master/overmind/settings.py", line 96, in
PUBLIC_KEY = open(os.path.expanduser("/.ssh/%s" % PUBLIC_KEY_FILE)).read()
IOError: [Errno 2] No such file or directory: '/home/eric/.ssh/id_rsa.pub'
I am currently testing this on ubuntu 14.04 LTS server. I tested on server based versions, still same issue. I have setup OpenSSH server too, but no difference.
However, if I manually created the folder .ssh and id_rsa.pub following this tutorial
https://help.ubuntu.com/community/SSH/OpenSSH/Keys
and manually update the settings.py
from "
/.ssh/%s" to "/root/.ssh/%s"
then this error will be gone.
Not sure this is the right way to overcome the problem?
b) However, if I try to run "sudo python manage.py syncdb", I get a new error.
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 113, in contribute_to_class
super(self.class, self).contribute_to_class(cls, name)
RuntimeError: maximum recursion depth exceeded while calling a Python object
Quite long errors, but at the end is a max recursion issue.
However if I upgrade to django latest version, that error will disappear but more errors will popup e.g. importmodule not found...

Any tips? Thanks.

Reply to this email directly or view it on GitHub:
#16 (comment)

@ericmachine88
Copy link
Author

Thanks tobami.

When I define under a non root user a ssh keys, then when I run the code below

python manage.py syncdb

Now it works fine. No error anymore :)

However when I run this code below

python manage.py celeryd -l info

I got a new error

Traceback (most recent call last):
File "manage.py", line 11, in
execute_manager(settings)
File "/home/eric/om29052014/env/local/lib/python2.7/site-packages/django/core/management/init.py", line 438, in execute_manager
utility.execute()
File "/home/eric/om29052014/env/local/lib/python2.7/site-packages/django/core/management/init.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/eric/om29052014/env/local/lib/python2.7/site-packages/django/core/management/init.py", line 261, in fetch_command
klass = load_command_class(app_name, subcommand)
File "/home/eric/om29052014/env/local/lib/python2.7/site-packages/django/core/management/init.py", line 67, in load_command_class
module = import_module('%s.management.commands.%s' % (app_name, name))
File "/home/eric/om29052014/env/local/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
import(name)
File "/home/eric/om29052014/env/local/lib/python2.7/site-packages/djcelery/management/commands/celeryd.py", line 8, in
from celery.bin import celeryd
ImportError: cannot import name celeryd

Any idea how to solve this? Thanks in advance :)

@ericmachine88
Copy link
Author

I tried to ignore running this as I have no idea

python manage.py celeryd -l info

When I run this

python manage.py runserver

I am able to login and create a new provider for EC2

But when I create a new node. I can't see any values in the dropdown for both images and sizes. Any idea?

Thanks.

@tobami
Copy link
Owner

tobami commented May 29, 2014

I committed another fix to the package versions. Now celery is pinned to 2.5, which fixes the import error you are seeing.

@tobami
Copy link
Owner

tobami commented May 29, 2014

The reason you don't see any values in the dropdown is probably because you didn't have the celery queue working.

It is used for all background tasks, so it is necessary. For exmple, when you create a new EC2 provider, a background task fetches all VM types and images available on EC2.

One you get celeryd running, try to create a new EC2 provider and tell me whether it works!

Thanks for reporting all the problems you encounter. The project has not seen active development in the last two years, but that is no excuse for not having pinned the package requirements right in the first place! Thanks to you we can at least leave a working README and requirements.txt for anybody that wants to try out Overmind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants