Closed siso closed 9 years ago
Fixed this in r0.2.5
@boxidau please, see changes to setup.py:
<<<<<<< HEAD
data_files=[('/etc/rax-autoscaler', ['config/logging.conf', 'config/config-template.json'])],
=======
data_files=[('config', ['config/config-template.json',
'config/config.include',
'config/logging.conf']), ],
>>>>>>> release-0.2
That would fail if pip is not run as root (e.g. virtualenv).
In cloud-init it is run as root.
Can we remove config/config.include
When run as root the config files end up being put into /usr/config, which is not ideal. The config_check function looks at /etc/rax-autoscaler/config.json so the config install is kinda useless
[root@group01-as45558981 ~]# autoscale
Traceback (most recent call last):
File "/usr/bin/autoscale", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2659, in <module>
parse_requirements(__requires__), Environment()
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 550, in resolve
raise VersionConflict(dist,req) # XXX put more info here
pkg_resources.VersionConflict: (requests 1.1.0 (/usr/lib/python2.6/site-packages), Requirement.parse('requests>=2.2.1'))
Hey @boxidau, can you please run it in a virtualenv?
I cannot reproduce the error:
(test)simo6545@MLD6KDDTY4:~/tmp/20141119-141140$ pip install rax-autoscaler
Downloading/unpacking rax-autoscaler
Downloading rax-autoscaler-0.2.5.tar.gz
Running setup.py (path:/Users/simo6545/.virtualenvs/test/build/rax-autoscaler/setup.py) egg_info for package rax-autoscaler
...
Successfully installed rax-autoscaler pyrax requests termcolor six keyring python-novaclient mock rackspace-novaclient iso8601 python-keystoneclient Babel simplejson pbr PrettyTable oslo.utils argparse rackspace-auth-openstack os-diskconfig-python-novaclient-ext rax-scheduled-images-python-novaclient-ext os-networksv2-python-novaclient-ext os-virtual-interfacesv2-python-novaclient-ext rax-default-network-flags-python-novaclient-ext netaddr oslo.config oslo.serialization stevedore pytz oslo.i18n
Cleaning up...
(test)simo6545@MLD6KDDTY4:~/tmp/20141119-141140$ autoscale --version
rax-autoscaler v0.2.5 -- Copyright @ 2014 Rackspace
(test)simo6545@MLD6KDDTY4:~/tmp/20141119-141140$ autoscale
usage: autoscale [-h] --as-group AS_GROUP [--os-username OS_USERNAME]
[--os-password OS_PASSWORD] [--config-file CONFIG_FILE]
[--os-region-name {SYD,HKG,DFW,ORD,IAD,LON}] [--cluster]
[--version] [--dry-run]
autoscale: error: argument --as-group is required
I could but when we use cloud-init it's not going to be installed in a virtualenv so it needs to work as a global install too
Agree, but let's address this issue first.
Looks like you are having issues resolving dependencies. Just try virtualenv.
Yep, as discussed, requests isn't actually a requirement, removing it works fine. I'll do the changes and push to release-0.2