Giter VIP home page Giter VIP logo

mesos-cli's People

Contributors

bcicen avatar goodhaha avatar kevinschoon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

goodhaha mxnavi

mesos-cli's Issues

mesos-cli run error

Hill Kevin,
When I execute the mesos-cli task --shell 'echo $(date); sleep 2' | mesos-cli run --restart - ,but I get this mistake:

root@sunwuhao:~# mesos-cli task --shell 'echo $(date); sleep 2' | mesos-cli run -
2017-03-29T18:47:46.207+0800	INFO	CALL	{"type": "SUBSCRIBE", "framework": "&FrameworkInfo{User:root,Name:mesos-cli,ID:&FrameworkID{Value:,},FailoverTimeout:nil,Checkpoint:nil,Role:nil,Hostname:nil,Principal:nil,WebuiUrl:nil,Capabilities:[],Labels:nil,}"}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x9d1e68]

goroutine 7 [running]:
github.com/vektorlab/mesos-cli/runner.LogEvent(0xc4203b00f0, 0xc4202f4060)
	/home/kevin/repos/go/src/github.com/vektorlab/mesos-cli/runner/helpers.go:24 +0x668
github.com/vektorlab/mesos-cli/runner.handler.func1.1(0xc4203b00f0, 0x0, 0x0)
	/home/kevin/repos/go/src/github.com/vektorlab/mesos-cli/runner/runner.go:127 +0x58
github.com/vektorlab/mesos-cli/vendor/github.com/mesos/mesos-go/scheduler/events.HandlerFunc.HandleEvent(0xc4202d4b20, 0xc4203b00f0, 0xc4203b00f0, 0x0)
	/home/kevin/repos/go/src/github.com/vektorlab/mesos-cli/vendor/github.com/mesos/mesos-go/scheduler/events/events.go:39 +0x30
github.com/vektorlab/mesos-cli/vendor/github.com/mesos/mesos-go/extras/scheduler/controller.eventLoop(0xdd7b60, 0xc42023b040, 0xc42022f000, 0xdd40a0, 0xc4202d4a40, 0xdd40e0, 0xc4202d4b20, 0xc4202d7560, 0xc4203a4080, 0x0, ...)
	/home/kevin/repos/go/src/github.com/vektorlab/mesos-cli/vendor/github.com/mesos/mesos-go/extras/scheduler/controller/controller.go:111 +0x129
github.com/vektorlab/mesos-cli/vendor/github.com/mesos/mesos-go/extras/scheduler/controller.processSubscription(0xdd7b60, 0xc42023b040, 0xc42022f000, 0xdd40a0, 0xc4202d4a40, 0xdd40e0, 0xc4202d4b20, 0xc4202d7560, 0xdd5e20, 0xc4203aa080, ...)
	/home/kevin/repos/go/src/github.com/vektorlab/mesos-cli/vendor/github.com/mesos/mesos-go/extras/scheduler/controller/controller.go:96 +0xb7
github.com/vektorlab/mesos-cli/vendor/github.com/mesos/mesos-go/extras/scheduler/controller.(*controllerImpl).Run(0xc4202b90b8, 0xdd7b60, 0xc42023b040, 0xc42022f000, 0xdd40a0, 0xc4202d4a40, 0xdd40e0, 0xc4202d4b20, 0xc4202d7560, 0x0, ...)
	/home/kevin/repos/go/src/github.com/vektorlab/mesos-cli/vendor/github.com/mesos/mesos-go/extras/scheduler/controller/controller.go:85 +0x25c
github.com/vektorlab/mesos-cli/runner.Run.func1(0xc4202b90d0, 0xc4202b90c0, 0xdd2760, 0xc4202b90b8, 0xdd7b60, 0xc42023b040, 0xc42022f000, 0xdd40a0, 0xc4202d4a40, 0xdd40e0, ...)
	/home/kevin/repos/go/src/github.com/vektorlab/mesos-cli/runner/runner.go:157 +0x99
created by github.com/vektorlab/mesos-cli/runner.Run
	/home/kevin/repos/go/src/github.com/vektorlab/mesos-cli/runner/runner.go:170 +0x506

mesos top crashes

mesos tasks works alright.

mesos top crashes.

Pasting the output, including stacktrace below.

──────────┬─────┬──────┬──────────┐
│containers│tasks│agents│frameworks│
└          ┴─────┴──────┴──────────┘
  ID | CPU_USR | CPU_SYS | MEM_RSS | MEM_AVLpanic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xa15ee3]

goroutine 16 [running]:
github.com/mesanine/mesos-cli/top.getContainers(0xc4200e4b80, 0xe1dcc0, 0xc42000e240, 0xb2eeb9, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0)
        /go/src/github.com/mesanine/mesos-cli/top/top.go:37 +0x573
github.com/mesanine/mesos-cli/top.Run.func1(0x0, 0x0, 0x0, 0x0, 0x0)
        /go/src/github.com/mesanine/mesos-cli/top/top.go:123 +0xa2
github.com/mesanine/mesos-cli/vendor/github.com/vektorlab/toplib.collect(0xc420054b40, 0xc420107530)
        /go/src/github.com/mesanine/mesos-cli/vendor/github.com/vektorlab/toplib/top.go:92 +0x65
created by github.com/mesanine/mesos-cli/vendor/github.com/vektorlab/toplib.Run
        /go/src/github.com/mesanine/mesos-cli/vendor/github.com/vektorlab/toplib/top.go:110 +0xd7

Docker Image permissions

The docker registry doesn't look like it's publicly available:

Using default tag: latest
Pulling repository quay.io/vektorcloud/mesos-cli
Error: Status 403 trying to pull repository vektorcloud/mesos-cli: "{\"error\": \"Permission Denied\"}"

Read doesn't follow properly

When following a file that does not update very frequently, the offset is continually increased even when it exceeds the total file size and no data is returned. Seems like there's just a missing check to see if the offset should actually be incremented.

Here is the request stream while following a file:

POST /api/v1 HTTP/1.1
Host: mesos004.mydomain.com:5051
User-Agent: Go-http-client/1.1
Content-Length: 305
Accept: application/json
Content-Type: application/json
Accept-Encoding: gzip

{"type":"READ_FILE","read_file":{"path":"/tmp/mesos/slaves/5c20127b-be6b-4682-90a1-409c52467e38-S4/frameworks/f0c21eef-5260-477f-b07e-9beb4f91d30d-0000/executors/myapp-server_v3.3.6.57c5af05-2456-11e7-b7fd-005056a22c7d/runs/ddb83975-7302-4ddc-be65-f85d2c36a093/stdout","offset":82001127706,"length":50000}}
HTTP/1.1 200 OK
Date: Tue, 02 May 2017 19:45:08 GMT
Content-Type: application/json
Content-Length: 60

{"read_file":{"data":"","size":54350073},"type":"READ_FILE"}POST /api/v1 HTTP/1.1
Host: mesos004.mydomain.com:5051
User-Agent: Go-http-client/1.1
Content-Length: 305
Accept: application/json
Content-Type: application/json
Accept-Encoding: gzip

{"type":"READ_FILE","read_file":{"path":"/tmp/mesos/slaves/5c20127b-be6b-4682-90a1-409c52467e38-S4/frameworks/f0c21eef-5260-477f-b07e-9beb4f91d30d-0000/executors/myapp-server_v3.3.6.57c5af05-2456-11e7-b7fd-005056a22c7d/runs/ddb83975-7302-4ddc-be65-f85d2c36a093/stdout","offset":82055477779,"length":50000}}
HTTP/1.1 200 OK
Date: Tue, 02 May 2017 19:45:08 GMT
Content-Type: application/json
Content-Length: 60

{"read_file":{"data":"","size":54350266},"type":"READ_FILE"}POST /api/v1 HTTP/1.1
Host: mesos004.mydomain.com:5051
User-Agent: Go-http-client/1.1
Content-Length: 305
Accept: application/json
Content-Type: application/json
Accept-Encoding: gzip

{"type":"READ_FILE","read_file":{"path":"/tmp/mesos/slaves/5c20127b-be6b-4682-90a1-409c52467e38-S4/frameworks/f0c21eef-5260-477f-b07e-9beb4f91d30d-0000/executors/myapp-server_v3.3.6.57c5af05-2456-11e7-b7fd-005056a22c7d/runs/ddb83975-7302-4ddc-be65-f85d2c36a093/stdout","offset":82109828045,"length":50000}}
HTTP/1.1 200 OK
Date: Tue, 02 May 2017 19:45:08 GMT
Content-Type: application/json
Content-Length: 60

{"read_file":{"data":"","size":54350266},"type":"READ_FILE"}POST /api/v1 HTTP/1.1
Host: mesos004.mydomain.com:5051
User-Agent: Go-http-client/1.1
Content-Length: 305
Accept: application/json
Content-Type: application/json
Accept-Encoding: gzip

{"type":"READ_FILE","read_file":{"path":"/tmp/mesos/slaves/5c20127b-be6b-4682-90a1-409c52467e38-S4/frameworks/f0c21eef-5260-477f-b07e-9beb4f91d30d-0000/executors/myapp-server_v3.3.6.57c5af05-2456-11e7-b7fd-005056a22c7d/runs/ddb83975-7302-4ddc-be65-f85d2c36a093/stdout","offset":82164178311,"length":50000}}
HTTP/1.1 200 OK
Date: Tue, 02 May 2017 19:45:09 GMT
Content-Type: application/json
Content-Length: 60

{"read_file":{"data":"","size":54350266},"type":"READ_FILE"}

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.