This repository has been archived by the owner on Dec 5, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from mesosphere/offer_storage
better offer lifecycle management
- Loading branch information
Showing
18 changed files
with
1,595 additions
and
390 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
### Overview | ||
Periodically bug fixes will be needed in upstream code that this project depends upon. | ||
Rather than patch incorporated vendored code, this directory provides a place to isolate individual patches that may be applied at build time. | ||
**For now only a single HUNK should be present in each `.patch` file.** | ||
|
||
**NOTE:** This is not intended to replace proper pull-requests in other projects. | ||
Rather it is a short-term stop-gap solution for moving forward with patched code until the appropriate PR's are applied upstream and this project has been rebased to a revision that includes said PR's. | ||
|
||
### Naming Convention | ||
Patch files are named according to the upstream project they apply to and the issue number relative to **this project**. | ||
``` | ||
{patched-project}---{k8s-mesos-issue}.patch | ||
``` | ||
|
||
For example, a file named `k8s---issue1234.patch` would indicate a patch for the Kubernetes project, tracked by issue 1234 in this project's (kubernetes-mesos) issues list. | ||
Issue 1234 should cross-reference any relevant PR's in the upstream project's repository. | ||
|
||
#### Projects | ||
|
||
Project Code | Project Name | ||
-------------|------------- | ||
k8s | [kubernetes](https://github.com/GoogleCloudPlatform/kubernetes) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
|
||
function die() { | ||
test "x$1" = "x" || echo -E "$1" >&2 | ||
exit 1 | ||
} | ||
|
||
test -n "$GOPATH" || die Missing GOPATH | ||
pkg="${GOPATH%%:*}" | ||
echo GO packages in $pkg will be patched | ||
|
||
test -n "$pkg" || die Invalid GOPATH=$GOPATH | ||
home=$(dirname "$0") | ||
home=$(readlink -f "$home") | ||
echo Patch directory $home | ||
|
||
# Add new k/v pairs for each project repo that may require patching | ||
# and update the README.md as entries are modified here | ||
declare -A pmap | ||
pmap=( | ||
[k8s]=github.com/GoogleCloudPlatform/kubernetes | ||
) | ||
|
||
# TODO(jdef) at some point we should be able to apply patches with | ||
# multiple hunks, ala: | ||
# http://unix.stackexchange.com/questions/65698/how-to-make-patch-ignore-already-applied-hunks | ||
|
||
for k in "${!pmap[@]}"; do | ||
repo="${pmap["${k}"]}" | ||
echo "Checking patches for ${k}.. ($repo)" | ||
find "${home}" -type f -name "${k}---issue*.patch" | while IFS= read -r f; do | ||
#ff="${f%%.patch}" | ||
#test "x$f" != "x$ff" || continue | ||
cmd=( patch -p1 -s -r- -i"$f" ) | ||
echo -n -E "${cmd[@]}" | ||
output=$(cd "${pkg}/src/${repo}" && "${cmd[@]}") && echo || { | ||
echo -E "$output" | \ | ||
grep -q 'Reversed (or previously applied) patch detected' && \ | ||
echo " (already applied)" || \ | ||
{ echo; die "Failed to apply patch ${f}: ${output}"; } | ||
} | ||
done | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
diff --git a/pkg/kubelet/dockertools/docker.go b/pkg/kubelet/dockertools/docker.go | ||
index b42e2ce..b0f7808 100644 | ||
--- a/pkg/kubelet/dockertools/docker.go | ||
+++ b/pkg/kubelet/dockertools/docker.go | ||
@@ -215,6 +215,9 @@ func GetDockerPodInfo(client DockerInterface, podFullName, uuid string) (api.Pod | ||
} | ||
|
||
for _, value := range containers { | ||
+ if len(value.Names) == 0 { | ||
+ continue | ||
+ } | ||
dockerManifestID, dockerUUID, dockerContainerName, _ := ParseDockerName(value.Names[0]) | ||
if dockerManifestID != podFullName { | ||
continue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.