Commit graph

415 commits

Author SHA1 Message Date
Michael Crosby
e5ea745aa4 Merge pull request #77 from rakyll/master
Remove reflect from chanotify and fix a deadlock case
2016-01-21 11:53:45 -08:00
Burcu Dogan
ec1169fe85 Build prctl on systems with procfs, fix fds build tag
Signed-off-by: Burcu Dogan <jbd@google.com>
2016-01-20 21:58:40 -08:00
Burcu Dogan
0cd5c21a50 Remove reflect from chanotify and fix a deadlock case.
With the change, the read rate from (*Notifier).Chan()
is 10-20 times faster and more consistent.

Consider the following program:

  s := chanotify.New()
  for i := 0; i < n; i++ {
    ch := make(chan struct{}, 1)
    s.Add(ch, fmt.Sprintf("%d", i))
    go func(ch chan struct{}) {
      time.Sleep(time.Second) // because your original code has a deadlock case.
      ch <- struct{}{}
    }(ch)
  }

  avgs := make([]int64, n)
  go func() {
    for i := 0; i < n; i++ {
      start := time.Now()
      <-s.Chan()
      avgs[i] = time.Now().Sub(start).Nanoseconds()
    }
  }()

  time.Sleep(10 * time.Second)
  s.Close()

  fmt.Println(avgs)

The output without the change; ignore the first value:

[1000469322 739 100492 200 75412 77733 316 88873 695 137905 244 72197 196 84444 175 80858 169 125514 165 73509 885 739963 248 72569 169 90094 159 110571 68954 143 145616 148 83563 149 86154 132 82722 154 79740 170 86688 143 97033 158 87126 187 69839 125 100043 148 72633 133 80690 149 41841 113509 346 134876 247 80720 153473 414352 293 103906 276 140524 233 88041 236 123732 242 89870 238 105342 213 110773 319 121004 228 89237 793 94458 235 604864 400129 412 82639 598 72319 178 64423 157 35779 44536 235 55411 129 46051 29032 231]

The output with the change; ignore the first value:

[999893266 3189 2514 2257 2119 2252 2780 3402 2689 2916 2218 2385 4459 495 309 1289 578 4432 590 421 387 335 1156 272 1566 4933 1271 537 391 792 373 329 411 527 1764 782 322 1044 718 533 405 1183 337 230 1827 848 575 692 321 3514 504 491 772 1952 575 2931 1754 1279 781 403 1137 451 953 914 369 387 289 1796 473 1237 798 816 1215 690 495 389 403 1235 373 364 515 509 321 349 319 41810 27359 2582 2055 2177 2486 2181 1903 2207 2207 2005 1746 1802 1864 2169]

The change also fixes the deadlock case pointed in the program above.

Signed-off-by: Burcu Dogan <jbd@google.com>
2016-01-20 15:34:25 -08:00
Michael Crosby
fbb69b2fa0 Merge pull request #74 from aaronlehmann/tolerate-missing-resources
Avoid panic when spec file is missing sections under Resources
2016-01-15 16:26:16 -08:00
Aaron Lehmann
cf9fcdc71a Avoid panic when spec file is missing sections under Resources
Check pointers against nil before dereferencing them. Skip any sections
that are nil, since that's equivalent to having no values defined for
those sections.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-01-15 16:04:52 -08:00
Phil Estes
a4019a324c Clean up option output tabbing; update to latest
Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2016-01-12 15:00:28 -08:00
Phil Estes
03177bf053 Add dependency on the container build for steps doing "run"
Make sure that the container is actually built before commands in the
Makefile that require doing `docker run` on the devel container.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2016-01-12 14:56:07 -08:00
Michael Crosby
a4576937f9 Merge pull request #66 from coolljt0725/fix_termimal
Fix container exit not restore terminal and close stdin
2016-01-11 10:22:22 -08:00
Lei Jitang
80ce7650f4 Fix container exit without restore terminal
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-01-06 16:25:38 +08:00
Alexander Morozov
e17cf1ad4f Vendor dependencies
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-01-05 14:56:27 -08:00
Alexander Morozov
9f1a65e941 Add vendor script
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-01-05 14:54:07 -08:00
Michael Crosby
476a54714d Merge pull request #64 from LK4D4/trim_deps
Revert "Use protoversion for containerd version"
2016-01-05 13:23:20 -08:00
Alexander Morozov
e55ebadb09 Revert "Use protoversion for containerd version"
This reverts commit d2e319523d.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-01-05 13:07:47 -08:00
Michael Crosby
c141cb670f Fix nil checks for cgroup fields
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-01-04 13:40:28 -08:00
Michael Crosby
ee4d203715 Merge pull request #63 from kunalkushwaha/master
Fixes the compile issue #62
2016-01-04 13:26:15 -08:00
Kunal Kushwaha
a3cf409ada Fixes the compile issue#62
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2015-12-25 11:58:11 +09:00
Alexander Morozov
f51744f8c0 Merge pull request #56 from LK4D4/fix_chan
Fix adding to chanotify on blocking select
2015-12-22 14:57:25 -08:00
Alexander Morozov
e2f3518af8 Fix adding to chanotify on blocking select
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-12-22 08:28:37 -08:00
Michael Crosby
d99ee27874 Merge branch 'stats' 2015-12-18 16:54:27 -08:00
Michael Crosby
7d4f74474e Add more metrics collection
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-12-18 16:54:02 -08:00
Michael Crosby
d08b005ca9 Merge pull request #54 from LK4D4/chanotify_package
Chanotify package
2015-12-18 15:44:39 -08:00
Alexander Morozov
4f0c3850ba Use chanotify in supervisor
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-12-18 12:17:53 -08:00
Alexander Morozov
fed10a2c22 Add chanotify package
It allows to listen for notifications on bunch of channels.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-12-18 11:46:45 -08:00
Alexander Morozov
5c4b7a66c0 Merge pull request #51 from peter-edge/protoversion
Use protoversion for containerd version
2015-12-18 10:53:04 -08:00
Michael Crosby
9d1464e72f Merge pull request #53 from jfrazelle/makefile-ci
add dockerfile/makefile additions for ci
2015-12-18 10:41:12 -08:00
Jessica Frazelle
5b3f41c244
add dockerfile/makefile additions for ci
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-12-18 09:18:14 -08:00
Alexander Morozov
5ba65116ec Merge pull request #46 from runcom/fix-readme-typo
README.md: fix typo
2015-12-18 09:02:43 -08:00
Peter Edge
d2e319523d Use protoversion for containerd version
Signed-off-by: Peter Edge <peter.edge@gmail.com>
2015-12-18 13:06:04 +00:00
Antonio Murdaca
f1b2d5ab60 README.md: fix typo
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-12-18 10:32:46 +01:00
Michael Crosby
1d63236c27 Merge pull request #43 from LK4D4/supervisor_package
Move supervisor to it's own package
2015-12-17 16:23:47 -08:00
Alexander Morozov
69f8f566a2 Move supervisor to it's own package
It allows to keep main namespace cleaner

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-12-17 16:18:48 -08:00
Michael Crosby
6f71180bf0 Merge pull request #42 from thaJeztah/add-maintainers
Add MAINTAINERS file
2015-12-17 15:37:25 -08:00
Sebastiaan van Stijn
491e497f2f Add MAINTAINERS file
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2015-12-18 00:16:45 +01:00
Michael Crosby
9a445dd842 Merge pull request #41 from thaJeztah/update-license
Update copyright and license
2015-12-17 15:13:54 -08:00
Michael Crosby
71a544f824 Merge pull request #40 from thaJeztah/fix-typo
Fix typo in README
2015-12-17 15:13:10 -08:00
Sebastiaan van Stijn
c58674286d Update copyright and license
Documentation for the open source projects uses a
different license than the code.

For reference, see https://github.com/docker/libkv/pull/59

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2015-12-18 00:08:16 +01:00
Sebastiaan van Stijn
086773b823 Fix typo in README
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2015-12-17 23:56:40 +01:00
Michael Crosby
b296d50493 Update resource on libcontainer change
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-12-17 13:58:50 -08:00
Michael Crosby
c4f3b71344 Merge pull request #37 from tonistiigi/close-stdin
Close stdin after data has been copied
2015-12-17 13:43:34 -08:00
Michael Crosby
e489dd8b28 Merge pull request #36 from cpuguy83/docs_typos
fix some docs typos and wording
2015-12-17 13:42:25 -08:00
Tonis Tiigi
ae5c752449 Close stdin after data has been copied
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-12-17 13:42:08 -08:00
Brian Goff
866ad6fe1d fix some docs typos and wording
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-12-17 16:02:58 -05:00
Patrick Chanezon
5faf2bd102 Update README.md 2015-12-17 12:25:52 -08:00
Michael Crosby
286b5aaa00 Merge pull request #34 from LK4D4/graphite_support
Add graphite metrics support
2015-12-16 16:09:44 -08:00
Alexander Morozov
f3d2b60bab Add graphite metrics support
I tried with https://github.com/hopsoft/docker-graphite-statsd and it
looks pretty nice. We can see how different metrics depends on a number of
containers and find bottlenecks under heavy load.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-12-16 16:03:08 -08:00
Michael Crosby
9bddc01b78 Merge pull request #33 from LK4D4/event_loop
Event loop package
2015-12-16 14:07:17 -08:00
Alexander Morozov
79591b2ae1 Use eventloop package in containerd
It's first attempt to decouple code into independent modules for more
effective unit-testing.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-12-16 13:56:20 -08:00
Alexander Morozov
7332e6e847 Add eventloop package
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-12-16 13:53:03 -08:00
Michael Crosby
4eb0a4ef8d Merge branch 'docs' 2015-12-16 12:15:25 -08:00
Michael Crosby
83eeb131d8 Update readme and documentation for release
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-12-16 12:15:22 -08:00