Skip to content
This repository has been archived by the owner on May 21, 2018. It is now read-only.

shutdown api has been changed on mesos 0.24.1 #243

Open
asdfsx opened this issue Dec 14, 2015 · 7 comments
Open

shutdown api has been changed on mesos 0.24.1 #243

asdfsx opened this issue Dec 14, 2015 · 7 comments

Comments

@asdfsx
Copy link

asdfsx commented Dec 14, 2015

Mesos 0.24.0 added experimental support for v1 Scheduler HTTP API.
and I cannot shutdown the framwork by using the following command:

curl -d "frameworkId=YOUR_FRAMEWORK_ID" -X POST http://YOUR_MESOS_URL:5050/master/shutdown

Now I use the following cmd to shutdown the framework

curl -X POST -H "Content-Type: application/json" http://YOUR_MESOS_URL:5050/api/v1/scheduler [email protected]

Content of the teardown.json:

{
  "framework_id"    : {"value" : "framework id"},
  "type"            : "TEARDOWN"
} 
@asdfsx asdfsx changed the title on mesos 0.24, we should use new cmd to shutdown the framework! shutdown api has been changed on mesos 0.24.1 Dec 14, 2015
@christobill
Copy link

This also works:

curl -d 'frameworkId=YOUR_FRAMEWORK_ID' -X POST http://YOUR_MESOS_URL:5050/master/teardown 

@asdfsx
Copy link
Author

asdfsx commented Dec 18, 2015

@christobill maybe I got something wrong before -_- ,I'll close this issue!

@asdfsx asdfsx closed this as completed Dec 18, 2015
@asdfsx
Copy link
Author

asdfsx commented Jan 1, 2016

@christobill I found if I boot up the hdfs by docker, I can not stop it ~~I'm confused by this

docker run -it --rm -v "$PWD"/hdfs-mesos-0.1.5:/hdfs-mesos-0.1.5 --net host --workdir /hdfs-mesos-0.1.5 mesos_jdk:0.24.1_1.7 bin/hdfs-mesos  

mesos_jdk is a image I build for execute hdfs-mesos, Dockerfile as follow

FROM centos:7

RUN rpm -i http://repos.mesosphere.io/el/7/noarch/RPMS/mesosphere-el-repo-7-1.noarch.rpm && \
yum -y install mesos-0.24.1
RUN yum -y install java-1.7.0-openjdk
RUN yum -y install which

@christobill
Copy link

@asdfsx what I meant is: you are absolutely right, doc/README.md is not up-to-date.
You should reopen the issue.

@christobill
Copy link

README.md should be changed like this:

2 Shutdown the hdfs framework in Mesos: curl -d "frameworkId=YOUR_FRAMEWORK_ID" -X POST http://YOUR_MESOS_URL:5050/master/teardown (or curl -d "frameworkId=YOUR_FRAMEWORK_ID" -X POST http://YOUR_MESOS_URL:5050/master/shutdown for mesos<0.24.1)

@christobill
Copy link

@asdfsx concerning your docker issue.
Stop the docker container.
Get the framework id in mesos UI.
curl -d "frameworkId=YOUR_FRAMEWORK_ID" -X POST http://YOUR_MESOS_URL:5050/master/teardown (or curl -d "frameworkId=YOUR_FRAMEWORK_ID" -X POST http://YOUR_MESOS_URL:5050/master/shutdown for mesos<0.24.1)
With zkCli, rmr /hdfs-mesos

I am just quoting the doc (appart from the shutdown/teardown change)

@asdfsx
Copy link
Author

asdfsx commented Jan 8, 2016

@christobill I guess this depends on the situation. If you have succescfully started the frame work, you can use the old style to shutdown the framework. If you failed to start the framework, you should use "teardown" to kill all the executors.
"teardown" always work, no matter whether the framework was started successfuly.

@asdfsx asdfsx reopened this Jan 8, 2016
@asdfsx asdfsx closed this as completed Jan 8, 2016
@asdfsx asdfsx reopened this Jan 8, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants