Open dasginganinja opened 11 years ago
Here is what my config.xml looks like:
/usr/local/src/fileconveyor/fileconveyor# cat config.xml
<?xml version="1.0" encoding="UTF-8"?>
<config>
<!-- Sources -->
<sources ignoredDirs="">
<source name="test" scanPath="/var/www" documentRoot="/var/www" basePath="/" />
</sources>
<!-- Servers -->
<servers>
<server name="rackspace" transporter="cloudfiles">
<username>###</username>
<api_key>###</api_key>
<container>###</container>
</server>
</servers>
<!-- Rules -->
<rules>
<rule for="test" label="Media or images only">
<filter>
<paths>sites/all:sites/default/files</paths>
<extensions>js:ico:gif:png:jpg:jpeg:svg:swf:css</extensions>
</filter>
<processorChain>
</processorChain>
<destinations>
<destination server="rackspace" path="" />
</destinations>
</rule>
</rules>
</config>
I've got a little bit more of an update for you.
I brought up a brand new Vagrant Debian Squeeze box, installed git, pip, and File Conveyor per INSTALL.txt. After configuring config.xml for cloudfiles I am still getting the following error after a
root@vagrant-debian-squeeze:~# python src/fileconveyor/fileconveyor/arbitrator.py
/root/src/fileconveyor/fileconveyor/filter.py:10: DeprecationWarning: the sets module is deprecated
from sets import Set, ImmutableSet
2013-11-26 08:31:08,075 - Arbitrator - WARNING - File Conveyor is initializing.
2013-11-26 08:31:08,081 - Arbitrator - WARNING - Loaded config file.
Traceback (most recent call last):
File "src/fileconveyor/fileconveyor/arbitrator.py", line 1185, in <module>
run_file_conveyor()
File "src/fileconveyor/fileconveyor/arbitrator.py", line 1168, in run_file_conveyor
arbitrator = Arbitrator(os.path.join(FILE_CONVEYOR_PATH, "config.xml"), restart)
File "src/fileconveyor/fileconveyor/arbitrator.py", line 142, in __init__
transporter_class = self._import_transporter(transporter_name)
File "src/fileconveyor/fileconveyor/arbitrator.py", line 1148, in _import_transporter
module = __import__(module_name, globals(), locals(), ["TRANSPORTER_CLASS"], -1)
File "/root/src/fileconveyor/fileconveyor/transporters/transporter_cloudfiles.py", line 2, in <module>
from cumulus.storage import CloudFilesStorage
File "/usr/local/lib/python2.6/dist-packages/cumulus/storage.py", line 11, in <module>
from cumulus.settings import CUMULUS
File "/usr/local/lib/python2.6/dist-packages/cumulus/settings.py", line 33, in <module>
if "FILTER_LIST" in settings.CUMULUS.keys():
File "/usr/local/lib/python2.6/dist-packages/django/conf/__init__.py", line 55, in __getattr__
return getattr(self._wrapped, name)
AttributeError: 'Settings' object has no attribute 'CUMULUS'
Here's the output from pip:
root@vagrant-debian-squeeze:~# pip freeze
Babel==1.3
Django==1.6
argparse==1.2.1
boto==1.6b
cssutils==0.9.10
distribute==0.6.49
django-cumulus==1.0.11
-e git+https://github.com/wimleers/fileconveyor@ca3585edbdcc75973c35bd8ee4d52601153bf6a3#egg=fileconveyor-master
httplib2==0.8
iso8601==0.1.8
keyring==3.2.1
mock==1.0.1
os-diskconfig-python-novaclient-ext==0.1.1
os-networksv2-python-novaclient-ext==0.21
os-virtual-interfacesv2-python-novaclient-ext==0.14
pbr==0.5.23
prettytable==0.7.2
pyinotify==0.9.4
pyrax==1.4.10
python-apt==0.7.100.1-squeeze1
python-cloudfiles==1.7.10
python-novaclient==2.15.0
python-swiftclient==1.8.0
pytz==2013.8
rackspace-auth-openstack==1.1
rackspace-novaclient==1.4
rax-default-network-flags-python-novaclient-ext==0.1.3
rax-scheduled-images-python-novaclient-ext==0.2.1
reportbug==4.12.6
requests==2.0.1
simplejson==3.3.1
six==1.4.1
wsgiref==0.1.2
I have the same errors, any help?
None here. I'm still waiting on Wim Leers to respond. I'm assuming that this is because one of the packages is at a non-working version.
Can somebody who has a working copy of fileconveyor please put up a pip listing of the currently installed modules? We might be able to determine which module is the cause of the current problem that we are all experiencing with getting this module working.
Again, this problem is only for the select few of us that will be utilizing cloudfiles. Signs point to the cumulus module. I think I'm going to start from there as I need to have this fixed by the end of the day.
What other alternatives if this is not fixed? i want to use cloud files
When I was last using fileconveyor, it was at the time when the cloudfiles stuff was just a pull request so it's a while ago. Having said that, I did get it running and unfortunately I haven't got access to that machine any more. On looking at the docs for django-cumulus though, it does mention the CUMULUS object.
CUMULUS = {
'USERNAME': 'YourUsername',
'API_KEY': 'YourAPIKey',
'CONTAINER': 'ContainerName'
}
Now I suspect that it'll need adding to the django-settings.py file but this is just a hunch and I can no longer test with any Rackspace stuff without setting up a new account.
I tried adding the CUMULUS object in both the django-settings in fileconveyor and also in the django settings file itself and both didn't work :(
My old fork of fileconveyor has this in the django_settings.py file. I suspect I've missed out the api key etc:
SECRET_KEY='change me for something better'
# Dummy settings for `django-storages`.
MEDIA_URL=''
MEDIA_ROOT=''
# `backends/ftp.py`
FTP_STORAGE_LOCATION=''
# `backends/sftp.py`
SFTP_STORAGE_HOST=''
# django-cumulus
#CUMULUS['USERNAME'] = '';
#CUMULUS['CUMULUS_API_KEY'] = '';
#CUMULUS['CONTAINER'] = '';
CUMULUS_API_KEY = '';
CUMULUS_USERNAME = '';
CUMULUS_CONTAINER = '';
CUMULUS = {
'AUTH_URL' : 'uk_authurl'
}
It doesn't look like my settings.py file differs much. You can look over my fork if you wish but I warn you, it's deliberately broken to prevent local deletions propagating to Cloudfiles. Oh, and it's quite a bit behind.
its almost the same as mine, i have a feeling its not related to the settings in fileconveyor, but something with django and its settings, but i have no idea why its not working
Good morning all! I don't have any updates on my end other than the fact that I've tried multiple versions of cumulus, django, etc. and still can't get it working. I created a gist (https://gist.github.com/dasginganinja/7769677) with some outputs that might be helpful in diagnosing. In the gist I give the setup done to the box to get it up and running, the strace output for starting the arbitrator, and a pip freeze to show what python modules are actually being used.
Hopefully this helps somebody diagnose further! Here's a quick shortcut to the strace output: https://gist.github.com/dasginganinja/7769677/raw/696b112bf25a967ecab63cf08330ac4f6569425b/Strace+Output.txt
Okay here's another little update. I went ahead and put the CUMULUS object into /usr/lib/local/python2.6/dist-packages/django/conf/global_settings.py with my correct settings. Here is the output when I run now:
tom@dev2-lamp:/tmp$ sudo vim /usr/local/lib/python2.6/dist-packages/django/conf/global_settings.py
tom@dev2-lamp:/tmp$ python /usr/local/lib/python2.6/dist-packages/fileconveyor-0.3_dev-py2.6.egg/fileconveyor/arbitrator.py
/usr/local/lib/python2.6/dist-packages/fileconveyor-0.3_dev-py2.6.egg/fileconveyor/filter.py:10: DeprecationWarning: the sets module is deprecated
from sets import Set, ImmutableSet
2013-12-03 10:22:22,742 - Arbitrator - WARNING - File Conveyor is initializing.
2013-12-03 10:22:22,748 - Arbitrator - WARNING - Loaded config file.
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/fileconveyor-0.3_dev-py2.6.egg/fileconveyor/arbitrator.py", line 1185, in <module>
run_file_conveyor()
File "/usr/local/lib/python2.6/dist-packages/fileconveyor-0.3_dev-py2.6.egg/fileconveyor/arbitrator.py", line 1168, in run_file_conveyor
arbitrator = Arbitrator(os.path.join(FILE_CONVEYOR_PATH, "config.xml"), restart)
File "/usr/local/lib/python2.6/dist-packages/fileconveyor-0.3_dev-py2.6.egg/fileconveyor/arbitrator.py", line 142, in __init__
transporter_class = self._import_transporter(transporter_name)
File "/usr/local/lib/python2.6/dist-packages/fileconveyor-0.3_dev-py2.6.egg/fileconveyor/arbitrator.py", line 1162, in _import_transporter
self.logger.error("The Transporter module '%s' was found, but its Transporter class '%s' could not be found." % (module_name, classname))
UnboundLocalError: local variable 'classname' referenced before assignment
As you can see, at this point this error is now what is being shown in #162.
i think he is asking for the cloud files storage, i added it to settings DEFAULT_FILE_STORAGE = 'cumulus.storage.CloudFilesStorage', but also didn't work
At this point all I think we need to do is find out why 'classname' isn't getting set. I'm sure that will open a whole other can of worms but that's the next step.
you reached anything about this class issue? i couldn't solve it :s
I went back through and took a look at the PIP Install log for this program and noticed the following lines:
Running setup.py install for python-cloudfiles
cloudfiles/__init__.py:90: DeprecationWarning: python-cloudfiles has been deprecated as of August 1, 2013. Please see https://github.com/openstack/python-swiftclient.
DeprecationWarning)
/tmp/pip_build_root/python-cloudfiles/setup.py:11: DeprecationWarning: python-cloudfiles has been deprecated as of August 1, 2013. Please see https://github.com/openstack/python-swiftclient.
DeprecationWarning)
warning: no previously-included files found matching 'python_cloudfiles.egg-info'
I wonder if this has something to do with it....
Update django-cumulus to 1.0.10: easy_install "django-cumuls==1.0.10"
or pip install django-cumulus==1.0.10
In setup.py the dependencies must be >=1.0.5 and <=1.0.10
for now
The error is now gone thanksss :)
But i have another issue, when saving images i got this error: Filter queue: dropped 'files/blue-search-icon_2.png' because it doesn't match any rules
I have put the cumulus object into django/conf/global_settings.py with my settings but now I am getting this error
Last login: Fri Mar 28 22:28:25 2014 from 196.201.228.134
[root@af-server ~]# sudo python src/fileconveyor/fileconveyor/arbitrator.py
/root/src/fileconveyor/fileconveyor/filter.py:10: DeprecationWarning: the sets m
odule is deprecated
from sets import Set, ImmutableSet
2014-03-28 22:34:38,206 - Arbitrator - WARNING - File Conveyor i
s initializing.
2014-03-28 22:34:38,210 - Arbitrator - WARNING - Loaded config f
ile.
Traceback (most recent call last):
File "src/fileconveyor/fileconveyor/arbitrator.py", line 1185, in
I have already updated django-cumulus to 1.0.10 and still get the error.
Hello all. I've done some searching on this issue and haven't been able to turn up too much so I figured I would finally ask in here. I've been trying to get File Conveyor working with Rackspace's Cloud Files but have been having horrible luck doing so. I installed originally with the instructions from INSTALL.txt and when starting up an instance with a fully configured config.xml file I got these errors while using "transport = 'cloudfiles'".
My Python 2.6 dist packages looks like so:
Can somebody point me in the right direction?
Thanks!