Skip to content

Use Maistra proxy based on CentOS Stream 8 in integration tests#609

Merged
maistra-bot merged 5 commits intomaistra:maistra-2.3from
jewertow:use-maistra-proxy
Sep 15, 2022
Merged

Use Maistra proxy based on CentOS Stream 8 in integration tests#609
maistra-bot merged 5 commits intomaistra:maistra-2.3from
jewertow:use-maistra-proxy

Conversation

@jewertow
Copy link
Copy Markdown
Member

@jewertow jewertow commented Sep 9, 2022

Istio has been using its own tool to build container images for some time. This tool is docker-builder.
Unfortunately docker-builder does not support RUN command, so we cannot install iptables and openssl packages in proxyv2 with RUN dnf install ....

To work around this limitation, I built an image with necessary packages, pushed to my registry and used it as the base image for proxyv2.

Image quay.io/jewertow/base-maistra-proxyv2:2.3 was built from the following Dockerfile:

FROM quay.io/centos/centos:stream8

RUN dnf -y upgrade --refresh --nobest && \
    dnf -y install iptables iproute openssl && \
    dnf -y clean all

I think that it does not make sense to extend docker-builder to support RUN, because it's too complicated (if possible)
and we just have to build our official base image and use it as I did with my image.

Update:

I figured out that we can disable building container images with crane by setting ISTIO_DOCKER_BUILDER=docker, so I updated images to use CentOS Stream 8 as a base image and added image app_sidecar_centos_stream_8 to test VMs.

Signed-off-by: Jacek Ewertowski jewertow@redhat.com

Copy link
Copy Markdown
Member

@jwendell jwendell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this.

I have experimented with this a week ago: #604 and I think it worked...

Also, please align with @bmangoen and hisr PR: #606

@jewertow
Copy link
Copy Markdown
Member Author

Your PR didn't work. Look at the log - everything failed. You can find there the following warnings:

2022-09-02T13:29:02.519537Z	warn	dockerfile	Skipping RUN: [dnf -y upgrade --refresh --nobest &&     dnf -y install iptables iproute openssl &&     dnf -y clean all]
2022-09-02T13:29:02.521035Z	warn	dockerfile	Skipping RUN: [dpkg -i /tmp/istio-sidecar.deb && rm /tmp/istio-sidecar.deb]

And as you can see in one of istio-init logs, iptables-restore did not exist in the proxy container.

@jwendell
Copy link
Copy Markdown
Member

hmm, I see. Is it possible to install the libssl1 in the [upstream] base image? If yes, then we don't need a special Dockerfile based on centos. We can use the same upstream mechanism without any changes.

In the past we needed this image based on centos because the envoy binary built on centos was not compatible with the libc present on Ubuntu. It looks like it's not the case anymore. I was able to run our Envoy on this base image (which is derived from Ubuntu). The problem now is that our Envoy relies on the presence of the /lib64/libssl.so.1.1 library, which is provided by the Ubuntu package libssl1, which is not installed by default.

If there's no way to have this package installed in the base image (and since it's not possible to have RUN apt install anymore), I suggest you add a new target as a dependency for the make docker target .i.e, that will run first, that will create a new base image, let's say, maistra-base which is merely the Dockerfile you created this custom base image. Then, for every run, we first create this custom base image, and proxy is based on that. In other words, we would use your solution, but baking it at build-time instead of relying in a pre-built image hosted somewhere.

@jewertow jewertow changed the title Use maistra proxy and custom base image built on top of CentOS Stream 8 Use Maistra proxy built on top of CentOS Stream 8 Sep 13, 2022
@jewertow
Copy link
Copy Markdown
Member Author

/test gencheck

@jewertow
Copy link
Copy Markdown
Member Author

/test integration-servicemesh

@jewertow
Copy link
Copy Markdown
Member Author

/test integration-telemetry

@jewertow jewertow changed the title Use Maistra proxy built on top of CentOS Stream 8 Use Maistra proxy based on CentOS Stream 8 in integration tests Sep 15, 2022
Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>
Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>
Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>
@jewertow
Copy link
Copy Markdown
Member Author

@jwendell thanks for your advice. I was trying to run tests on Ubuntu, but currently it provides libssl.so.3.0 by default. I was trying to find a workaround to install OpenSSL 1.1.1, e.g. using repositories from older releases, but I had some other issues, so I gave up in favor of bringing an image based on CentOS Stream 8.

Rockylinux8 VMDistro = "Centos8"
CentosStream8 VMDistro = "CentosStream8"

DefaultVMDistro = CentosStream8
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any reason to have a centos8 image?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, it is not used, but we don't use other images as well. I didn't remove them to not increase the scope of this PR.


export FAST_VM_BUILDS=true
export ISTIO_DOCKER_BUILDER=crane
export ISTIO_DOCKER_BUILDER=docker
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is the change that allows you have have RUN commands in the proxy dockerfile?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you're right. As you can see, I updated the PR description and mentioned about this variable.

// TestSimpleTlsOrigination test SIMPLE TLS mode with TLS origination happening at Gateway proxy
// It uses CredentialName set in DestinationRule API to fetch secrets from k8s API server
func TestSimpleTlsOrigination(t *testing.T) {
// https://issues.redhat.com/browse/OSSM-755
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Put a FIXME: prefix to those comments? Perhaps it makes it easier for us in the future to locate them?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

// It uses CredentialName set in DestinationRule API to fetch secrets from k8s API server
func TestSimpleTlsOrigination(t *testing.T) {
// https://issues.redhat.com/browse/OSSM-755
t.Skip("https://github.com/istio/istio/0")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the format is https://github.com/istio/istio/issues/0

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I fixed it.

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>
Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>
func TestMain(m *testing.M) {
framework.NewSuite(m).
// FIXME: https://issues.redhat.com/browse/OSSM-2000
Skip("https://github.com/istio/istio/issues/0").
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It turned out that we have to disable whole suite. It works on my local machine, but does not on prow. I was trying to find out what's wrong there, but it seems to be a more complicated issue. I will solve it later.

@jewertow jewertow requested a review from jwendell September 15, 2022 18:38

# hadolint ignore=DL3041
RUN dnf -y upgrade --refresh --nobest && \
dnf -y install iptables iproute openssl && \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to install a specific versoin of openssl or just the latest one ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need OpenSSL 1.1.1 and our istio-proxy expects to find libssl.so.1.1. In CentOS Stream 8 the package openssl is exactly this one that we expect. I don't think that this package will be replaced by another version, because the next one is 3.0.0 which provides breaking API and ABI and upgrading from 1.1.1 to 3.0.0 is a big challenge, so it will probably not happen.

@jewertow
Copy link
Copy Markdown
Member Author

/retest

@jewertow
Copy link
Copy Markdown
Member Author

/test unit

@maistra-bot maistra-bot merged commit 739e326 into maistra:maistra-2.3 Sep 15, 2022
maistra-bot pushed a commit that referenced this pull request Dec 21, 2022
* OSSM-2378: Use Maistra proxy CentOS Stream 8 img

For integration tests. Based on (#609)

* Build container images with docker

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Use maistra proxy and CentOS Stream 8 as a base image for proxyv2

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Test VMs using CentOS Stream 8

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Temporarily skip failing security tests

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Temporarily skip tests suite telemetry.prometheus.wasm

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* fix(tests): enables fixed integration tests

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>
Co-authored-by: Jacek Ewertowski <jewertow@redhat.com>
jewertow added a commit to jewertow/istio that referenced this pull request Sep 30, 2023
* OSSM-2378: Use Maistra proxy CentOS Stream 8 img

For integration tests. Based on (maistra#609)

* Build container images with docker

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Use maistra proxy and CentOS Stream 8 as a base image for proxyv2

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Test VMs using CentOS Stream 8

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Temporarily skip failing security tests

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Temporarily skip tests suite telemetry.prometheus.wasm

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* fix(tests): enables fixed integration tests

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>
Co-authored-by: Jacek Ewertowski <jewertow@redhat.com>
jewertow added a commit to jewertow/istio that referenced this pull request Feb 20, 2024
* OSSM-2378: Use Maistra proxy CentOS Stream 8 img

For integration tests. Based on (maistra#609)

* Build container images with docker

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Use maistra proxy and CentOS Stream 8 as a base image for proxyv2

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Test VMs using CentOS Stream 8

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Temporarily skip failing security tests

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Temporarily skip tests suite telemetry.prometheus.wasm

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* fix(tests): enables fixed integration tests

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>
Co-authored-by: Jacek Ewertowski <jewertow@redhat.com>
openshift-merge-bot bot pushed a commit that referenced this pull request Feb 26, 2024
* OSSM-2378: Use Maistra proxy CentOS Stream 8 img (#713)

* OSSM-2378: Use Maistra proxy CentOS Stream 8 img

For integration tests. Based on (#609)

* Build container images with docker

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Use maistra proxy and CentOS Stream 8 as a base image for proxyv2

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Test VMs using CentOS Stream 8

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Temporarily skip failing security tests

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Temporarily skip tests suite telemetry.prometheus.wasm

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* fix(tests): enables fixed integration tests

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>
Co-authored-by: Jacek Ewertowski <jewertow@redhat.com>

* Use our proxy (#801)

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* OSSM-5958: Remove wasm extensions (#937)

* Do not rely on WASM extensions

Since maistra/proxy#253

* Remove wasm extensions from EnvoyFilters

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Disable tests for WASM extensions

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Remove commented code

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

---------

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>
Co-authored-by: Jonh Wendell <jwendell@redhat.com>

* Disable failing tests

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Fix TestTrustDomainValidation - change expected TLS error to make it work with OpenSSL

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

---------

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>
Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>
Co-authored-by: Jonh Wendell <jonh.wendell@redhat.com>
Co-authored-by: Jonh Wendell <jwendell@redhat.com>
yxun pushed a commit to yxun/maistra-istio that referenced this pull request May 22, 2024
* OSSM-2378: Use Maistra proxy CentOS Stream 8 img (maistra#713)

* OSSM-2378: Use Maistra proxy CentOS Stream 8 img

For integration tests. Based on (maistra#609)

* Build container images with docker

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Use maistra proxy and CentOS Stream 8 as a base image for proxyv2

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Test VMs using CentOS Stream 8

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Temporarily skip failing security tests

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Temporarily skip tests suite telemetry.prometheus.wasm

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* fix(tests): enables fixed integration tests

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>
Co-authored-by: Jacek Ewertowski <jewertow@redhat.com>

* Use our proxy (maistra#801)

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* OSSM-5958: Remove wasm extensions (maistra#937)

* Do not rely on WASM extensions

Since maistra/proxy#253

* Remove wasm extensions from EnvoyFilters

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Disable tests for WASM extensions

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Remove commented code

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

---------

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>
Co-authored-by: Jonh Wendell <jwendell@redhat.com>

* Disable failing tests

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Fix TestTrustDomainValidation - change expected TLS error to make it work with OpenSSL

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

---------

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>
Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>
Co-authored-by: Jonh Wendell <jonh.wendell@redhat.com>
Co-authored-by: Jonh Wendell <jwendell@redhat.com>
yxun pushed a commit to yxun/maistra-istio that referenced this pull request Jun 3, 2024
* OSSM-2378: Use Maistra proxy CentOS Stream 8 img (maistra#713)

* OSSM-2378: Use Maistra proxy CentOS Stream 8 img

For integration tests. Based on (maistra#609)

* Build container images with docker

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Use maistra proxy and CentOS Stream 8 as a base image for proxyv2

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Test VMs using CentOS Stream 8

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Temporarily skip failing security tests

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Temporarily skip tests suite telemetry.prometheus.wasm

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* fix(tests): enables fixed integration tests

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>
Co-authored-by: Jacek Ewertowski <jewertow@redhat.com>

* Use our proxy (maistra#801)

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* OSSM-5958: Remove wasm extensions (maistra#937)

* Do not rely on WASM extensions

Since maistra/proxy#253

* Remove wasm extensions from EnvoyFilters

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Disable tests for WASM extensions

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Remove commented code

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

---------

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>
Co-authored-by: Jonh Wendell <jwendell@redhat.com>

* Disable failing tests

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Fix TestTrustDomainValidation - change expected TLS error to make it work with OpenSSL

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

---------

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>
Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>
Co-authored-by: Jonh Wendell <jonh.wendell@redhat.com>
Co-authored-by: Jonh Wendell <jwendell@redhat.com>
jwendell added a commit to yxun/maistra-istio that referenced this pull request Jun 17, 2024
* OSSM-2378: Use Maistra proxy CentOS Stream 8 img (maistra#713)

* OSSM-2378: Use Maistra proxy CentOS Stream 8 img

For integration tests. Based on (maistra#609)

* Build container images with docker

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Use maistra proxy and CentOS Stream 8 as a base image for proxyv2

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Test VMs using CentOS Stream 8

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Temporarily skip failing security tests

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Temporarily skip tests suite telemetry.prometheus.wasm

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* fix(tests): enables fixed integration tests

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>
Co-authored-by: Jacek Ewertowski <jewertow@redhat.com>

* Use our proxy (maistra#801)

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* OSSM-5958: Remove wasm extensions (maistra#937)

* Do not rely on WASM extensions

Since maistra/proxy#253

* Remove wasm extensions from EnvoyFilters

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Disable tests for WASM extensions

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Remove commented code

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

---------

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>
Co-authored-by: Jonh Wendell <jwendell@redhat.com>

* Disable failing tests

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

* Fix TestTrustDomainValidation - change expected TLS error to make it work with OpenSSL

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>

---------

Signed-off-by: Jacek Ewertowski <jewertow@redhat.com>
Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>
Co-authored-by: Jonh Wendell <jonh.wendell@redhat.com>
Co-authored-by: Jonh Wendell <jwendell@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants