Escape manifest IDs when hunting the network container.

This makes it possible to have manifests with _ in the ID.  I'm not sure we
want to allow this, but we do for now.  I hope to follow this up with a deeper
change to make this a bit more robust.
pull/6/head
Tim Hockin 2014-06-24 09:52:43 -07:00
parent e811e24b23
commit 8c2a8b65c3
1 changed files with 1 additions and 1 deletions

View File

@ -620,7 +620,7 @@ func (kl *Kubelet) networkContainerExists(manifest *api.ContainerManifest) (stri
return "", false, err return "", false, err
} }
for _, name := range pods { for _, name := range pods {
if strings.Contains(name, containerNamePrefix+"--"+networkContainerName+"--"+manifest.Id+"--") { if strings.Contains(name, containerNamePrefix+"--"+networkContainerName+"--"+escapeDash(manifest.Id)+"--") {
return name, true, nil return name, true, nil
} }
} }