Compare commits

..

25 Commits

Author SHA1 Message Date
Michael Crosby 1781b18deb Merge branch 'migrate-aufs-containers' into v0.7-rc3
Conflicts:
	runtime.go
2013-10-08 22:09:04 -07:00
Michael Crosby d67f8d3414 Migrate AUFS containers to devmapper 2013-10-08 22:06:31 -07:00
Alexander Larsson b414d9d4e2 Clean up better from previous unit-test runs
This makes sure we unmount existing mounts (as well as removing the
devmapper devices), and it fails with proper logs rather than just
panic()ing.
2013-10-08 22:06:31 -07:00
Michael Crosby b5a5a56271 Merge branch 'master' into 0.7-staging 2013-10-08 22:05:59 -07:00
Andy Rothfusz c1bb33ea4d Merge pull request #2114 from metalivedev/2113-searchbump
Fix #2113 improve doc search results
2013-10-09 12:24:33 -07:00
Andy Rothfusz 6545e53803 Clean up javascript comment. 2013-10-09 12:22:14 -07:00
Victor Vieux d30806590c Merge pull request #2127 from titanous/close-body
Fix some error cases where a HTTP body might not be closed
2013-10-09 06:52:03 -07:00
Tianon Gravi d5f9160441 Merge pull request #1956 from tianon/bash-completion
Add proper bash completion for "docker push"
2013-10-09 05:47:55 -07:00
Michael Crosby 875b3001f8 Migrate AUFS containers to devmapper 2013-10-08 18:33:49 -07:00
Guillaume J. Charmes bb62c281f5 Merge pull request #2130 from tianon/swap-contrib-maintainers
Swap contrib MAINTAINERS
2013-10-08 17:57:52 -07:00
Andy Rothfusz 3565bf8d00 Merge pull request #2134 from tianon/contributing
Add devenvironment link to CONTRIBUTING.md
2013-10-08 17:36:56 -07:00
Tianon Gravi 9a4b0b9823 Add devenvironment link to CONTRIBUTING.md 2013-10-08 16:48:19 -06:00
Tianon Gravi 4fda3314d8 Swap contrib MAINTAINERS 2013-10-08 15:15:58 -06:00
Jonathan Rudenberg e906485b07 Fix some error cases where a HTTP body might not be closed
Refs #2126
2013-10-08 15:35:00 -04:00
Alexander Larsson a85667f80a Clean up better from previous unit-test runs
This makes sure we unmount existing mounts (as well as removing the
devmapper devices), and it fails with proper logs rather than just
panic()ing.
2013-10-08 14:54:00 +02:00
Andy Rothfusz 6d67ac2a1b Insert popularity and boost docs results. 2013-10-07 17:51:07 -07:00
Solomon Hykes 2d425af1b1 Merge pull request #2103 from tianon/clean-out-fixme
Clean out a few outdated FIXME items
2013-10-07 15:19:01 -07:00
Andy Rothfusz ed19693f50 Merge pull request #2106 from mastahyeti/api_1.5_docs_whitespace
Cleanup whitespace in API 1.5 docs
2013-10-07 13:23:55 -07:00
Andy Rothfusz 194c1dbbd8 Merge pull request #2109 from shamrin/patch-4
[docs] use angle brackets in MAINTAINER example email
2013-10-07 12:18:44 -07:00
Alexey Shamrin a9eac7eab4 [docs] use angle brackets in MAINTAINER example email 2013-10-07 20:29:54 +04:00
Ben Toews 7c28683f08 Cleanup whitespace in API 1.5 docs
remove whitespace on blank lines
2013-10-06 19:52:18 -06:00
Daniel Mizyrycki c18e849451 Merge pull request #2061 from dotcloud/1948-test-detach
testing, issue #1948: Increase TestRunDetach timeout
2013-10-06 13:26:44 -07:00
Tianon Gravi a665517151 Clean out a few outdated FIXME items 2013-10-06 13:55:26 -06:00
Daniel Mizyrycki 135c1fce90 testing, issue #1948: Increase TestAttachDetach and TestRunDetach timeout 2013-10-01 15:59:52 -07:00
Tianon Gravi e37bb50628 Add proper bash completion for "docker push" 2013-09-20 21:22:51 -06:00
12 changed files with 764 additions and 734 deletions
+4
View File
@@ -3,6 +3,10 @@
Want to hack on Docker? Awesome! Here are instructions to get you started. They are probably not perfect, please let us know if anything feels
wrong or incomplete.
## Build Environment
For instructions on setting up your development environment, please see our dedicated [dev environment setup docs](http://docs.docker.io/en/latest/contributing/devenvironment/).
## Contribution guidelines
### Pull requests are always welcome
+3 -10
View File
@@ -15,23 +15,16 @@ to put them - so we put them here :)
* Run linter on codebase
* Unify build commands and regular commands
* Move source code into src/ subdir for clarity
* Clean up the Makefile, it's a mess
* docker build: on non-existent local path for ADD, don't show full absolute path on the host
* mount into /dockerinit rather than /sbin/init
* docker tag foo REPO:TAG
* use size header for progress bar in pull
* Clean up context upload in build!!!
* Parallel pull
* Ensure /proc/sys/net/ipv4/ip_forward is 1
* Force DNS to public!
* Always generate a resolv.conf per container, to avoid changing resolv.conf under thne container's feet
* Save metadata with import/export
* Save metadata with import/export (#1974)
* Upgrade dockerd without stopping containers
* bring back git revision info, looks like it was lost
* Simple command to remove all untagged images
* Simple command to remove all untagged images (`docker rmi $(docker images | awk '/^<none>/ { print $3 }')`)
* Simple command to clean up containers for disk space
* Caching after an ADD
* entry point config
* bring back git revision info, looks like it was lost
* Caching after an ADD (#880)
* Clean up the ProgressReader api, it's a PITA to use
* Use netlink instead of iproute2/iptables (#925)
+2 -2
View File
@@ -400,7 +400,7 @@ func TestRunDetach(t *testing.T) {
})
// wait for CmdRun to return
setTimeout(t, "Waiting for CmdRun timed out", 5*time.Second, func() {
setTimeout(t, "Waiting for CmdRun timed out", 15*time.Second, func() {
<-ch
})
@@ -458,7 +458,7 @@ func TestAttachDetach(t *testing.T) {
})
// wait for CmdRun to return
setTimeout(t, "Waiting for CmdAttach timed out", 5*time.Second, func() {
setTimeout(t, "Waiting for CmdAttach timed out", 15*time.Second, func() {
<-ch
})
+1 -1
View File
@@ -1,2 +1,2 @@
Kawsar Saiyeed <kawsar.saiyeed@projiris.com> (@KSid)
Tianon Gravi <admwiggin@gmail.com> (@tianon)
Kawsar Saiyeed <kawsar.saiyeed@projiris.com> (@KSid)
+1 -1
View File
@@ -341,7 +341,7 @@ _docker_pull()
_docker_push()
{
return
__docker_image_repos
}
_docker_restart()
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -321,7 +321,7 @@ the command given by ``CMD`` is executed.
# VERSION 0.0.1
FROM ubuntu
MAINTAINER Guillaume J. Charmes "guillaume@dotcloud.com"
MAINTAINER Guillaume J. Charmes <guillaume@dotcloud.com>
# make sure the package repository is up to date
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
+6
View File
@@ -6,6 +6,9 @@
<title>{{ meta['title'] if meta and meta['title'] else title }} - Docker Documentation</title>
<meta name="description" content="{{ meta['description'] if meta }}" />
<meta name="keywords" content="{{ meta['keywords'] if meta }}" />
<!-- Swiftype tags: https://swiftype.com/documentation/meta_tags -->
<meta property='st:popularity' content='4' />
<meta property='st:type' content='docker_doc' />
{%- set url_root = pathto('', 1) %}
{%- if url_root == '#' %}{% set url_root = '' %}{% endif %}
@@ -168,6 +171,9 @@
Swiftype.resultContainingElement = '#st-results-container';
Swiftype.attachElement = '#st-search-input';
Swiftype.renderStyle = "overlay";
// from https://swiftype.com/questions/how-can-i-make-more-popular-content-rank-higher
// Use "page" for now -- they don't subgroup by document type yet.
Swiftype.searchFunctionalBoosts = {"page": {"popularity": "linear"}};
var script = document.createElement('script');
script.type = 'text/javascript';
+1 -1
View File
@@ -45,7 +45,7 @@ fi
# Use these flags when compiling the tests and final binary
LDFLAGS='-X main.GITCOMMIT "'$GITCOMMIT'" -X main.VERSION "'$VERSION'" -w -linkmode external -extldflags "-lpthread -static -Wl,--unresolved-symbols=ignore-all"'
BUILDFLAGS='-tags netgo'
BUILDFLAGS='-tags netgo -a'
bundle() {
+8 -7
View File
@@ -160,16 +160,16 @@ func (r *Registry) GetRemoteHistory(imgID, registry string, token []string) ([]s
}
req.Header.Set("Authorization", "Token "+strings.Join(token, ", "))
res, err := doWithCookies(r.client, req)
if err != nil || res.StatusCode != 200 {
if res != nil {
if res.StatusCode == 401 {
return nil, ErrLoginRequired
}
return nil, utils.NewHTTPRequestError(fmt.Sprintf("Internal server error: %d trying to fetch remote history for %s", res.StatusCode, imgID), res)
}
if err != nil {
return nil, err
}
defer res.Body.Close()
if res.StatusCode != 200 {
if res.StatusCode == 401 {
return nil, ErrLoginRequired
}
return nil, utils.NewHTTPRequestError(fmt.Sprintf("Server error: %d trying to fetch remote history for %s", res.StatusCode, imgID), res)
}
jsonString, err := ioutil.ReadAll(res.Body)
if err != nil {
@@ -240,6 +240,7 @@ func (r *Registry) GetRemoteImageLayer(imgID, registry string, token []string) (
return nil, err
}
if res.StatusCode != 200 {
res.Body.Close()
return nil, fmt.Errorf("Server error: Status %d while fetching image layer (%s)",
res.StatusCode, imgID)
}
+49
View File
@@ -321,7 +321,56 @@ func (runtime *Runtime) restore() error {
}
return len(ic.Links) < len(jc.Links)
})
deviceSet := runtime.config.DeviceSet
for _, container := range containers {
// Perform a migration for aufs containers
if !deviceSet.HasDevice(container.ID) {
contents, err := ioutil.ReadDir(container.rwPath())
if err != nil {
if !os.IsNotExist(err) {
utils.Debugf("[migration] Error reading rw dir %s", err)
}
continue
}
if len(contents) > 0 {
utils.Debugf("[migration] Begin migration of %s", container.ID)
image, err := runtime.graph.Get(container.Image)
if err != nil {
utils.Debugf("[migratoin] Failed to get image %s", err)
continue
}
unmount := func() {
if err := image.Unmount(runtime, container.RootfsPath(), container.ID); err != nil {
utils.Debugf("[migraton] Failed to unmount image %s", err)
}
}
if err := image.Mount(runtime, container.RootfsPath(), container.rwPath(), container.ID); err != nil {
utils.Debugf("[migratoin] Failed to mount image %s", err)
continue
}
if err := image.applyLayer(container.rwPath(), container.RootfsPath()); err != nil {
utils.Debugf("[migration] Failed to apply layer %s", err)
unmount()
continue
}
unmount()
if err := os.RemoveAll(container.rwPath()); err != nil {
utils.Debugf("[migration] Failed to remove rw dir %s", err)
}
utils.Debugf("[migration] End migration of %s", container.ID)
}
}
if err := runtime.Register(container); err != nil {
utils.Debugf("Failed to register container %s: %s", container.ID, err)
continue
+15 -1
View File
@@ -98,11 +98,25 @@ func removeDev(name string) {
syscall.Close(fd)
}
if err := devmapper.RemoveDevice(name); err != nil {
panic(fmt.Errorf("Unable to remove existing device %s: %s", name, err))
log.Fatalf("Unable to remove device %s needed to get a freash unit test environment", name)
}
}
func cleanupDevMapper() {
// Unmount any leftover mounts from previous unit test runs
if data, err := ioutil.ReadFile("/proc/mounts"); err == nil {
for _, line := range strings.Split(string(data), "\n") {
cols := strings.Split(line, " ")
if len(cols) >= 2 && strings.HasPrefix(cols[0], "/dev/mapper/docker-unit-tests-devices") {
err = syscall.Unmount(cols[1], 0)
if err != nil {
log.Fatalf("Unable to unmount %s needed to get a freash unit test environment: %s", cols[1], err)
}
}
}
}
// Remove any leftover devmapper devices from previous unit run tests
infos, _ := ioutil.ReadDir("/dev/mapper")
if infos != nil {
hasPool := false