Hi,

I tried to run single k8s e-2-e test locally on my macos laptop (a minikube
vm has been started manually), and here is the command I run from the
source root.

```
$ flink-end-to-end-tests/run-single-test.sh
flink-end-to-end-tests/test-scripts/test_kubernetes_application.sh
```
Then it failed at the image build stage while downloading the flink.tgz
file from a local fileserver.

```
Step 10/14 : RUN set -ex;   wget -nv -O flink.tgz "$FLINK_TGZ_URL";     if
[ "$CHECK_GPG" = "true" ]; then     wget -nv -O flink.tgz.asc
"$FLINK_ASC_URL";     export GNUPGHOME="$(mktemp -d)";     for server in
ha.pool.sks-keyservers.net $(shuf -e                             hkp://
p80.pool.sks-keyservers.net:80
keyserver.ubuntu.com                             hkp://
keyserver.ubuntu.com:80                             pgp.mit.edu) ; do
  gpg --batch --keyserver "$server" --recv-keys "$GPG_KEY" && break || : ;
    done &&     gpg --batch --verify flink.tgz.asc flink.tgz;     gpgconf
--kill all;     rm -rf "$GNUPGHOME" flink.tgz.asc;   fi;     tar -xf
flink.tgz --strip-components=1;   rm flink.tgz;     chown -R flink:flink .;
 ---> Running in 2225f4ea3406
+ wget -nv -O flink.tgz localhost:9999/flink.tgz
failed: Connection refused.
The command '/bin/sh -c set -ex;   wget -nv -O flink.tgz "$FLINK_TGZ_URL";
    if [ "$CHECK_GPG" = "true" ]; then     wget -nv -O flink.tgz.asc
"$FLINK_ASC_URL";     export GNUPGHOME="$(mktemp -d)";     for server in
ha.pool.sks-keyservers.net $(shuf -e                             hkp://
p80.pool.sks-keyservers.net:80
keyserver.ubuntu.com                             hkp://
keyserver.ubuntu.com:80                             pgp.mit.edu) ; do
  gpg --batch --keyserver "$server" --recv-keys "$GPG_KEY" && break || : ;
    done &&     gpg --batch --verify flink.tgz.asc flink.tgz;     gpgconf
--kill all;     rm -rf "$GNUPGHOME" flink.tgz.asc;   fi;     tar -xf
flink.tgz --strip-components=1;   rm flink.tgz;     chown -R flink:flink
.;' returned a non-zero code: 4
```

I checked the source code and found the python fileserver is here:

https://github.com/apache/flink/blob/master/flink-end-to-end-tests/test-scripts/common_docker.sh#L44

Then it uses 'docker build --net==host' to build image:

https://github.com/apache/flink/blob/master/flink-end-to-end-tests/test-scripts/common_docker.sh#L53

I am confused here, --net=host only makes services at the minikube vm
available to the docker build process, however, the python fileserver is
running on my local env rather than the minikube vm, how the docker build
process access that fileserver?

Should I:
- run the test script inside the minikube vm (so that the fileserver will
run on it), or
- did I miss some configuration to my minikube vm?

Thanks in advance.

Reply via email to