CiscoCloud / mantl-api

Mantl API
Apache License 2.0
17 stars 12 forks source link

Framework API Does Not Retreive Active Frameworks #52

Open TomDaviesUK opened 8 years ago

TomDaviesUK commented 8 years ago

When cleaning up a Cassandra un-install, the framework ID in Mesos is required.

But, using the Mantl-API, an empty JSON is returned, though I can see four active frameworks in the Mesos UI.

curl -sku username:password https://<my-mantl-control-01/api/1/frameworks

Further, when copying the Active Framework ID manually out of the Mesos UI and attempting to delete the framework using that ID via the API, this fails as the framework corresponding to the ID is reported as 'not found'.

curl -X DELETE -sku username:password https://<my-mantl-control-01/api/1/frameworks/{My_Framework_ID} Cloud not shutdown framework {ID}: 400 No framework found with specified ID

Is this a real issue, or user error in some way?

I'm running Mantl 1.1.0 on Openstack.

ryane commented 8 years ago

can you check the stderr logs in mantl-api while you run curl -sku username:password https://<my-mantl-control-01/api/1/frameworks? assuming you are in debug mode (the default until https://github.com/CiscoCloud/mantl/pull/1531), you should see a line that looks like this: GET http://mantl-control-01:15050/master/state.json. can you check to see if the host in that line matches the leader that you see in the mesos UI (labeled Server on the left sidebar of the mesos ui home page)? you may have to translate between hostname and ip (mantl-api will report the hostname but mesos ui will report the ip addr).

TomDaviesUK commented 8 years ago

Update / Additional information: Discussed in Gitter with @ryane.

The Mantl-API was not pointing to the lead Mesos server. A re-start of the Mantl-API application resolved the immediate problem.

This might be resolved in Mantl-API 0.2.2. Will leave open for confirmation.

ryane commented 8 years ago

mantl-api can end up caching the mesos leader and not refreshing after mesos leadership changes.