Commit Graph

126 Commits

Author SHA1 Message Date
Matt Bajor d87c48ae4e Fix lint violations
This changeset fixes all lint violations that show up with a
min_confidence of 1

- Issue #500: Run golint on codebase

Signed-off-by: Matt Bajor <matt@notevenremotelydorky.com>
2015-03-27 21:17:44 -06:00
smothiki b91fa60246 Modify documentation for soft constraints
Signed-off-by: sivaram mothiki <sivaram@opdemand.com>
2015-03-23 11:22:21 -06:00
smothiki cfbbb0c9cb Add support for soft constraints
Signed-off-by: sivaram mothiki <sivaram@opdemand.com>
2015-03-23 11:22:21 -06:00
smothiki f9e82918b7 Add isSoft bool in type expr
Signed-off-by: sivaram mothiki <sivaram@opdemand.com>
2015-03-23 11:22:21 -06:00
smothiki dd78f41c32 modify documentation for the sofaffinity example
Signed-off-by: sivaram mothiki <sivaram@opdemand.com>
2015-03-23 11:22:21 -06:00
smothiki 204216f173 Add support for soft affinities
Add documentation for soft affinity

trim ~ if the expression is not regex

Add example for !=~

Signed-off-by: sivaram mothiki <sivaram@opdemand.com>
2015-03-23 11:22:20 -06:00
Nicolas Jouannem cb3f330696 Corrected two typos.
Signed-off-by: Nicolas Jouannem <nick@nickology.com>
2015-03-21 21:28:07 +01:00
Andrea Luzzardi b04197d3c0 Merge pull request #451 from vieux/number_container
use number of containers in binpack + fix some tests
2015-03-17 11:07:57 +01:00
Abdul Qabiz 918b762030 Fix typos
Signed-off-by: Abdul Qabiz <abdul.qabiz@gmail.com>
2015-03-17 06:46:20 +05:30
Andrea Luzzardi 2e724f95e0 Merge pull request #461 from lalyos/patch-1
Make sample `docker ps` output fit the screen
2015-03-11 16:32:40 -07:00
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