Vincent Batts
86d66d6273
Merge pull request #12033 from rhvgoyal/devmapper-cleanup
...
Devmapper Graph Driver Misc cleanup
2015-04-07 15:49:32 -04:00
Ahmet Alp Balkan
6e44246fed
Swap width/height in GetWinsize and monitorTtySize
...
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-04-06 14:31:42 -07:00
Brendan Dixon
1a36a113d4
Windows console fixes
...
Corrected integer size passed to Windows
Corrected DisableEcho / SetRawTerminal to not modify state
Cleaned up and made routines more idiomatic
Corrected raw mode state bits
Removed duplicate IsTerminal
Corrected off-by-one error
Minor idiomatic change
Signed-off-by: Brendan Dixon <brendand@microsoft.com>
2015-04-03 15:02:52 -07:00
Jessie Frazelle
9cdad8a26b
Merge pull request #11886 from jamiehannaford/pkg-mnt-docs
...
Document exported functions and consts in pkg/mount
2015-04-03 21:28:11 +00:00
Antonio Murdaca
01724c1cf1
Refactor ultis/utils_daemon, fixes #11908
...
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-03 20:20:04 +02:00
Jamie Hannaford
9a98556c2b
Add documentation for exported functions and types
...
Signed-off-by: Jamie Hannaford <jamie.hannaford@rackspace.com>
2015-04-03 11:33:34 +02:00
Joey Gibson
a9443de7c5
Fix vet warnings in pkg/requestdecorator/requestdecorator_test.go #12041
...
Signed-off-by: Joey Gibson <joey@joeygibson.com>
2015-04-03 00:18:21 -04:00
Vivek Goyal
665656afbb
devmapper: Use a pointer as argument to deferred function UdevWait()
...
UdevWait() is deferred and takes uint cookie as an argument. As arguments
to deferred functions are calculated at the time of call, it is possible
that any update to cookie later by libdm are not taken into account when
UdevWait() is called. Hence use a pointer to uint as argument to UdevWait()
function.
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2015-04-02 16:47:14 -04:00
Vivek Goyal
cb7c893275
devicemapper: Remove debug messages from RemoveDevice()
...
devmapper graph driver retries device removal 1000 times in case of failure
and if this fills up console with 1000 messages (when daemon is running in
debug mode). So remove these debug messages.
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2015-04-02 16:47:14 -04:00
Peter Esbensen
6896016b7c
Fixes #11721 removed GenerateRandomString
...
Signed-off-by: Peter Esbensen <pkesbensen@gmail.com>
gofmt
Signed-off-by: Peter Esbensen <pkesbensen@gmail.com>
2015-04-02 08:07:52 -07:00
Peter Esbensen
11287f7714
Added unit tests for stringutils GenerateRandomAlphaOnlyString and GenerateRandomAsciiString
...
Signed-off-by: Peter Esbensen <pkesbensen@gmail.com>
2015-04-02 07:12:47 -07:00
Vincent Batts
88b8fc10e3
Merge pull request #11099 from iavael/bugfix/tar-symlinks
...
Fixed handling hardlinks to symlinks in tar stream
2015-04-01 18:34:00 -04:00
unclejack
153f98bad5
pkg/broadcastwriter: reset after 4 KB w/o stream
...
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2015-04-01 01:26:19 +03:00
Alexander Morozov
d15d1674c3
Skip heavy operations if there is no jsonlog writers
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-04-01 01:02:18 +03:00
unclejack
5550a46946
pkg/broadcastwriter: use []byte to lower alloc
...
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2015-04-01 01:02:18 +03:00
unclejack
b535ed3595
pkg/jsonlog: add JSONLogBytes for low allocations
...
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2015-04-01 01:02:18 +03:00
unclejack
f26f405b00
pkg/broadcastwriter: add test w/ "" stream only
...
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2015-04-01 01:02:18 +03:00
Michael Crosby
7dd79dcc7b
Merge pull request #11952 from ankushagarwal/#11581
...
Add some documentation to pkg/system
2015-03-31 14:58:32 -07:00
Derek McGowan
aa3083f577
Fix progress reader output on close
...
Currently the progress reader won't close properly by not setting the close size.
fixes #11849
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-03-31 13:17:25 -07:00
Ankush Agarwal
e94a48ffc8
Add some documentation to pkg/system
...
Partially addresses #11581
Signed-off-by: Ankush Agarwal <ankushagarwal11@gmail.com>
2015-03-31 12:00:33 -07:00
Jessica Frazelle
4a2ef6c805
fix basicAuth function not in go1.3.3
...
Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <jess@docker.com> (github: jfrazelle)
Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <princess@docker.com> (github: jfrazelle)
2015-03-30 15:28:34 -07:00
Michael Crosby
00a15227f8
Merge pull request #11893 from runcom/11892-refactor-utils-flags
...
Refactor utils/flags.go
2015-03-30 13:35:40 -07:00
Michael Crosby
70a479dda5
Merge pull request #11900 from runcom/11899-refactor-utils-http
...
Refactor utils/http.go
2015-03-30 13:11:45 -07:00
Antonio Murdaca
0995ab5946
Refactor utils/http.go, fixes #11899
...
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-30 17:59:57 +02:00
unclejack
db877d8a42
pkg/broadcastwriter: avoid alloc w/ WriteString
...
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2015-03-29 15:20:53 +03:00
Antonio Murdaca
5670c6c695
Refactor utils/flags.go, fixes #11892
...
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-29 03:22:46 +02:00
Michael Crosby
7cc73607a2
Merge pull request #11853 from EricR/doc-PkgSysInfo
...
Add some basic doc for SysInfo
2015-03-27 14:52:20 -07:00
Michael Crosby
cc609c7556
Merge pull request #11871 from NinjaTrappeur/dry-run-test
...
Fix vet warning in devicemapper.
2015-03-27 14:48:55 -07:00
Félix Baylac-Jacqué
6b764bba8a
Fix vet warning in devicemapper.
...
Issue #11828
Signed-off-by: Félix Baylac-Jacqué <baylac.felix@gmail.com>
2015-03-27 20:16:25 +01:00
Eric Rafaloff
3716df57c0
Update inline doc for New
...
Signed-off-by: Eric Rafaloff <erafaloff@gmail.com>
2015-03-27 13:55:22 -04: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
Eric Rafaloff
6abe160eae
Add missing . in comment
...
Signed-off-by: Eric Rafaloff <erafaloff@gmail.com>
2015-03-26 23:22:05 -04:00
Eric Rafaloff
01bbc3fbb9
Add some basic doc for SysInfo
...
Signed-off-by: Eric Rafaloff <erafaloff@gmail.com>
2015-03-26 23:05:07 -04:00
Brian Goff
756b8f2fde
Merge pull request #11841 from runcom/11762-replace-aliased-logrus-imports
...
Replace aliased imports of logrus
2015-03-26 16:49:01 -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
Ahmet Alp Balkan
0532dcf3dc
term/winconsole: Identify tty correctly, fix resize problem
...
This change fixes a bug where stdout/stderr handles are not identified
correctly.
Previously we used to set the window size to fixed size to fit the default
tty size on the host (80x24). Now the attach/exec commands can correctly
get the terminal size from windows.
We still do not `monitorTtySize()` correctly on windows and update the tty
size on the host-side, in order to fix that we'll provide a
platform-specific `monitorTtySize` implementation in the future.
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-03-26 15:11:28 -07: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
Alexander Morozov
6a43d71014
Merge pull request #11734 from yestin/11601-test-chrootarchive
...
Add more tests for pkg/chrootarchive
2015-03-26 11:03:58 -07:00
Michael Crosby
ec8f61044a
Merge pull request #11811 from VladimirAus/11585-3
...
#11585 : README for pkg/signal.
2015-03-26 10:44:09 -07: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
VladimirAus
9b876b9c03
#11585 : README for pkg/signal. Signed-off-by: Vladimir Roudakov <v_roudakov@yahoo.com>
...
Signed-off-by: VladimirAus <v_roudakov@yahoo.com>
2015-03-26 21:18:27 +10:00
Anes Hasicic
b38e11b3c4
Removed redundant err == nil check
...
Signed-off-by: Anes Hasicic <anes.hasicic@gmail.com>
2015-03-26 11:36:13 +01:00
Alexander Morozov
bc0f1e0e09
Merge pull request #11794 from moo-mou/11790-pkgulimit
...
Fixes pointer error
2015-03-25 21:30:37 -07:00
paul
273fdd97ed
Fixes pointer error
...
Signed-off-by: Paul Mou <ppymou@gmail.com>
2015-03-25 20:45:17 -07:00
bobby abbott
0cd6c05d81
Fixes hacks from progressreader refactor
...
related to #10959
Signed-off-by: bobby abbott <ttobbaybbob@gmail.com>
2015-03-25 18:21:02 -07:00
Jessie Frazelle
667452ec63
Merge pull request #11779 from blatyo/add_ulimit_test
...
Add test for successful Ulimit Parse.
2015-03-25 17:34:58 -07:00
Allen Madsen
a97ca674f0
Add test for successful Ulimit Parse.
...
Signed-off-by: Allen Madsen <blatyo@gmail.com>
2015-03-25 20:03:26 -04:00
Allen Madsen
cb168e5622
Fix (*Ulimit).String() function. Closes #11769 .
...
Signed-off-by: Allen Madsen <blatyo@gmail.com>
2015-03-25 19:39:05 -04:00
Anes Hasicic
1b6065de8f
Removed redundant elses
...
Signed-off-by: Anes Hasicic <anes.hasicic@gmail.com>
2015-03-25 23:34:00 +01:00
Simon Eskildsen
67bd859481
listenbuffer: add docs
...
Signed-off-by: Simon Eskildsen <sirup@sirupsen.com>
2015-03-25 03:11:34 +00:00
Simon Eskildsen
b6b8032a17
listenbuffer: add test
...
Signed-off-by: Simon Eskildsen <sirup@sirupsen.com>
2015-03-25 03:11:33 +00:00
Yestin Sun
a08048d5c8
Add more tests for pkg/chrootarchive
...
Fixes issue #11601
Change-Id: Ifc1dbcc59cc4dc581ed43fc8fbe43fbaec4ccad0
Signed-off-by: Yestin Sun <sunyi0804@gmail.com>
2015-03-24 18:23:28 -07: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
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
Alexander Morozov
439e0ab23f
Merge pull request #11712 from 4gh/test_httputils
...
add tests for pkg/httputils
2015-03-24 13:56:31 -07:00
Tibor Vass
28b96cc613
Merge pull request #11663 from arthurbarr/master
...
Fix #11589 by adding README and comments to exported functions
2015-03-24 14:45:05 -06:00
Arthur Barr
557cca536f
Fix #11589 by adding README and comments to exported functions
...
Signed-off-by: Arthur Barr <arthur.barr@uk.ibm.com>
2015-03-24 17:30:19 +00: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
Frank Herrmann
2770a88413
add tests for pkg/httputils
...
closes #11597
Signed-off-by: Frank Herrmann <fgh@4gh.tv>
2015-03-24 16:27:09 +00:00
Hu Keping
96d8c3584c
Fix minor typo
...
Fix minor typo and make the comments of version-comparison functions
uniform.
Signed-off-by: Hu Keping <hukeping@huawei.com>
2015-03-25 00:46:22 +08:00
Michael Crosby
f586145cf1
Merge pull request #11634 from robertabbott/testutils_refactor
...
Refactors pkg/testutils
2015-03-23 17:30:51 -07:00
Jessie Frazelle
d5eea4e8b0
Merge pull request #11636 from robertabbott/refactor_networkfs
...
Refactor pkg/networkfs
2015-03-23 16:58:29 -07:00
Jessie Frazelle
9d00d8137f
Merge pull request #11422 from vbatts/vbatts-overlay_dir_mtime_changes
...
pkg/archive: ignore mtime changes on directories
2015-03-23 15:24:05 -07:00
Ahmet Alp Balkan
b38ff8c83d
Disable ANSI emulation in certain windows shells
...
This disables recently added ANSI emulation feature in certain Windows
shells (like ConEmu) where ANSI output is emulated by default with builtin
functionality in the shell.
MSYS (mingw) runs in cmd.exe window and it doesn't support emulation.
Cygwin doesn't even pass terminal handles to docker.exe as far as I can
tell, stdin/stdout/stderr handles are behaving like non-TTY. Therefore not
even including that in the check.
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-03-23 18:38:43 +00:00
Jessie Frazelle
c4603de56a
Merge pull request #10347 from unclejack/bufreader_reset
...
reset bufReader to avoid extreme growth of buffers
2015-03-23 10:07:43 -07:00
Jessie Frazelle
56acb1aac8
Merge pull request #11395 from mitchcapper/master
...
Change windows default permissions to 755 not 711, read access for all p...
2015-03-23 09:59:40 -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
bobby abbott
5de1e7bc3a
Refactors pkg/testutils
...
Solves #11579 .
Signed-off-by: bobby abbott <ttobbaybbob@gmail.com>
2015-03-22 22:31:46 -07:00
Arnaud Porterie
e09ead98ef
Merge pull request #11566 from tiborvass/carry-10864
...
Carry 10864: ANSI terminal emulation for windows
2015-03-22 18:21:32 -07:00
Tibor Vass
01a43174da
winconsole: cleanup
...
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-03-22 15:47:54 -04:00
Mitch Capper
b7dc9040f0
Change windows default permissions to 755 not 711, read access for all poses little security risk and prevents breaking existing Dockerfiles
...
Signed-off-by: Mitch Capper <mitch.capper@gmail.com>
2015-03-20 21:54:33 -07:00
Sachin Joshi
816d602059
Reduce memory allocation and remove channels
...
Signed-off-by: Sachin Joshi <sachin_jayant_joshi@hotmail.com>
2015-03-19 18:07:56 -07:00
Sachin Joshi
cb7a65c55e
Fix panic with vi in busybox
...
Following bugs are fixed:
1.Handle out of bound cursor movements: vi in busybox sets cursor
to (999,999) expecting it to be set to right, bottom correctly.
2.Correctly determine redirected non-terminal file.
Signed-off-by: Sachin Joshi <sachin_jayant_joshi@hotmail.com>
2015-03-18 13:10:57 -07:00
unclejack
e5ea2b2357
pkg/ioutils: avoid huge Buffer growth in bufreader
...
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2015-03-18 19:51:55 +02:00
unclejack
028f7987fe
pkg/ioutils: add tests for BufReader
...
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2015-03-18 19:32:46 +02:00
Vincent Batts
2ce37f6616
pkg/archive: ignore mtime changes on directories
...
on overlay fs, the mtime of directories changes in a container where new
files are added in an upper layer (e.g. '/etc'). This flags the
directory as a change where there was none.
Closes #9874
Signed-off-by: Vincent Batts <vbatts@redhat.com>
2015-03-17 10:53:34 -04: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
Jessie Frazelle
f41ba82eb9
Merge pull request #11420 from estesp/reexec-path-fix
...
Fix relative path execution of docker daemon in reexec.Self()
2015-03-16 14:57:25 -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
Sachin Joshi
45262c4cb0
Use syscall consts, check for errors,
...
Also rename func for non-windows specific names.
Signed-off-by: Sachin Joshi <sachin_jayant_joshi@hotmail.com>
2015-03-16 14:04:56 -07:00
Sachin Joshi
898d2763c5
Move windows console specific implementation in sub package
...
Signed-off-by: Sachin Joshi <sachin_jayant_joshi@hotmail.com>
2015-03-16 14:04:53 -07:00
Sachin Joshi
d8c3090dd9
ANSI terminal emulation for windows
...
It is implemented by intercepting and interpreting the output
escape sequence by calling win32 console apis.
In addition the input from win32 console is translated to linux keycodes
Signed-off-by: Sachin Joshi <sachin_jayant_joshi@hotmail.com>
2015-03-16 14:04:49 -07:00
Phil Estes
334aea3441
Fix relative path execution of docker daemon in reexec.Self()
...
After the new libcontainer API, the reexec.Self() output of the daemon
binary is used as the libcontainer factory InitPath. If it is relative,
it can't be found at container start time. This patch solves the
problem by making sure that we return a rooted/absolute path if a
relative path is used.
Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-03-16 16:52:00 -04:00
Alexander Morozov
8ae20d8eba
Merge pull request #10977 from robertabbott/10959-progressreader
...
Moves progressreader from utils to its own package
2015-03-16 12:45:33 -07: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
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
Darren Shepherd
abb5e9a077
Set labels on container create
...
Signed-off-by: Darren Shepherd <darren@rancher.com>
2015-03-13 10:02:04 -07:00
Rick Wieman
46d4f12fbf
Makes directory pkg compilable on Windows.
...
Also makes the test cases platform independent.
Signed-off-by: Rick Wieman <git@rickw.nl>
2015-03-12 15:54:22 +01:00
Ahmet Alp Balkan
802c905000
Make use of %USERPROFILE% in cli help message
...
An earlier commit was causing docker windows CLI build to not to pick up
the shorthand form for home directory (`%USERPROFILE%`) shown in when
`docker --help` is executed.
Fixing that bug and making the if statement concise and clear.
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-03-11 02:14:49 -07:00
bobby abbott
12b278d354
Remove import to utils in progressreader
...
Added method in StreamFormatter to handle calls
from progressreader. Solves #10959
Signed-off-by: bobby abbott <ttobbaybbob@gmail.com>
2015-03-11 00:50:27 -07: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
Jessie Frazelle
8be1671f45
Merge pull request #11288 from estesp/warn-on-localhost-dns
...
Add warning for --dns flag set to localhost addresses.
2015-03-10 12:03:46 -07:00
Phil Estes
afa92a9af0
Add warning for --dns flag set to localhost addresses.
...
We should warn users who use the `--dns` command line option to point
DNS to a localhost address, either IPv4 or IPv6. Unless they have
specifically set up the container as a DNS server or are using
--net=host (which is why this should be allowed, but warned on because
those are pretty unique cases) a localhost address as a resolver will
not reach what they might expect (e.g. expecting it will hit localhost
on the Docker daemon/host).
Added a test for the message, and fixed up tests to separate stdout and
stderr that were using `--dns=127.0.0.1` to test the options.
Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-03-10 14:43:17 -04:00
Dan Walsh
42aec0c771
If $HOME is not set, return homedir from /etc/passwd
...
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2015-03-10 10:00:22 -04: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
Tibor Vass
a6ddb8de42
Merge pull request #11148 from ahmetalpbalkan/win-cli/chmod-x-fix
...
pkg/archive: adjust chmod bits on windows
2015-03-06 12:28:58 -05:00
Ahmet Alp Balkan
8ba64b383d
pkg/archive_windows: make use of os.PathSeparator
...
cc: @jhowardmsft
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-03-05 17:15:11 -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