Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions changelog/v1.19.12/fix-xds-out-of-sync.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
changelog:
- type: FIX
issueLink: https://github.com/solo-io/solo-projects/issues/8668
resolvesIssue: false
description: >-
fixed snapshot out of sync with envoy when upstream points to invalid service
1 change: 1 addition & 0 deletions ci/cloudbuild/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ options:
# Gloo supports running tests in parallel (https://github.com/solo-io/gloo/pull/8423) but occasionally
# Ginkgo reports a failure, even when all test suites pass. As a result, we do not run tests in parallel in CI.
- 'GINKGO_USER_FLAGS=-procs=1'
- 'DOCKER_API_VERSION=1.41'
volumes:
- name: 'gopath'
path: '/go'
4 changes: 2 additions & 2 deletions projects/gateway2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ envtest:
#----------------------------------------------------------------------------------
# Env test
#----------------------------------------------------------------------------------
ENVTEST_K8S_VERSION = 1.23
ENVTEST_K8S_VERSION = 1.31

.PHONY: envtest-path
envtest-path:
Expand All @@ -35,4 +35,4 @@ export GOBIN:=$(DEPSGOBIN)

install-go-tools:
mkdir -p $(DEPSGOBIN)
test -s $(ENVTEST) || go install sigs.k8s.io/controller-runtime/tools/setup-envtest@15d792835235
test -s $(ENVTEST) || go install sigs.k8s.io/controller-runtime/tools/setup-envtest@e4c1c38bcbdb
4 changes: 2 additions & 2 deletions projects/gloo/pkg/plugins/kubernetes/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ func (p *plugin) ProcessUpstream(params plugins.Params, in *v1.Upstream, out *cl
return nil
}

// configure the cluster to use EDS:ADS and call it a day. huh?
xds.SetEdsOnCluster(out, p.settings)
upstreamRef := in.GetMetadata().Ref()

// if we are in ggv2 / krt mode, we won't have the kubeCoreCache set.
Expand All @@ -85,6 +83,7 @@ func (p *plugin) ProcessUpstream(params plugins.Params, in *v1.Upstream, out *cl
Name: kube.Kube.GetServiceName(),
Namespace: kube.Kube.GetServiceNamespace(),
}.ResourceName()) != nil {
xds.SetEdsOnCluster(out, p.settings)
return nil
}
} else {
Expand All @@ -105,6 +104,7 @@ func (p *plugin) ProcessUpstream(params plugins.Params, in *v1.Upstream, out *cl

for _, s := range svcs {
if s.Name == kube.Kube.GetServiceName() {
xds.SetEdsOnCluster(out, p.settings)
return nil
}
}
Expand Down
10 changes: 0 additions & 10 deletions test/services/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ func RunContainer(containerName string, args []string) error {
cmd := exec.Command("docker", runArgs...)
cmd.Stdout = ginkgo.GinkgoWriter
cmd.Stderr = ginkgo.GinkgoWriter
// Set DOCKER_API_VERSION for compatibility with older Docker daemons
cmd.Env = append(os.Environ(), "DOCKER_API_VERSION=1.41")
err := cmd.Run()
if err != nil {
return errors.Wrap(err, "Unable to start "+containerName+" container")
Expand All @@ -48,8 +46,6 @@ func RunContainer(containerName string, args []string) error {
// ContainerExistsWithName returns an empty string if the container does not exist
func ContainerExistsWithName(containerName string) string {
cmd := exec.Command("docker", "ps", "-aq", "-f", "name=^/"+containerName+"$")
// Set DOCKER_API_VERSION for compatibility with older Docker daemons
cmd.Env = append(os.Environ(), "DOCKER_API_VERSION=1.41")
out, err := cmd.CombinedOutput()
if err != nil {
fmt.Printf("cmd.Run() [%s %s] failed with %s\n", cmd.Path, cmd.Args, err)
Expand All @@ -61,8 +57,6 @@ func ExecOnContainer(containerName string, args []string) ([]byte, error) {
arguments := []string{"exec", containerName}
arguments = append(arguments, args...)
cmd := exec.Command("docker", arguments...)
// Set DOCKER_API_VERSION for compatibility with older Docker daemons
cmd.Env = append(os.Environ(), "DOCKER_API_VERSION=1.41")
out, err := cmd.CombinedOutput()
if err != nil {
return nil, errors.Wrapf(err, "Unable to execute command %v on [%s] container [%s]", arguments, containerName, out)
Expand All @@ -88,8 +82,6 @@ func StopContainer(containerName string) {
cmd := exec.Command("docker", "stop", containerName)
cmd.Stdout = ginkgo.GinkgoWriter
cmd.Stderr = ginkgo.GinkgoWriter
// Set DOCKER_API_VERSION for compatibility with older Docker daemons
cmd.Env = append(os.Environ(), "DOCKER_API_VERSION=1.41")
err := cmd.Run()
if err != nil {
// We have seen this trip, even when the container is successfully stopped
Expand All @@ -102,8 +94,6 @@ func StopContainer(containerName string) {
func WaitUntilContainerRemoved(containerName string) error {
return retry.Do(func() error {
cmd := exec.Command("docker", "inspect", containerName)
// Set DOCKER_API_VERSION for compatibility with older Docker daemons
cmd.Env = append(os.Environ(), "DOCKER_API_VERSION=1.41")
inspectErr := cmd.Run()
if inspectErr == nil {
// If there is no error, it means the container still exists, so we want to retry
Expand Down
3 changes: 0 additions & 3 deletions test/services/envoy/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"fmt"
"io"
"net"
"os"
"os/exec"

"github.com/solo-io/go-utils/threadsafe"
Expand Down Expand Up @@ -299,8 +298,6 @@ func (ei *Instance) Logs() (string, error) {
if ei.UseDocker {
logsArgs := []string{"logs", ei.DockerContainerName}
cmd := exec.Command("docker", logsArgs...)
// Set DOCKER_API_VERSION for compatibility with older Docker daemons
cmd.Env = append(os.Environ(), "DOCKER_API_VERSION=1.41")
byt, err := cmd.CombinedOutput()
if err != nil {
return "", errors.Wrap(err, "Unable to fetch logs from envoy container")
Expand Down
2 changes: 0 additions & 2 deletions test/services/utils/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ var DockerDownload = func(tmpdir string, params GetBinaryParams) (string, error)
// use bash to run a docker container and extract the binary file from the running container
bash := fmt.Sprintf(`
set -ex
# Set Docker API version to 1.41 for compatibility with older Docker daemons
export DOCKER_API_VERSION=1.41
CID=$(docker run -d %s /bin/sh -c exit)

# just print the image sha for reproducibility
Expand Down