Victor Vieux
01a6e8a392
user number of containers in binpack
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-03-10 16:52:42 -07:00
lalyos
308876e3c0
Make sample `docker ps` output fit the screen
...
The usual `docker ps` output is way long. When reading it on github there is no sign that the reader should
scroll. created and status fields deleted, and some space to make it fit the browser.
Signed-off-by: lalyos <lalyos@yahoo.com>
2015-03-09 20:14:36 +01:00
Victor Vieux
2f19f5899a
Add spread strategy and make it the default
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-03-07 15:17:42 -08:00
Matthew Gallagher
3c7e74c43e
Corrected typos in swarm scheduler docs
...
Signed-off-by: Matthew Gallagher <mattva01@gmail.com>
2015-02-28 03:31:49 -05:00
Matthew Fisher
08b0ddbd14
refactor score to weightedNode structure
...
In many different scheduling strategies, a node is typically given
a certain weight based upon its values that are important to the
overall strategy. Exposing a weightedNode structure as well as a
new weightedNodeList type allows one to operate upon a set of nodes for
sorting purposes by assigning weights to each node and calling
sort.Sort() on a weightedNodeList.
Signed-off-by: Matthew Fisher <matthewf@opdemand.com>
2015-02-27 15:48:53 +00:00
Victor Vieux
d8042f9677
add Node interface
...
Usable -> Total & Reserved -> Used
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-02-27 14:25:50 -08:00
Victor Vieux
47e03120f5
remove Nodes(), add Images() and Images()
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-02-27 14:20:37 -08:00
Victor Vieux
ce98e66c63
cluster API instead of scheduler API
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-02-27 14:20:37 -08:00
Victor Vieux
126f550317
add SchedulerOptions
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-02-27 14:20:37 -08:00
Victor Vieux
dd537dbe74
clean cut cluster - scheduler
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-02-27 14:20:37 -08:00
Victor Vieux
98a21bd373
initial mesos.go file full fo TODOs
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-02-27 14:20:37 -08:00
Victor Vieux
eb88068f93
refactor code: move filter/ and strategy/ out of scheduler and create a simple
...
scheduler interface.
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-02-27 14:20:37 -08:00
Sven Dowideit
c530cd1523
add an index and go make some small tweaks
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2015-02-26 11:19:14 +10:00
Andrea Luzzardi
97334b0193
Dependency Filter: co-schedule dependent containers on the same node.
...
Supported dependencies:
- Shared volumes: `--volumes-from=dependency`
- Links: `--link=dependency:alias`
- Shared network stack: `--net=container:dependency`
Fixes #251
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-02-10 13:26:21 -08:00
Derek Schultz
7709691f0b
correct typo
...
Signed-off-by: Derek Schultz <schultz.derek@gmail.com>
2015-02-10 01:27:33 -07:00
zhangbaitong
3c10270289
Docs:fix the problem of logic in filter section
...
Signed-off-by: zhangbaitong <zhangbaitong@163.com>
2015-02-07 14:35:49 +08:00
zhangbaitong
67f4fbb42a
docs:fix the problem of description
...
Signed-off-by: zhangbaitong <zhangbaitong@163.com>
2015-02-06 09:38:13 +08:00
Sven Dowideit
f8dc6e3f73
fix 2 broken links - there's no strategy README yet, so we can't link to it in the Docker docs
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2015-02-04 13:04:15 +10:00
Victor Vieux
3926582d7d
add README.md for strategies
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-02-03 22:48:45 +00:00
Sven Dowideit
14c4fb81cf
Add docker.docker.com metadata and reflow to 80-chars for GH diffs
...
Signed-off-by: Sven Dowideit <SvenDowideit@docker.com>
2015-02-02 09:53:43 +10:00
Andrea Luzzardi
51e89bc928
constraint filter: Simplify code.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-01-28 15:35:40 -08:00
Andrea Luzzardi
df4ffb5a7b
affinity: Ensure affinities can be chained.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-01-28 12:16:23 -08:00
Andrea Luzzardi
04fc1ab997
expr: Get rid of MatchEmpty.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-01-28 12:12:09 -08:00
Andrea Luzzardi
fc192b7077
affinity: Fix expression matching by passing arguments in bulk.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-01-28 12:07:20 -08:00
Andrea Luzzardi
5627b390df
filter expr: Test that the order in Match doesn't matter.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-01-28 12:07:20 -08:00
Victor Vieux
2f1a9b21b6
fix match
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-28 12:07:20 -08:00
Victor Vieux
cdf884cd10
Merge pull request #310 from aluzzardi/random-port-detection
...
Port filter: Random port assignment conflict detection.
2015-01-27 12:29:36 -08:00
Andrea Luzzardi
faa519905e
Port filter: Random port assignment conflict detection.
...
This change takes into account ports that have been randomly allocated
on the node.
When starting containers with no explicit external port (e.g. `-p 80`),
Docker allocates a random port on the node.
The problem is that Swarm didn't see that random port as taken, meaning
that another container could explicitely ask for it, resulting in a
broken container.
Replaces #274
Fixes #272
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-01-26 17:29:20 -08:00
Victor Vieux
231ded20e0
improve some logs
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-26 23:41:56 +00:00
Pierre Wacrenier
eb48f4d2f0
Remove the container's state from the store when destroyed
...
Signed-off-by: Pierre Wacrenier <pierre.wacrenier@gmail.com>
2015-01-26 22:34:47 +01:00
Victor Vieux
6af7c3c209
match only repo
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-24 21:27:03 -08:00
Victor Vieux
02cc59840f
Revert "Fixes panic when ports are not specified"
...
This reverts commit a916f9cde0 .
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-24 01:42:15 +00:00
Victor Vieux
3d8aed071e
correct typos in filter readme
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-24 00:43:25 +00:00
Brian Goff
a916f9cde0
Fixes panic when ports are not specified
...
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-01-23 15:56:14 -05:00
Victor Vieux
e9f487bcaf
update README.mds
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-21 22:47:31 +00:00
Andrea Luzzardi
10074faa75
Merge pull request #261 from vieux/chanwit-constraints-expr
...
Proposal: constraint & affinity filter expression enhancement
2015-01-20 16:38:24 -08:00
Victor Vieux
e546965cf3
refactor and remove <= and >=
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-21 00:24:51 +00:00
Jessica B. Hamrick
634dd00497
Remove unnecessary arguments from Equal and NotEqual
...
Signed-off-by: Jessica B. Hamrick <jhamrick@berkeley.edu>
2015-01-20 15:08:01 -08:00
Jessica B. Hamrick
63109bb0f2
Remove total variable
...
Signed-off-by: Jessica B. Hamrick <jhamrick@berkeley.edu>
2015-01-20 11:42:02 -08:00
Chanwit Kaewkasi
bf852ec243
update expression syntax in doc
...
Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
2015-01-20 15:45:38 +07:00
Chanwit Kaewkasi
3c147df81a
remove unsupported operators
...
Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
2015-01-20 15:45:36 +07:00
Chanwit Kaewkasi
e4db376a6d
support affinity and validate key and value properly
...
Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
2015-01-20 15:44:55 +07:00
Chanwit Kaewkasi
45b7f26394
refactor matching into filter/utils.go
...
Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
2015-01-20 10:42:23 +07:00
Jessica B. Hamrick
11ebdb050c
Fix the scheduling bug, fixes #253
...
Signed-off-by: Jessica B. Hamrick <jhamrick@berkeley.edu>
2015-01-19 19:19:35 -08:00
Jessica B. Hamrick
f942cb2e69
Add test that fails to execute the proper strategy
...
Signed-off-by: Jessica B. Hamrick <jhamrick@berkeley.edu>
2015-01-19 19:19:32 -08:00
Chanwit Kaewkasi
d77c9596b1
add double equals comparison
...
Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
2015-01-20 10:04:19 +07:00
Chanwit Kaewkasi
7ee722b2d7
support relative comparisons in constraints
...
Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
2015-01-20 10:03:34 +07:00
Chanwit Kaewkasi
d335f59757
implement alternative negation syntax
...
Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
2015-01-20 10:02:13 +07:00
Chanwit Kaewkasi
25231f3bb3
fix test failed per rebase #228
...
Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
2015-01-20 10:02:12 +07:00
Chanwit Kaewkasi
5b973d0057
improve to allow optional matching with case-insensitivity
...
Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
2015-01-20 10:02:10 +07:00
Chanwit Kaewkasi
b4a7abdc83
add a testcase for escape regexp
...
Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
2015-01-20 10:02:09 +07:00
Chanwit Kaewkasi
790b1ea45d
cleanup and add comments
...
Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
2015-01-20 10:02:07 +07:00
Chanwit Kaewkasi
564cca1a22
explain expression syntax in README
...
Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
2015-01-20 10:02:05 +07:00
Chanwit Kaewkasi
54c7c12d05
improve regexp matching
...
Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
2015-01-20 10:00:48 +07:00
Chanwit Kaewkasi
37e10e9656
support not in constraints expressions
...
Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
2015-01-20 10:00:12 +07:00
Andrea Luzzardi
1e92f854d5
Merge pull request #243 from vieux/affinity
...
add affinity (start next to a container/image)
2015-01-19 14:02:03 -08:00
Victor Vieux
110c3b6c39
Merge pull request #236 from aluzzardi/state-store
...
Store requested state persistently.
2015-01-19 13:43:11 -08:00
Gp De Ciantis
e255413b0a
Fixed spelling error 'Healty' to 'Healthy'
...
Signed-off-by: Gp De Ciantis <gdeciantis@gmail.com>
2015-01-19 20:50:54 +00:00
Victor Vieux
98914a122c
tweak doc
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-16 00:10:36 +00:00
Victor Vieux
5a85211449
add images test
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-16 00:10:36 +00:00
Victor Vieux
5564894744
add images cache
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-16 00:10:36 +00:00
Victor Vieux
d54c5f8046
add doc
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-16 00:10:36 +00:00
Victor Vieux
ccee1f67e8
add affinity:
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-16 00:10:36 +00:00
Andrea Luzzardi
6410f9ad35
Store requested state persistently.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-15 23:10:50 +00:00
Victor Vieux
7260a66886
use HealthFilter
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-15 19:32:48 +00:00
Victor Vieux
f0e9fb032d
prevent undercommit for now
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-14 00:57:13 +00:00
Victor Vieux
45ea947e0e
OverCommit -> Usable
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-14 00:40:55 +00:00
Victor Vieux
d57eca7bc9
move overcommit outside of the strategies
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-14 00:33:49 +00:00
Victor Vieux
d8b609c161
Move overcommit outside of binpacking and use 105 instead of 0.05
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-14 00:33:49 +00:00
Keegan Lowenstein
89e482b633
Fix typos and whitespace
...
Signed-off-by: Keegan Lowenstein <keegan.lowenstein@gmail.com>
2015-01-13 14:13:01 -08:00
Andrea Luzzardi
94cf009e46
Container: Make Node public instead of exposing it through Node().
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-01-12 08:14:11 -08:00
Andrea Luzzardi
6a34054e58
Typo: Initialise -> Initialize.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-01-05 07:32:57 -08:00
Chanwit Kaewkasi
869c57ccb1
need int64 cast to prevent overflow on the 32-bit architecture
...
Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
2014-12-30 15:40:54 +07:00
Victor Vieux
e587338198
update README.md
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-12-19 01:04:42 +00:00
Victor Vieux
037f4c379b
simplify code
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-12-19 00:59:57 +00:00
Victor Vieux
2f6531d376
update docs
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-12-19 00:47:51 +00:00
Victor Vieux
e4dfa66b62
add README.md
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-12-19 00:44:13 +00:00
Victor Vieux
28a5063168
add tests and move from label to constraint
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-12-18 02:14:31 +00:00
Victor Vieux
ba1688ccef
add matching to constraints
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-12-18 01:56:13 +00:00
Victor Vieux
827cdf19f6
add --filter flag to specify which filter to use
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-12-16 21:05:15 +00:00
Victor Vieux
9196927ce2
nitpick
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-12-13 00:56:37 +00:00
Victor Vieux
cd243cfa34
simplify
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-12-13 00:09:38 +00:00
Victor Vieux
b1e80ce157
add --strategy to choose the strategy to use
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-12-12 23:57:27 +00:00
Victor Vieux
ebe77641c7
prevent panic in random strategy if no node
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-12-09 00:19:24 +00:00
Victor Vieux
814fc6e8d2
simplify code
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-12-07 01:02:05 +00:00
Victor Vieux
f8245da596
fix tests
2014-12-03 12:56:29 +00:00
Andrea Luzzardi
f5827052a4
Port filtering: Fixed a race condition.
...
Port filtering used to rely on NetworkSettings, however, those are not
populated until the container is started. While stopped, the filter was
unaware of the port being used, resulting in a race condition.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-12-02 17:46:22 -08:00
Andrea Luzzardi
cf65a010d6
Health filter: Only schedule containers on healthy nodes.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-11-21 17:07:26 -08:00
Andrea Luzzardi
24985d2e4f
Node: API to add/remove/cleanup the internal containers state.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-11-21 16:10:49 -08:00
Andrea Luzzardi
4f3c15d9fe
Label filter: Support for node pinning by name or id.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-11-21 14:13:40 -08:00
Andrea Luzzardi
7d930b8809
label filter: Ensure constraints are evaluated as logical ANDs.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-11-21 14:13:40 -08:00
Andrea Luzzardi
5251670529
Rename attribute filter file to label.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-11-21 14:13:40 -08:00
Andrea Luzzardi
1dead64e11
Rename attributes to labels.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-11-21 14:13:40 -08:00
Victor Vieux
1f74cb5809
remove races
2014-11-21 01:36:30 +00:00
Andrea Luzzardi
8e3ded4916
Added resource overcommit support to the binpacking strategy.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-11-20 16:19:05 -08:00
Andrea Luzzardi
dacb3e2ef1
Fix tests for the NewNode API changes.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-11-20 15:56:12 -08:00
Andrea Luzzardi
a2f29be40f
Added unit tests for the attribute filter.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-11-19 18:51:41 -08:00
Andrea Luzzardi
b2e803c269
Renamed attributes to attribute to be consistent with port filter.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-11-19 18:51:41 -08:00
Victor Vieux
9bf438ec64
int -> int64
2014-11-20 01:37:15 +00:00
Andrea Luzzardi
582bd6cc0e
Add unit tests for the port filter.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-11-19 17:25:22 -08:00