Giter Club home page Giter Club logo

Comments (8)

buchanae avatar buchanae commented on May 24, 2024

Python (py_tes.py) behaves the same way, so not sure this is a funnel bug or a GCE quirk

from funnel.

buchanae avatar buchanae commented on May 24, 2024

Verifying that this is not specific to port 80, it also happens on port 8000

./bin/funnel task create --server http://35.185.217.211:8000/ examples/hello-world.json
DEBU tes        BODY                            unknown={"jobs":[{"jobID":"b3mkkmnntf6gd19v3t10","state":"Complete","task":{"name":"Hello world","description":"Simple Echo Command"}},{"jobID":"b3ml0anntf6gd19v3t1g","state":"Complete","task":{"name":"Hello world","description":"Simple Echo Command"}},{"jobID":"b3ml0bnntf6gd19v3t20","state":"Complete","task":{"name":"Hello world","description":"Simple Echo Command"}},{"jobID":"b3ml51fntf6gd19v3t2g","state":"Complete","task":{"name":"Hello world","description":"Simple Echo Command"}}]}

from funnel.

buchanae avatar buchanae commented on May 24, 2024

The problem is that I had a trailing slash on my server, which results in a server URL http://35.185.217.211//v1/jobs (double slash) which then results in a 301 redirect, which screws up POST requests.

RJHB552 funnel (gce-deploy-cleanup)
python python/py_tes.py --server http://35.185.217.211/ examples/hello-world.json
<urllib2.Request instance at 0x109c5e170>
send: 'POST //v1/jobs HTTP/1.1\r\nAccept-Encoding: identity\r\nContent-Length: 193\r\nHost: 35.185.217.211\r\nContent-Type: application/x-www-form-urlencoded\r\nConnection: close\r\nUser-Agent: Python-urllib/2.7\r\n\r\n{"projectId": "Funnel", "docker": [{"cmd": ["echo", "hello", "world"], "imageName": "ubuntu", "stdout": "stdout"}], "name": "Hello world", "resources": {}, "description": "Simple Echo Command"}'
reply: 'HTTP/1.1 301 Moved Permanently\r\n'
header: Location: /v1/jobs
header: Date: Tue, 11 Apr 2017 22:42:10 GMT
header: Content-Length: 0
header: Content-Type: text/plain; charset=utf-8
header: Age: 0
header: Connection: close
header: Via: 1.1 bladex.ohsu.edu
send: 'GET /v1/jobs HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: 35.185.217.211\r\nConnection: close\r\nUser-Agent: Python-urllib/2.7\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: application/json
header: Date: Tue, 11 Apr 2017 22:05:45 GMT
header: Content-Length: 482
header: Age: 2185
header: Connection: close
header: Via: 1.1 bladex.ohsu.edu
{u'jobs': [{u'state': u'Complete', u'task': {u'name': u'Hello world', u'description': u'Simple Echo Command'}, u'jobID': u'b3mkkmnntf6gd19v3t10'}, {u'state': u'Complete', u'task': {u'name': u'Hello world', u'description': u'Simple Echo Command'}, u'jobID': u'b3ml0anntf6gd19v3t1g'}, {u'state': u'Complete', u'task': {u'name': u'Hello world', u'description': u'Simple Echo Command'}, u'jobID': u'b3ml0bnntf6gd19v3t20'}, {u'state': u'Complete', u'task': {u'name': u'Hello world', u'description': u'Simple Echo Command'}, u'jobID': u'b3ml51fntf6gd19v3t2g'}]}
Traceback (most recent call last):
  File "python/py_tes.py", line 119, in <module>
    job_id = c.submit(t)
  File "python/py_tes.py", line 93, in submit
    job_id = data['value']
KeyError: 'value'
RJHB552 funnel (gce-deploy-cleanup)
python python/py_tes.py --server http://35.185.217.211 examples/hello-world.json
<urllib2.Request instance at 0x10941b170>
send: 'POST /v1/jobs HTTP/1.1\r\nAccept-Encoding: identity\r\nContent-Length: 193\r\nHost: 35.185.217.211\r\nContent-Type: application/x-www-form-urlencoded\r\nConnection: close\r\nUser-Agent: Python-urllib/2.7\r\n\r\n{"projectId": "Funnel", "docker": [{"cmd": ["echo", "hello", "world"], "imageName": "ubuntu", "stdout": "stdout"}], "name": "Hello world", "resources": {}, "description": "Simple Echo Command"}'
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: application/json
header: Date: Tue, 11 Apr 2017 22:48:10 GMT
header: Content-Length: 32
header: Age: 0
header: Connection: close
header: Via: 1.1 bladex.ohsu.edu
{u'value': u'b3mlqanntf6gd19v3t30'}

from funnel.

buchanae avatar buchanae commented on May 24, 2024

There's also an issue with the List endpoint, which GCE is currently caching but shouldn't be by default.

from funnel.

adamstruck avatar adamstruck commented on May 24, 2024

@buchanae this was fixed in #71 right?

from funnel.

buchanae avatar buchanae commented on May 24, 2024

There is still an issue with the funnel task list (and probably related) commands not handling a trailing slash properly, which I'll fix this morning

from funnel.

buchanae avatar buchanae commented on May 24, 2024

#79 makes some improvements, but I'm still seeing some strange behavior. Still working on this.

from funnel.

buchanae avatar buchanae commented on May 24, 2024

Fixed by #86

from funnel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.