marathon-api | Easy to use Marathon API written in ruby | REST library
kandi X-RAY | marathon-api Summary
kandi X-RAY | marathon-api Summary
[Code Climate] This gem provides an object oriented interface to the [Marathon Remote API][1]. At the time if this writing, marathon-api is meant to interface with Marathon version 0.10.1.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Get information about the client
- Create an App App
- List the group
- List deployment
- Create a new task
- Create a queue .
- The list of migrations
- Subscribe to the Event Hubs
marathon-api Key Features
marathon-api Examples and Code Snippets
Community Discussions
Trending Discussions on marathon-api
QUESTION
I have an application deploying an Akka cluster using marathon-api with ClusterBootstrap
When a deployment runs it does the following:
- Adds a new instance with the new version of the application
- Kills one of the old instances
- Repeat until is done
We have a cluster of 4 nodes
After doing a deployment the cluster looks like this (assuming 2 instances in this example):
...ANSWER
Answered 2021-Mar-25 at 17:02You'll need to use a "real" downing provider like Split Brain Resolver. This lets the cluster safely down nodes that are unreachable. (As opposed to the auto downing, which downs them without consideration of it is safe or not.)
There's a separate question of why DC/OS is killing the nodes so quickly they don't get the chance to properly shut down. But I don't know DC/OS well enough to say why that could be. And, regardless, a downing provider is essential for clustered environments so you will want to get that in place anyway.
Edited due to your comments about SBR:
- First I want to be clear, the marathan-api is almost certainly irrelevant here. marathon-api is how nodes discover other nodes in DC/OS. The problems you are having are with fundamental cluster problems, namely unreachable nodes. A cluster with unreachable nodes is going to act the same way, regardless of where it is running and how the nodes are discovered.
- Fundamentally my best guess is that you are having problems getting clean shutdowns. If SBR is downing your entire cluster it's because it is getting to a point where there are more unreachable nodes than live clusters.
As an example, what might be happening:
- You have 4 live nodes and want to upgrade.
- DC/OS kills the first node. For some unknown reason you aren't getting a clean shutdown so the node is marked as unreachable. (Essentially the cluster, because it wasn't a clean shutdown doesn't node if the node still exists but is unresponsive and/or behind a partition.) There are 3 live nodes and one unreachable.
- DC/OS starts the second node. Perhaps it takes a while to boot your application. So you have 3 live nodes, one unreachable node, and 1 unready node.
- DC/OS kills another node. So you have 2 live nodes, 2 unreachable nodes, and 1 unready node. At this point SBR can no longer guarantee that you haven't had a network partition because you don't have majority. At this point, in order to prevent corruption, it must stop the cluster.
So, I would recommend the following:
- I don't know the details of DC/OS well enough but you probably need to slow down your rolling upgrades. In K8S I'd use something like MinReadySeconds.
- You may want to consider a fifth node. Odd numbers are better because it makes majority easier to determine.
- If you continue to have problems you'll need to provide more logs from the SBR decision.
SBR is the answer here. I realize that you aren't having real network partitions, but the fact that you are having unreachable nodes means that the Akka Cluster is unable to tell if there are network partitions or not and that's the root cause of the problem.
QUESTION
I am using Marathon Ruby SDK to get the number of nodes registered with the DC/OS cluster. But I am not getting any method which can return me the number of nodes registered with the cluster. Marathon SDK: https://www.rubydoc.info/gems/marathon-api/
Any idea how can I get the registered nodes? Thanks in advance.
...ANSWER
Answered 2019-Apr-26 at 13:04Marathon has no idea how many nodes are registered since it does not need this inforamtion to perform its tasks.
The only way to get number of registered nodes is via Mesos Master API :5050/slaves
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install marathon-api
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page