Commit Graph

2404 Commits

Author SHA1 Message Date
Jess Frazelle 562a1263f2 Merge pull request #17665 from LK4D4/setupwd_refactor
Reorder code slightly in setupWorkingDirectory
2015-11-03 15:56:10 -08:00
Jess Frazelle e704182c9c Merge pull request #17614 from LK4D4/fix_golint
Update linting tools to latest versions
2015-11-03 15:32:12 -08:00
Alexander Morozov bb66c16871 Reorder code slightly in setupWorkingDirectory
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-11-03 14:33:31 -08:00
Brian Goff c30b9e590c Merge pull request #17606 from mountkin/increase-max-retries
increase the maxJSONDecodeRetry in json log reader
2015-11-03 13:45:45 -05:00
Michael Crosby aff8bd178c Merge pull request #17638 from calavera/move_net_stats_collector
Make the stats collector to collect network stats.
2015-11-03 10:31:40 -08:00
David Calavera 8d5695470a Merge pull request #17629 from tonistiigi/kill-autorestart-fix
Fix race causing autorestart turning off on restart
2015-11-03 08:24:11 -08:00
Tonis Tiigi b8aaa4b07c Fix race causing autorestart turning off on restart
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-11-02 18:37:55 -08:00
David Calavera 453473d6a9 Make the stats collector to collect network stats.
Currently, we get the network stats each time per subscriber, causing a
high load of cpu when there are several subscribers per container.

This change makes the daemon to collect once and publish N times, where N is the
number of subscribers per container.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-11-02 21:06:44 -05:00
David Calavera 79d47c5b96 Merge pull request #17628 from LK4D4/umount_log_err
Log error from unmountVolumes on cleanup
2015-11-02 15:38:32 -08:00
Alexander Morozov 944ea3134d Merge pull request #17554 from calavera/warm_ipc_unmounts
Turn IPC unmount errors into warnings.
2015-11-02 14:25:39 -08:00
Alexander Morozov a20fea1823 Log error from unmountVolumes on cleanup
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-11-02 14:11:42 -08:00
David Calavera beeec6d103 Merge pull request #17558 from aboch/nw
Fix bug in initializeNetwork()
2015-11-02 12:15:41 -08:00
Alessandro Boch 45e71a7984 Fix bug in initializeNetwork()
- On `docker run --net <network id> ...`
  the bug would cause the container to attempt
  to connect to the network two times
- Also made sure endpoint creation rollback will
  be executed on failures in `func (container *Container) connectToNetwork()`

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-11-02 11:20:15 -08:00
Jana Radhakrishnan 10e1b9f02e Vendoring libnetwork
Vendoring libnetwork @ 05a5a1510f85977f374a9b9804a116391bab5089

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-11-02 08:33:52 -08:00
Alexander Morozov 7aa28b6bdd Fix go vet warnings
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-11-02 08:28:34 -08:00
Alexander Morozov b087846c0e Fix error formatting
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-11-02 06:51:48 -08:00
Shijiang Wei a82f9ac819 increase the maxJSONDecodeRetry in json log reader
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
2015-11-02 17:51:22 +08:00
Alexander Morozov 4468e1e74e Merge pull request #17567 from Microsoft/10662-lxcunittest
Windows: Fix go test in execdriver\lxc
2015-10-31 09:40:19 -07:00
Alexander Morozov 8d584da96e Merge pull request #17568 from Microsoft/10662-journald
Windows: Fix journald compile error
2015-10-31 09:35:39 -07:00
John Howard 5452954d89 Windows: Fix journald compile error
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-10-31 08:31:25 -07:00
John Howard 30ab497e17 Windows: Fix go test in execdriver\lxc
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-10-31 08:25:36 -07:00
Arnaud Porterie 5719d01066 Merge pull request #16579 from coolljt0725/fix_attach_paused_container
Add show error when attach to a paused container
2015-10-31 07:43:22 -07:00
Alexander Morozov ed6e3cf704 Merge pull request #17537 from mountkin/fix-logger-race
fix a race in json logger reader
2015-10-30 23:00:17 -07:00
Brian Goff f87082f08e Merge pull request #17545 from LK4D4/writehs_encode
Use json.Encoder for container.writeHostConfig
2015-10-30 21:11:15 -04:00
David Calavera 2e466bafda Merge pull request #17548 from mavenugo/ugr
Vendoring libnetwork to fix #17526 & #17527
2015-10-30 17:13:40 -07:00
David Calavera 6d8aff07ac Merge pull request #17547 from LK4D4/unn_stat
Remove unnecessary Stat check from readHostConfig
2015-10-30 16:56:11 -07:00
David Calavera 9bf20c6847 Merge pull request #17549 from donhcd/fixPre122Stats
fix pre-1.21 docker stats
2015-10-30 16:45:41 -07:00
Madhu Venugopal 401632c756 fixing ungraceful daemon restart case where nw connect is not persisted
For graceful restart case it was done when the container was brought
down. But for ungraceful cases, the persistence is missing for nw
connect

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-30 16:24:02 -07:00
David Calavera a54d5932e3 Turn IPC unmount errors into warnings.
And do not try to unmount empty paths.

Because nobody should be woken up in the middle of the night for them.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-10-30 19:13:52 -04:00
Alexandre Beslic 33f5429786 Merge pull request #17538 from calavera/deprecated_bridge_interface
Fix network inspect for default networks.
2015-10-30 16:03:51 -07:00
Donald Huang d2c04f844b fix pre-1.22 docker stats
This fixes a bug introduced in #15786:

* if a pre-v1.20 client requested docker stats, the daemon
would return both an API-compatible JSON blob *and* an API-incompatible JSON
blob: see https://gist.github.com/donhcd/338a5b3681cd6a071629

Signed-off-by: Donald Huang <don.hcd@gmail.com>
2015-10-30 22:28:03 +00:00
David Calavera 0c991f3d68 Merge pull request #16779 from Microsoft/10662-execdrivercommand
Windows: Refactor execdriver.Command
2015-10-30 14:59:59 -07:00
Alexander Morozov 36a69bbc60 Remove unnecessary Stat check from readHostConfig
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-10-30 14:54:09 -07:00
Alexander Morozov cf1a6c08fa Use json.Encoder for container.writeHostConfig
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-10-30 14:45:35 -07:00
Alexander Morozov 23a0fe9627 Merge pull request #17539 from cpuguy83/cleaner_ipc_unmount_handling
Force IPC mount to unmount on daemon shutdown/init
2015-10-30 14:40:42 -07:00
David Calavera 85d7bbf7aa Merge pull request #17528 from LK4D4/todisk_encode
Use json.Encoder for container.toDisk
2015-10-30 14:36:42 -07:00
Tibor Vass 74362e8392 Merge pull request #17531 from crosbymichael/no-set-reservation
Don't set mem soft limit if not specifiecd
2015-10-30 17:01:36 -04:00
David Calavera f301c5765a Fix network inspect for default networks.
- Keep old fields in NetworkSetting to respect the deprecation policy.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-10-30 16:55:21 -04:00
John Howard 9d14866d71 Windows: Refactor execdriver.Command
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-10-30 13:53:00 -07:00
Alessandro Boch d795bc7d53 Modify IPAMConfig structure json tags
- So that it complies with docker convention for inspect

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-10-30 12:57:49 -07:00
Brian Goff 78bd17e805 Force IPC mount to unmount on daemon shutdown/init
Instead of using `MNT_DETACH` to unmount the container's mqueue/shm
mounts, force it... but only on daemon init and shutdown.

This makes sure that these IPC mounts are cleaned up even when the
daemon is killed.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-10-30 15:41:48 -04:00
Shijiang Wei e41eae8b42 fix a race in json logger reader
The json decoder starts to decode immediately an inotify event is
received.
But at the time the inotify event is trigged, the json log
entry might haven't been fully written to the disk.
In this case the decoder will return an "io.UnexpectedEOF" error, but
there is still data remaining in the decoder's buffer. And the data
should be passed to the decoder when the next inotify event is
triggered.

Signed-off-by: Shijiang Wei <mountkin@gmail.com>
2015-10-31 02:28:23 +08:00
Jess Frazelle 0aa3bff482 Merge pull request #17530 from Microsoft/jjh/windowsmasterbuild
Build broken on master (awslogs)
2015-10-30 10:39:48 -07:00
Brian Goff 17a8fbeaeb Merge pull request #17514 from mavenugo/ugr
Fixing a case of dangling endpoint during ungraceful daemon restart
2015-10-30 13:38:27 -04:00
Michael Crosby ecb87ed0a5 Don't set mem soft limit if not specifiecd
You cannot do this for individual cgroups for all the containers.  Only
set the reservation if the user requested it.  The error you will
receive is an EINTVAL when you try to set a large limit like we were in
the memory limit.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-10-30 10:34:01 -07:00
John Howard 2716e3964d Windows build broken on master (awslogs)
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-10-30 10:02:32 -07:00
Tibor Vass c545dce004 Merge pull request #16640 from samuelkarp/awslogs-logging-driver
[awslogs] Auto-detect region and set user-agent
2015-10-30 12:38:40 -04:00
Michael Crosby aadae4b503 Merge pull request #16412 from Microsoft/10662-hyper-v-containers
Windows [TP4]: Adds support for Hyper-V Containers
2015-10-30 09:34:16 -07:00
Alexander Morozov cf02b369e0 Use json.Encoder for container.toDisk
* for simmetry with fromDisk
* it might be slightly better for GC because of internal sync.Pool

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-10-30 09:29:53 -07:00
Antonio Murdaca e990eca1e5 Merge pull request #17510 from LK4D4/refactor_shutdown
Refactor Shutdown a little to reduce indentation
2015-10-30 12:24:03 +01:00