newslynx / opportunities

A garden of NewsLynx futures
1 stars 0 forks source link

VersionConflict: (pyasn1 0.1.7 #86

Closed mhkeller closed 9 years ago

mhkeller commented 9 years ago

When deploying from an ec2 to another ec2

TASK: [initialize newslynx database.] *****************************************
<127.0.0.1> ESTABLISH CONNECTION FOR USER: vagrant
<127.0.0.1> REMOTE_MODULE command chdir=/opt/newslynx/newslynx-core/ /usr/local/bin/newslynx init
<127.0.0.1> EXEC ssh -C -tt -vvv -o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/Users/mike/.ansible/cp/ansible-ssh-%h-%p-%r" -o StrictHostKeyChecking=no -o Port=2222 -o IdentityFile="/Users/mike/wrk/projects/newslynx/automation/.vagrant/machines/newslynx/virtualbox/private_key" -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=vagrant -o ConnectTimeout=30 127.0.0.1 /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1439865423.21-226755257028246 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1439865423.21-226755257028246 && echo $HOME/.ansible/tmp/ansible-tmp-1439865423.21-226755257028246'
<127.0.0.1> PUT /var/folders/gp/__h0yj4s4lsc84w79k4b8mnh0000gn/T/tmpdTmt8F TO /home/vagrant/.ansible/tmp/ansible-tmp-1439865423.21-226755257028246/command
<127.0.0.1> EXEC ssh -C -tt -vvv -o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/Users/mike/.ansible/cp/ansible-ssh-%h-%p-%r" -o StrictHostKeyChecking=no -o Port=2222 -o IdentityFile="/Users/mike/wrk/projects/newslynx/automation/.vagrant/machines/newslynx/virtualbox/private_key" -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=vagrant -o ConnectTimeout=30 127.0.0.1 /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible, key=hktjynvnyeirpfuaddkrzecyjxytfyel] password: " -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-hktjynvnyeirpfuaddkrzecyjxytfyel; LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/vagrant/.ansible/tmp/ansible-tmp-1439865423.21-226755257028246/command; rm -rf /home/vagrant/.ansible/tmp/ansible-tmp-1439865423.21-226755257028246/ >/dev/null 2>&1'"'"''
failed: [newslynx] => {"changed": true, "cmd": ["/usr/local/bin/newslynx", "init"], "delta": "0:00:00.695320", "end": "2015-08-18 02:37:04.067549", "rc": 1, "start": "2015-08-18 02:37:03.372229", "warnings": []}
stderr: Traceback (most recent call last):
  File "/usr/local/bin/newslynx", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2749, in <module>
    working_set = WorkingSet._build_master()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 446, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 459, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 632, in resolve
    raise VersionConflict(dist,req) # XXX put more info here
pkg_resources.VersionConflict: (pyasn1 0.1.8 (/usr/local/lib/python2.7/dist-packages), Requirement.parse('pyasn1==0.1.7'))

FATAL: all hosts have already failed -- aborting

PLAY RECAP ********************************************************************
           to retry, use: --limit @/Users/mike/main.yaml.retry

newslynx                   : ok=26   changed=21   unreachable=0    failed=1

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
mhkeller commented 9 years ago

Perhaps upping the requirement here would fix this https://github.com/newslynx/newslynx-core/blob/master/requirements.txt#L59

I'm not sure what is also requiring that library, though, and causing the error.

mhkeller commented 9 years ago

@abelsonlive do you foresee any problem using 0.1.8 instead of 0.1.7. Changelog: http://pyasn1.sourceforge.net/changes.html

mhkeller commented 9 years ago

Note. This error also occurs when running automation into virtualbox. It could be that one of the dependencies has changed its dependency.

mhkeller commented 9 years ago

Hmm this fails even after updating opportunities to include the 0.1.8 requirement. it throws the same error citing 0.1.7 being asked for

abelsonlive commented 9 years ago

try just removing that requirement?

mhkeller commented 9 years ago
TASK: [initialize newslynx database.] *****************************************
<127.0.0.1> ESTABLISH CONNECTION FOR USER: vagrant
<127.0.0.1> REMOTE_MODULE command chdir=/opt/newslynx/newslynx-core/ /usr/local/bin/newslynx init
<127.0.0.1> EXEC ssh -C -tt -vvv -o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/Users/mike/.ansible/cp/ansible-ssh-%h-%p-%r" -o StrictHostKeyChecking=no -o Port=2222 -o IdentityFile="/Users/mike/wrk/projects/newslynx/automation/.vagrant/machines/newslynx/virtualbox/private_key" -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=vagrant -o ConnectTimeout=30 127.0.0.1 /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1439869061.32-221240855093461 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1439869061.32-221240855093461 && echo $HOME/.ansible/tmp/ansible-tmp-1439869061.32-221240855093461'
<127.0.0.1> PUT /var/folders/gp/__h0yj4s4lsc84w79k4b8mnh0000gn/T/tmpQw2v4P TO /home/vagrant/.ansible/tmp/ansible-tmp-1439869061.32-221240855093461/command
<127.0.0.1> EXEC ssh -C -tt -vvv -o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/Users/mike/.ansible/cp/ansible-ssh-%h-%p-%r" -o StrictHostKeyChecking=no -o Port=2222 -o IdentityFile="/Users/mike/wrk/projects/newslynx/automation/.vagrant/machines/newslynx/virtualbox/private_key" -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=vagrant -o ConnectTimeout=30 127.0.0.1 /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible, key=flusrvrmbrcjsxrpvhhzqpazfkycwghm] password: " -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-flusrvrmbrcjsxrpvhhzqpazfkycwghm; LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/vagrant/.ansible/tmp/ansible-tmp-1439869061.32-221240855093461/command; rm -rf /home/vagrant/.ansible/tmp/ansible-tmp-1439869061.32-221240855093461/ >/dev/null 2>&1'"'"''
failed: [newslynx] => {"changed": true, "cmd": ["/usr/local/bin/newslynx", "init"], "delta": "0:00:00.289551", "end": "2015-08-18 03:37:41.795853", "rc": 1, "start": "2015-08-18 03:37:41.506302", "warnings": []}
stderr: Traceback (most recent call last):
  File "/usr/local/bin/newslynx", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2749, in <module>
    working_set = WorkingSet._build_master()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 446, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 459, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 628, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: pyasn1>=0.1.8

FATAL: all hosts have already failed -- aborting

PLAY RECAP ********************************************************************
           to retry, use: --limit @/Users/mike/main.yaml.retry

newslynx                   : ok=26   changed=23   unreachable=0    failed=1

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
mhkeller commented 9 years ago

that was the error output after removing pyasn from newslynx-core requirements

abelsonlive commented 9 years ago

Just tested on Virtualbox + AWS and ran fine: https://github.com/newslynx/newslynx-core/commit/ada9cb01d66e4e04ef7f71d9447c35ab9bbbb28d