Doug Davis
73b7cee89c
Merge pull request #11946 from crosbymichael/no-pkg-init
...
Remove port mapper/allocator global state
2015-03-30 22:03:12 -04:00
Michael Crosby
d8c628cf08
Ensure that bridge driver does not use global mappers
...
This has a few hacks in it but it ensures that the bridge driver does
not use global state in the mappers, atleast as much as possible at this
point without further refactoring. Some of the exported fields are
hacks to handle the daemon port mapping but this results in a much
cleaner approach and completely remove the global state from the mapper
and allocator.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-03-30 18:28:24 -07:00
Michael Crosby
62522c9853
Refactor portmapper to remove ALL global state
...
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-03-30 17:31:21 -07:00
Michael Crosby
43a50b0618
Refactor port allocator to not have ANY global state
...
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-03-30 17:30:59 -07:00
Jessie Frazelle
f0ddbbaa86
Merge pull request #11933 from LK4D4/fix_err_mask
...
Various fixes for execdriver
2015-03-30 17:12:35 -07:00
Alexander Morozov
2742bf5cbc
Merge pull request #11938 from achanda/patch-1
...
Remove unused daemon.LogToDisk function
2015-03-30 15:48:03 -07:00
Alexander Morozov
f468bbb7e8
Do not mask *exec.ExitError
...
Fix #11764
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-03-30 15:31:49 -07:00
Abhishek Chanda
1d23bae785
Remove unused daemon.LogToDisk function
...
Fixes #11937
Signed-off-by: Abhishek Chanda <abhishek.becs@gmail.com>
2015-03-30 14:54:17 -07:00
Antonio Murdaca
cc46ae8eae
Remove duplicate assignment
...
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-30 23:07:43 +02:00
Alexander Morozov
5a1e5cf8c9
Get child processes before main process die
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-03-30 13:28:34 -07:00
Alexander Morozov
489ab77f4a
Use proper wait function for --pid=host
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-03-30 13:27:38 -07:00
Michael Crosby
b6d6ffa1dd
Merge pull request #11896 from vdemeester/9998-cp
...
Docker cp handles resolv.conf, hostname & hosts, fixes #9998
2015-03-30 13:15:00 -07:00
Michael Crosby
d1306e63e4
Fix AUFS logrus build errors on import
...
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-03-30 11:46:44 -07:00
Michael Crosby
14fed352cb
Merge pull request #11799 from dqminh/aufs-dirperm1
...
aufs: apply dirperm1 by default if supported
2015-03-30 11:36:02 -07:00
Alexander Morozov
a2ea4a9d9d
Merge pull request #11906 from runcom/11905-refactor-utils-tmpdir
...
Refactor utils/tmpdir.go
2015-03-30 08:58:51 -07:00
Yuan Sun
08331294bc
Fix a typo in daemon/networkdriver/ipallocator/allocator.go
...
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
2015-03-30 08:31:46 +08:00
Vincent Demeester
8bc330d863
Docker cp handles resolv.conf, hostname & hosts, fixes #9998
...
Add a integration test TestCpSpecialFiles
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-03-29 22:10:14 +02:00
Antonio Murdaca
f1bbc1f34f
Refactor utils/tmpdir.go, fixes #11905
...
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-29 20:56:07 +02:00
Lei Jitang
7583b49125
Fix create volume in a directory which is a symbolic link
...
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-03-29 13:35:36 +08:00
Lei Jitang
013fb87543
Fix error from daemon no such image even when the image exist
...
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-03-28 09:07:20 +08:00
Brian Goff
da5c863d20
Merge pull request #11788 from reikani/pchoi
...
Changed snake case naming to camelCase.
2015-03-26 23:55:50 -07:00
Antonio Murdaca
6f4d847046
Replace aliased imports of logrus, fixes #11762
...
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-26 23:22:04 +01:00
Peter Choi
ae907e7af1
Changed snake case naming to camelCase
...
Signed-off-by: Peter Choi <phkchoi89@gmail.com>
2015-03-26 15:05:45 -06:00
Daniel, Dao Quang Minh
d68d5f2e4b
print dirperm1 supported status in docker info
...
It's easier for users to check if their systems support dirperm1 just by using
docker info
Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com>
2015-03-26 17:58:49 +00:00
Tibor Vass
2bbf1987d2
Merge pull request #11800 from hqhq/hq_fix_create_issue
...
add back job.Errorf
2015-03-26 11:12:55 -06:00
Alexander Morozov
dd492dc15d
Merge pull request #11702 from jimmypuckett/feature/bitflag_checking_style_11668
...
Feature/bitflag checking style 11668. Fixes #11668
2015-03-26 08:34:58 -07:00
Daniel, Dao Quang Minh
281abd2c8a
aufs: apply dirperm1 by default if supported
...
Automatically detect support for aufs `dirperm1` option and apply it.
`dirperm1` tells aufs to check the permission bits of the directory on the
topmost branch and ignore the permission bits on all lower branches.
It can be used to fix aufs' permission bug (i.e., upper layer having
broader mask than the lower layer).
More information about the bug can be found at https://github.com/docker/docker/issues/783
`dirperm1` man page is at: http://aufs.sourceforge.net/aufs3/man.html
Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com>
2015-03-26 07:25:42 +00:00
Qiang Huang
40ef253ef5
add back job.Errorf
...
c79b9bab54
(Remove engine.Status and replace it with standard go error)
cause a regression that create container won't get any warnings, we still
need this to send useful informations to user.
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-03-26 13:12:36 +08:00
Jimmy Puckett
5dde99163e
running code formatter as @tiborvass requested
...
Signed-off-by: Jimmy Puckett <jimmy.puckett@spinen.com>
2015-03-25 19:24:55 -04:00
Jessie Frazelle
89e7f5e661
Merge pull request #11772 from aneshas/11718-redundant-else
...
Fixed redundant else
2015-03-25 16:16:16 -07:00
Anes Hasicic
3d7b9e8f30
Fixed redundant else
...
Signed-off-by: Anes Hasicic <anes.hasicic@gmail.com>
2015-03-25 23:44:32 +01:00
Antonio Murdaca
c79b9bab54
Remove engine.Status and replace it with standard go error
...
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-25 22:32:08 +01:00
Arnaud Porterie
54a607a22d
Merge pull request #11691 from matthewkmayer/feature-dont-create-bind-dirs
...
Removes bind dir creation in daemon start.
2015-03-25 11:44:13 -07:00
Vincent Batts
b76e300b4c
btrfs: #ifdef for build version
...
We removed it, because upstream removed it. But now it will be coming
back, so work with it either way.
Signed-off-by: Vincent Batts <vbatts@redhat.com>
2015-03-25 13:56:51 -04:00
Alexander Morozov
444c967aec
Merge pull request #11750 from MabinGo/adjust_log_func_call
...
Use appropriate func to record logs according to different scene
2015-03-25 09:41:41 -07:00
Mabin
b46beb170f
Use appropriate function to record logs
...
Signed-off-by: Mabin <bin.ma@huawei.com>
2015-03-25 23:32:12 +08:00
Anes Hasicic
e479e1c9f7
Fixed redundant else in GetDeviceStatus
...
Signed-off-by: Anes Hasicic <anes.hasicic@gmail.com>
2015-03-25 09:53:04 +01:00
Jessica Frazelle
7dce902494
Get rid of panic in stats for lxc
...
Fix containers dir
Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <jess@docker.com> (github: jfrazelle)
2015-03-24 21:12:06 -07:00
Jimmy Puckett
e8e60befd6
Code simplification that @tiborvass requested
...
Signed-off-by: Jimmy Puckett <jimmy.puckett@spinen.com>
2015-03-24 21:10:07 -04:00
Jimmy Puckett
ec5e22efe3
Changing bitflag checking style to preferred style. Fixes #11668
...
Signed-off-by: Jimmy Puckett <jimmy.puckett@spinen.com>
2015-03-24 21:09:25 -04:00
Jessie Frazelle
22dba32b4d
Merge pull request #10527 from mfojtik/lxc_11
...
Fix lxc-start in lxc>1.1.0 where containers start daemonized by default
2015-03-24 17:37:27 -07:00
Michael Crosby
d214e64032
Merge pull request #11018 from delftswa2014/10958-pidfile
...
Moves pid file operations to /pkg/
2015-03-24 17:20:52 -07:00
Rick Wieman
772833274f
Moved pidfile from utils to pkg
...
Fixes #10958 by moving utils.daemon to pkg.pidfile.
Test cases were also added.
Updated the daemon to use the new pidfile.
Signed-off-by: Rick Wieman <git@rickw.nl>
2015-03-24 23:59:32 +01:00
Michael Crosby
246cab90f2
Mkdir for lxc root dir before setup of symlink
...
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-03-24 15:53:23 -07:00
Michael Crosby
f3fc857e01
Merge pull request #11716 from LK4D4/root_in_run
...
Use /var/run/docker as root for execdriver
2015-03-24 14:58:30 -07:00
Matthew Mayer
08d75bc450
Squashed commit of the following:
...
commit d379f7645026001ce57fd6421c819f6c7df77964
Author: Matthew Mayer <matthewkmayer@gmail.com>
Date: Mon Mar 23 22:13:06 2015 -0700
Removes unused imports.
Signed-off-by: Matthew Mayer <matthewkmayer@gmail.com>
commit 6e1f77c7f1566c8719087d88fbe06bade122691c
Author: Matthew Mayer <matthewkmayer@gmail.com>
Date: Mon Mar 23 20:41:16 2015 -0700
Removes bind dir creation in daemon start.
Signed-off-by: Matthew Mayer <matthewkmayer@gmail.com>
Signed-off-by: Matthew Mayer <matthewkmayer@gmail.com>
2015-03-24 14:56:45 -07:00
Anton Tiurin
fc325274e8
History.Swap Use parallel assignment to swap elements, as it's
...
a more idiomatic way for golang than using a temp variable.
Signed-off-by: Anton Tiurin <noxiouz@yandex.ru>
2015-03-25 00:13:13 +03:00
Vincent Batts
8fc9e40086
Merge pull request #11417 from rhatdan/btrfs
...
Btrfs has eliminated the BTRFS_BUILD_VERSION in latest version
2015-03-24 16:00:15 -04:00
Alexander Morozov
131b29f7bc
Merge pull request #10283 from rhatdan/dev
...
We want to allow the sharing of /dev from the host into the container.
2015-03-24 12:57:44 -07:00
Alexander Morozov
f7900cdd67
Merge pull request #11689 from calavera/ipallocator_refactor
...
Use a structure to keep the allocated ips pool.
2015-03-24 12:42:30 -07:00
Phil Estes
ce372cd664
Merge pull request #11709 from paulbellamy/11626-portallocator
...
Refactor global portallocator and portmapper state
2015-03-24 13:51:00 -05:00
David Calavera
7e95b13460
Use a structure to keep the allocated ips pool.
...
Fixes #11624 .
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-03-24 11:41:44 -07:00
Dan Walsh
25c4a92342
Merge branch 'master' of github.com:docker/docker into btrfs
...
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2015-03-24 14:14:54 -04:00
Alexander Morozov
1e788ec985
Use /var/run/docker as root for execdriver
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-03-24 10:47:30 -07:00
Antonio Murdaca
b80fae7356
Refactor pkg/common, Fixes #11599
...
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-24 18:19:59 +01:00
Paul Bellamy
87df5ab41b
Refactor global portallocator and portmapper state
...
Continuation of: #11660 , working on issue #11626 .
Wrapped portmapper global state into a struct. Now portallocator and
portmapper have no global state (except configuration, and a default
instance).
Unfortunately, removing the global default instances will break
```api/server/server.go:1539```, and ```daemon/daemon.go:832```, which
both call the global portallocator directly. Fixing that would be a much
bigger change, so for now, have postponed that.
Signed-off-by: Paul Bellamy <paul.a.bellamy@gmail.com>
2015-03-24 11:15:30 +00:00
Alena Prokharchyk
dabd8a02ae
Removed unused "mutex" field
...
fixes #11659
Signed-off-by: Alena Prokharchyk <alena@rancher.com>
2015-03-23 19:05:21 -07:00
Jessie Frazelle
d5eea4e8b0
Merge pull request #11636 from robertabbott/refactor_networkfs
...
Refactor pkg/networkfs
2015-03-23 16:58:29 -07:00
Anton Tiurin
f2c7b4d743
Syslog.Log - Remove redundant cast of msg.Line []byte to string as
...
it's a fmt.Sprintf responsibility.
Signed-off-by: Anton Tiurin <noxiouz@yandex.ru>
2015-03-24 01:35:54 +03:00
Jessie Frazelle
ccd4181d10
Merge pull request #11545 from cpuguy83/remove_allocator_warning
...
Don't warn when ip_local_port_range not found
2015-03-23 14:19:57 -07:00
Alexander Morozov
d852e5fde8
Merge pull request #11660 from paulbellamy/11626-portallocator
...
Refactoring portallocator away from a global var
2015-03-23 14:10:56 -07:00
Paul Bellamy
1257679876
Refactor global portallocator state into a global struct
...
Signed-off-by: Paul Bellamy <paul.a.bellamy@gmail.com>
2015-03-23 20:41:41 +00:00
Brian Goff
8e4d9f3cf9
Improve err message when parsing kernel port range
...
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-03-23 13:29:25 -07:00
Alexander Morozov
2717302cc6
Merge pull request #11654 from runcom/11650-syslog-close-redunant-nil-check
...
syslog Close() - Remove redunant nil check, s.writer cannot be nil
2015-03-23 12:32:26 -07:00
Antonio Murdaca
e600df2d97
Remove redunant nil check, s.writer cannot be nil
...
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-23 20:03:24 +01:00
Antonio Murdaca
8f025aae36
Refactor syslog Log else clause
...
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-23 20:01:01 +01:00
Alexander Morozov
65e21f5703
Merge pull request #11458 from ibuildthecloud/syslog
...
Add syslog logging driver
2015-03-23 11:34:33 -07:00
Jessie Frazelle
1fe55b2f8b
Merge pull request #10365 from cpuguy83/9981_fix_cannot_overwrite_nonbind_as_bind
...
Allow path from normal volume existing to overwrite in start Binds
2015-03-23 10:43:02 -07:00
bobby abbott
a91b2431a3
Refactor pkg/networkfs
...
Solves #11591
Signed-off-by: bobby abbott <ttobbaybbob@gmail.com>
2015-03-22 23:53:47 -07:00
sidharthamani
eaecd8b1b5
add syslog driver
...
Signed-off-by: wlan0 <sid@rancher.com>
2015-03-21 18:01:18 -07:00
Jessie Frazelle
b6e20a67f9
Merge pull request #11454 from hqhq/fix_memoryswap_warning
...
do not warning when we disable memoryswap
2015-03-21 15:23:25 -07:00
Michael Crosby
84d3ab30d4
Merge pull request #11492 from coolljt0725/fix_hostname_missing_in_container_netmode
...
Fix hostname missing when a container's net mode is contaienr mode
2015-03-20 16:49:37 -07:00
Dan Walsh
3c136333af
Btrfs has eliminated the BTRFS_BUILD_VERSION in latest version
...
They say we should only use the BTRFS_LIB_VERSION
They will no longer support this since it had to be managed manually
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2015-03-20 11:43:53 -04:00
Dan Walsh
fe9fe1473c
We want to allow the sharing of /dev from the host into the
...
container.
docker run -v /dev:/dev should stop mounting other default mounts in i
libcontainer otherwise directories and devices like /dev/ptx get mishandled.
We want to be able to run libvirtd for launching vms and it needs
access to the hosts /dev. This is a key componant of OpenStack.
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2015-03-20 08:56:21 -04:00
Jessie Frazelle
5a239c0022
Merge pull request #11507 from crosbymichael/container-state
...
Cleanup libcontainer container state
2015-03-19 16:02:24 -07:00
Michael Crosby
455a272aef
Merge pull request #11428 from vishh/parent-cgroup
...
Adding '--cgroup-parent' option.
2015-03-19 14:41:57 -07:00
Michael Crosby
2b12b099b8
Mount libcontainer state dir in tmpfs
...
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-03-19 14:27:17 -07:00
Michael Crosby
06c939e527
Ensure the container state is removed on daemon boot
...
This ensures that the libcontainer state is fully removed for a
container after it is terminated.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-03-19 14:21:19 -07:00
Mrunal Patel
60ef4ae6fc
Update libcontainer to 4a72e540feb67091156b907c4700e580a99f5a9d
...
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2015-03-19 14:42:23 -04:00
Alexander Morozov
d338c613bf
Merge pull request #11459 from simonswine/10001-ipv6-tests
...
[WiP] Adds testing for bridge's IPv6 support
2015-03-19 08:37:28 -07:00
Tibor Vass
fdf49d758f
Merge pull request #11274 from MabinGo/selinux_enable_verify
...
Add logs when Docker enabled selinux (closes #11197 )
2015-03-19 10:34:55 -04:00
Phil Estes
9d5eab1873
Merge pull request #11453 from duglin/HideDaemonDots
...
Hide dots on daemon startup when loglevel != info
2015-03-19 10:10:18 -04:00
Michal Fojtik
d62f25e422
Fix lxc-start in lxc>1.1.0 where containers start daemonized by default
...
Signed-off-by: Michal Fojtik <mfojtik@redhat.com>
2015-03-19 14:51:05 +01:00
Lei Jitang
74664dabff
Fix hostname missing when a container's net mode is contaienr mode
...
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-03-19 17:03:40 +08:00
Vishnu Kannan
0b1e2b5a55
Adding '--cgroup-parent' flag to docker run. This feature helps users implement more complex
...
resource isolation policies on top of what native docker provides.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2015-03-19 02:34:15 +00:00
Mabin
1bf529a456
Add logs when Docker enabled selinux
...
Signed-off-by: Mabin <bin.ma@huawei.com>
2015-03-19 09:46:53 +08:00
Jessie Frazelle
474f58e2e7
Merge pull request #11471 from LK4D4/wait_for_copier
...
Wait for copier finishing it's work before closing logger
2015-03-18 15:41:12 -07:00
Jessie Frazelle
e1a0bff6b8
Merge pull request #11474 from crosbymichael/null-masked-paths
...
Do not mask /proc/kcore in privileged
2015-03-18 14:43:13 -07:00
Michael Crosby
f4a458e67f
Do not mask /proc/kcore in privileged
...
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-03-18 14:17:21 -07:00
Alexander Morozov
b6a42673ab
Wait for copier finishing it's work before closing logger
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-03-18 13:48:01 -07:00
Alexander Morozov
bd8661e8fa
Protect jsonfilelog writes with mutex
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-03-18 13:00:53 -07:00
Christian Simon
4307ec283b
[WiP] Adds testing for bridge's IPv6 support
...
* fixes #10001
* test for global subnets <= 80
* test for global subnets > 80
* test link local allocations
* test duplicated addresses
* test regression from bug #11427
Signed-off-by: Christian Simon <simon@swine.de>
2015-03-18 08:51:14 +01:00
Alexander Morozov
cf071bb962
Merge pull request #11450 from crosbymichael/rlimitfix
...
Don't hardcode default rlimit
2015-03-17 20:27:05 -07:00
Qiang Huang
55cc166e53
do not warning when we disable memoryswap
...
$ docker run -ti --rm -m 300M --memory-swap=-1 ubuntu:14.04
WARNING: Your kernel does not support swap limit capabilities. Limitation discarded.
root@813aafc019d5:/#
When we disable memoryswap, it should not warning swap limit not support.
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-03-18 10:08:17 +08:00
Jessie Frazelle
a5269223a7
Merge pull request #11320 from estesp/fix-daemon-startup
...
Fix daemon shutdown on error after rework of daemon startup
2015-03-17 19:04:25 -07:00
Doug Davis
88dc6cc2df
Hide dots on daemon startup when loglevel != info
...
When the deamon starts up with log level set to INFO it will show something
like this:
```
INFO[0000] Loading containers: start.
................................................................
INFO[0000] Loading containers: done.
```
where the dots represent containers in the system.
When you run with log level set to "error" it will still show the dots
w/o the "Loading..." lines before and after which looks really odd.
This PR will fix it so that the dots are only shown IFF the "Loading..."
lines are also shown
Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-03-17 17:27:53 -07:00
Michael Crosby
f5a154f2d2
Don't hardcode default rlimit
...
The default for rlimit handling should be to inherit the rlimit of the
daemon unless explicitly set.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-03-17 16:04:15 -07:00
Phil Estes
459e58ffc9
Fix daemon shutdown on error after rework of daemon startup
...
Currently the daemon will not stop on error because the serve API job is
blocking the channel wait for daemon init. A better way is to run the
blocking serve API job as a goroutine and make sure that error
notification gets back to the main daemon thread (using the already
existing channel) so that clean shutdown can occur on error.
Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-03-17 14:15:00 -04:00
Vishnu Kannan
39d49ba7ba
Reduce logging level from error to warning if "/proc/sys/net/ipv4/ip_local_port_range" proc file in not accessible.
...
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2015-03-17 17:39:17 +00:00
Arnaud Porterie
1ff5a91007
Merge pull request #10568 from LK4D4/logging_drivers
...
Logging drivers
2015-03-17 09:45:58 -07:00
Arnaud Porterie
cb77ad4757
Merge pull request #11369 from coolljt0725/fix_link
...
Fix --link to a container which net mode is container
2015-03-17 08:36:33 -07:00
Alexander Morozov
8685af0b13
Merge pull request #11401 from Mashimiao/11385-fix-lxc-conf-error
...
fix not show error when using --lxc-conf without lxc driver
2015-03-17 08:35:18 -07:00
Lei Jitang
82e2e1a11a
Fix --link to a container which net mode is container mode
...
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-03-17 07:50:12 -07:00
Andy Goldstein
a2b0c9778f
Add ability to refer to image by name + digest
...
Add ability to refer to an image by repository name and digest using the
format repository@digest. Works for pull, push, run, build, and rmi.
Signed-off-by: Andy Goldstein <agoldste@redhat.com>
2015-03-17 10:10:42 +00:00
Arnaud Porterie
b6ac111abf
Merge pull request #9882 from ibuildthecloud/labels
...
Proposal: One Meta Data to Rule Them All => Labels
2015-03-16 20:20:05 -07:00
Ma Shimiao
703cab12e7
fix not show error when using --lxc-conf without lxc driver
...
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2015-03-17 08:50:17 +08:00
Jessie Frazelle
87a8658eb6
Merge pull request #11353 from mrunalp/override_default_mounts
...
Filter out default mounts that are being overriden by the user.
2015-03-16 16:40:32 -07:00
Jessie Frazelle
213be9ee27
Merge pull request #11427 from LK4D4/fix_alloc_ip6
...
Fix IPv6 autoallocation from mac with --ipv6-cidr
2015-03-16 16:38:46 -07:00
Michael Crosby
88f437d6c6
Merge pull request #11402 from miminar/err-cleanup
...
Error formatting cleanups
2015-03-16 16:13:16 -07:00
Mrunal Patel
7804cd36ee
Filter out default mounts that are override by user.
...
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2015-03-16 18:39:50 -04:00
Alexander Morozov
491f8ab144
Fix IPv6 autoallocation from mac with --ipv6-cidr
...
We used slice globalIPv6Network.IP itself, not its copy as expected.
Fixes #10774
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-03-16 15:36:50 -07:00
Michael Crosby
a2fcae41ef
Merge pull request #11343 from hqhq/hq_fix_panic_error
...
fix panic error when docker stats a stopped container
2015-03-16 15:16:03 -07:00
Phil Estes
1705ded1d2
Merge pull request #10792 from larsks/bug/10781
...
fix various problems with iptables.Exists
2015-03-16 17:39:36 -04:00
Michael Crosby
0c2eb5ebfb
Merge pull request #11295 from LK4D4/oom_after_dead
...
Check oom status after container stopped in lxc driver
2015-03-16 14:16:47 -07:00
Lars Kellogg-Stedman
3559b4177e
fix various problems with iptables.Exists
...
This modifies iptables.Exists so that it must be called with an explicit
table and chain. This allows us (a) to generate an appropriate command
line for "iptables -C", which was not previously possible, and (b) it
allows us to limit our strings.Contains() search to just the table and
chain in question, preventing erroneous matches against unrelated rules.
Resolves #10781
Signed-off-by: Lars Kellogg-Stedman <lars@redhat.com>
2015-03-16 17:14:45 -04:00
Alexander Morozov
6485d885a0
Merge pull request #11323 from delftswa2014/utils-daemon-windows
...
Make utils_daemon and volumes.go cross-platform compileable (Windows).
2015-03-16 12:14:30 -07:00
Qiang Huang
8dc5791f73
fix panic error when docker stats a stopped container
...
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-03-16 19:55:34 +08:00
Michal Minar
210ab030bc
Format error by value
...
- Use `%v` verb to format errors.
- Give `param` constant in portallocator some better name.
Signed-off-by: Michal Minar <miminar@redhat.com>
2015-03-16 12:05:53 +01:00
Rik Nijessen
1ec2eac50d
Make utils_daemon and volumes cross-platform compileable.
...
Signed-off-by: Rik Nijessen <riknijessen@gmail.com>
2015-03-16 11:46:07 +01:00
Arnaud Porterie
82f390e139
Merge pull request #11076 from hqhq/hq_use_warning_in_sysinfo
...
use type WARN for warning
2015-03-15 21:13:23 -07:00
Arnaud Porterie
bc7d1d6ef3
Merge pull request #10298 from hqhq/hq_move_resource_to_hostconfig
...
move resource options from Config to hostConfig
2015-03-15 17:30:46 -07:00
Alexander Morozov
02c1dd899a
Merge pull request #10238 from miminar/ephemeral-port-range-allocation
...
Use system's ephemeral port range for port allocation
2015-03-13 15:18:05 -07:00
Alexander Morozov
bdf3a0295d
Fail docker logs on all logging drivers apart from 'json-file'
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-03-13 15:02:09 -07:00
Alexander Morozov
47a6afb93f
Default 'json-file' logging driver and none logging driver
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-03-13 12:13:21 -07:00
Alexander Morozov
14887e2e1f
Interface Logger for logging drivers
...
Also there is aux datastructure Copier which can copy lines from streams
to Loggers
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-03-13 11:46:59 -07:00
Darren Shepherd
abb5e9a077
Set labels on container create
...
Signed-off-by: Darren Shepherd <darren@rancher.com>
2015-03-13 10:02:04 -07:00
Michal Minar
40d5406371
Pass buffered file reader to Fscanf instead of string reader
...
Unless `file` is wrapped with buffered reader, `fmt.Fscanf` will read
just one byte and terminate with `EOF`.
Signed-off-by: Michal Minar <miminar@redhat.com>
2015-03-13 09:40:53 +01:00
Phil Estes
88c706e442
Merge pull request #11349 from cpuguy83/11132_better_error_message_on_graph_init
...
Make errors from graphdriver friendlier
2015-03-12 23:26:35 -04:00
Yuan Sun
906974b185
correct some daemon spelling mistakes
...
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
2015-03-13 05:14:56 -04:00
Brian Goff
c0f7819905
Make errors from graphdriver init friendlier
...
In several cases graphdriver were just returning the low-level syscall
error and that was making it all the way up to the daemon logs and in
many cases was difficult to tell it was even coming from the graphdriver
at all.
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-03-12 08:13:00 -07:00
Jessie Frazelle
c6321931d2
Merge pull request #11326 from cpuguy83/11315_rename_w_daemon_restart
...
Persist container to disk after rename
2015-03-11 13:44:13 -07:00
Brian Goff
c5c72cf151
Persist container to disk after rename
...
Fixes #11315
After rename occured the graphdb was updated but the container struct
was never commited back to disk, so on daemon restart it loads the old
name again.
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-03-11 12:39:31 -07:00
moxiegirl
d010bf0d99
Merge pull request #11291 from ahmetalpbalkan/info/system-date
...
Add system time to /info
2015-03-11 09:43:43 -07:00
Deng Guangxing
ce1a0b612d
Fix minor typo
...
Signed-off-by: Deng Guangxing <dengguangxing@huawei.com>
2015-03-11 11:13:39 +08:00
Qiang Huang
837eec064d
move resources from Config to HostConfig
...
Cgroup resources are host dependent, they should be in hostConfig.
For backward compatibility, we just copy it to hostConfig, and leave it in
Config for now, so there is no regressions, but the right way to use this
throught json is to put it in HostConfig, like:
{
"Hostname": "",
...
"HostConfig": {
"CpuShares": 512,
"Memory": 314572800,
...
}
}
As we will add CpusetMems, CpusetCpus is definitely a better name, but some
users are already using Cpuset in their http APIs, we also make it compatible.
The main idea is keep using Cpuset in Config Struct, and make it has the same
value as CpusetCpus, but not always, some scenarios:
- Users use --cpuset in docker command, it can setup cpuset.cpus and can
get Cpuset field from docker inspect or other http API which will get
config info.
- Users use --cpuset-cpus in docker command, ditto.
- Users use Cpuset field in their http APIs, ditto.
- Users use CpusetCpus field in their http APIs, they won't get Cpuset field
in Config info, because by then, they should already know what happens
to Cpuset.
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-03-11 09:31:18 +08:00
Qiang Huang
bffe04b582
fix warning messages
...
Use log.Warnf instead of log.Infof, and remove redundant `WARNING` prefix.
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-03-11 08:47:45 +08:00
Ahmet Alp Balkan
2977fd2b7a
Add system time to /info
...
This change adds daemon's system time as RFC3339Nano to the `/info` endpoint
and shows in a more readable format (UnixDate) in `docker -D info` output.
I will be using this to fix the clock skew between the remote test host and
the CI machines running `docker events`-related tests as they're using `--since`
and `--until` and the timestamps are not matching when daemon is not on the
same machine.
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-03-10 15:29:05 -07:00
Alexander Morozov
d59212e605
Check oom status after container stopped in lxc driver
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-03-10 13:45:13 -07:00
Jessie Frazelle
e4b753c1de
Merge pull request #11211 from cpuguy83/ensure_engine_shutdown
...
Ensure clean engine shutdown on startup errors
2015-03-10 12:13:35 -07:00
Alexander Morozov
821ec8334f
Setup user groups in lxc driver
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-03-10 09:43:11 -07:00
Alexander Morozov
c8c11bfc36
Use CgroupString instead of missing GetCgroupAllowString in lxc_template
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-03-10 08:50:03 -07:00
Jessie Frazelle
2fb89b2e2c
Merge pull request #11208 from LK4D4/new_libcontainer_api
...
New libcontainer api
2015-03-10 07:50:19 -07:00
Michal Minar
0dcc970432
Restructured port range loader
...
And renamed `GetPortRange` to `PortRange`.
Signed-off-by: Michal Minar <miminar@redhat.com>
2015-03-10 10:02:43 +01:00
Michal Minar
fcf8e85a35
Use default port range in unit tests
...
Signed-off-by: Michal Minar <miminar@redhat.com>
2015-03-09 16:58:14 +01:00
Brian Goff
0e3f2f2ac0
Ensure clean engine shutdown on startup errors
...
Previously on error either from the daemon or from the api it is just
exiting with exit status 1 but not performing a shutdown.
This can produce insconsistent state depending on where the error came
from.
This makes sure that before we exit on error that the engine gets fully
shutdown.
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-03-09 08:40:38 -04:00
Michal Minar
0eb3544c43
Use system's ephemeral port range for port allocation
...
Read `/proc/sys/net/ipv4/ip_local_port_range` kernel parameter to obtain
ephemeral port range that now sets the boundaries of port allocator
which finds free host ports for those exported by containers.
Signed-off-by: Michal Minar <miminar@redhat.com>
2015-03-09 09:13:20 +01:00
Arnaud Porterie
89bdaa35e0
Remove subdirectories MAINTAINERS files
...
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-03-06 18:21:51 -08:00
Alexander Morozov
68ba5f0b69
Execdriver implementation on new libcontainer API
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-03-06 14:46:58 -08:00
Zhang Wentao
06a40f0f28
docker info display http/https_proxy setting
...
Signed-off-by: Zhang Wentao <zhangwentao234@huawei.com>
2015-03-06 09:02:21 +08:00
Michael Crosby
92e632c84e
Merge pull request #11064 from delftswa2014/10970-treesize
...
Move directory size calculation to pkg/ (fixes #10970 )
2015-03-05 13:06:02 -08:00