Comments (1)
The "SlaveID" value is more ephemeral than the "hostname" field. That is, there could be multiple "slaveId" values for the same physical host, for example when the mesos agent times out its pings and then later reconnects with the master. OTOH, a new host could take on the same hostname as one that was decommissioned before. In practice this is less frequent than changes to slaveId of the same host.
This also affects other aspects in the system. For example, cluster autoscaling. If a new slaveId is treated as a new host, a scale down can trigger on the old slaveId since it does not have any running tasks. The scaling actions implementation you provide will have to remember the slaveId values used for a host name, or use some other similar technique to ensure scale down does not terminate a host that is running tasks with a different slaveId at the moment.
Additional thoughts welcome.
To offer a workaround/hack for you: If your framework does not need to use the cluster autoscaling feature (now or in the future), it is likely that you could always use the slaveId as the hostname when interfacing with Fenzo. That is, you will pass the offer's slaveId as the hostname. From then on, you can use slaveid as the hostname for calls to the taskUnassigner and taskAssigner, for example. I have not tested this though.
For this hack, you will need to use a VMLeaseObject that returns slaveId when asked for hostname. You can use the following sample object to wrap the offers that are input into Fenzo.
import com.netflix.fenzo.plugins.VMLeaseObject;
import org.apache.mesos.Protos;
public class MyVMLeaseObject extends VMLeaseObject {
private final String slaveId;
public MyVMLeaseObject(Protos.Offer offer) {
super(offer);
this.slaveId = offer.getSlaveId().getValue();
}
@Override
public String hostname() {
return slaveId;
}
}
from fenzo.
Related Issues (20)
- contributor agreement. HOT 8
- NamedResourceSetRequest HOT 2
- Resource ranges and "greedy" scheduling HOT 4
- Support v1 Protos (or provide utility to convert) HOT 5
- Support dynamic fitness threshold HOT 3
- Allow for custom shortfall evaluators HOT 4
- Execution failed for task ':fenzo-core:compileJava'.> 无效的源发行版: 1.8 HOT 2
- Update Mesos dependency
- BinPacking with weights HOT 2
- Incorrect handling of reserved resources HOT 2
- Unsafe concurrent access to unknown lease collection in AssignableVMs class
- Pluggable ENI fitness evaluator HOT 1
- After reading Fenzo, I don't understand how to get Framework information on Mesos?
- After reading Fenzo, I don't understand how to get Framework information on Mesos?
- DisableVM does not remember hosts HOT 2
- .travis.yml: The 'sudo' tag is now deprecated in Travis CI
- Dynamic ResAllocs
- CVE-2018-7489 on jackson-databind 2.4.5 HOT 1
- Unused variable
- Unreleased Resource: Streams HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fenzo.