Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS Code for Eclipse Che works with both UBI 8 and 9 #21629

Closed
Tracked by #21653
azatsarynnyy opened this issue Aug 10, 2022 · 16 comments
Closed
Tracked by #21653

VS Code for Eclipse Che works with both UBI 8 and 9 #21629

azatsarynnyy opened this issue Aug 10, 2022 · 16 comments
Assignees
Labels
area/editor/vscode Issues related to the Code OSS editor of Che kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P1 Has a major impact to usage or development of the system.
Milestone

Comments

@azatsarynnyy
Copy link
Member

azatsarynnyy commented Aug 10, 2022

Is your task related to a problem? Please describe

When running Che-Code in a UBI9-based container, it fails with the following error:

./node: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory 

Describe the solution you'd like

Probably, it requires adding some libs to Che-Code image.

Describe alternatives you've considered

There was an internal discussion on the possibility of running Che-Code in any image. It requires reviewing how we package the VS Code. Also, there were some ideas to check about using the statically linked libraries.

Release Notes Text

Previously VS Code for Eclipse Che was failing to run on containers that had a version of OpenSSL that was not supported like for example UBI 9 that included OpenSSL 3.0.1). Now it will work independently from the version of OpenSSL included in the container.

@azatsarynnyy azatsarynnyy added kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P1 Has a major impact to usage or development of the system. team/editors area/editor/vscode Issues related to the Code OSS editor of Che labels Aug 10, 2022
@benoitf
Copy link
Contributor

benoitf commented Aug 17, 2022

on ubi9 there are different libcrypto versions

/usr/lib64/libcrypto.so.3.0.1
/usr/lib64/libcrypto.so.3

@benoitf
Copy link
Contributor

benoitf commented Aug 17, 2022

so maybe copying nodejs binary from ubi9/nodejs-16 in addition to ubi8 or we grab a nodejs binary with a different openssl version

@nickboldt
Copy link
Contributor

In order for this to work downstream we would need to start from https://catalog.redhat.com/software/containers/ubi9/nodejs-16/61a60604c17162a20c1c6a2e or https://catalog.redhat.com/software/containers/ubi9/ubi-minimal/615bd9b4075b022acc111bf5 and adjust the image as needed.

@l0rd
Copy link
Contributor

l0rd commented Sep 16, 2022

In order for this to work downstream we would need to start from catalog.redhat.com/software/containers/ubi9/nodejs-16/61a60604c17162a20c1c6a2e or catalog.redhat.com/software/containers/ubi9/ubi-minimal/615bd9b4075b022acc111bf5 and adjust the image as needed.

@nickboldt are you sure? This is not about using UBI 9 image for UDI (or for VS Code). This is to allow a user to specify an UBI 9 based custom image in a devfile and VS Code as an editor.

@RomanNikitenko
Copy link
Member

UBI 8 image uses 1.1.1 version of openssl

image

UBI 9 image uses 3.0.1 version of openssl

image

For che-code we use node that requires 1.1.1 version of openssl

image

@azatsarynnyy
Copy link
Member Author

@l0rd @benoitf we're going to apply the solution proposed in che-incubator/che-code#120. See more details in the comment. It's simple and allows to work around the original problem while we're not migrated to UBI9.

@benoitf
Copy link
Contributor

benoitf commented Oct 3, 2022

I would have added a nodejs ubi9 binary in the image and pick-up at runtime the correct nodejs binary.

if ssl 1.1, pick-up nodejs from ubi8 else if ssl 3, use nodejs from ubi9 (we already have a nodejs for alpine and another one for ubi8)

Also the active nodejs LTS version will be switched to nodejs 18 at the end of this month (and since nodejs17, openssl to use is v3) so more and more people will expect to have openssl 3

@RomanNikitenko
Copy link
Member

RomanNikitenko commented Oct 3, 2022

I would have added a nodejs ubi9 binary in the image and pick-up at runtime the correct nodejs binary.

hello, Florent!

Agree, it would be good solution and I tried it some time ago.
I took Node.js 16 which statically links against OpenSSL 3 from ubi9/nodejs-16 image and tried to use it here to run VS Code.
But I faced with the error like: Error: libnode.so.93: cannot open shared object file: No such file or directory.

I guess the problem is:

  • I took installed node file
  • but there is no /usr/lib64/libnode.so.93 file in the customer's runtime image

A possible solution is: a user who is using the UBI 9 based custom image as UDI should provide two things:

  • install Node.js 16 which statically links against OpenSSL 3
  • provide environment variable with path to the installed node

On the che-code side we use that node to run VS Code, please see my draft PR to che-code.

Also the active nodejs LTS version will be switched to nodejs 18 at the end of this month (and since nodejs17, openssl to use is v3) so more and more people will expect to have openssl 3

I commented about it 5 days ago in another issue (Artem posted the corresponding link above, but you should be logged in).
In short, right now we can not switch from Node.js 16 to another version as VS Code requires a version >=16.14.x and <17.

@azatsarynnyy
Copy link
Member Author

Downstream link: https://issues.redhat.com/browse/CRW-3261

@azatsarynnyy azatsarynnyy changed the title Make it possible to run Che-Code on UBI 9 Make it possible running Che-Code in a UBI9-based container Oct 5, 2022
@l0rd
Copy link
Contributor

l0rd commented Oct 6, 2022

@azatsarynnyy can we close this? Asking to decide if we can include it in the 7.55 release notes

@l0rd l0rd changed the title Make it possible running Che-Code in a UBI9-based container VS Code can be hosted in containers with any version of nodeJS and OpenSSL Oct 6, 2022
@l0rd
Copy link
Contributor

l0rd commented Oct 6, 2022

@RomanNikitenko @azatsarynnyy I have changed the title to reflect the actual new feature as it will be mentioned in the release notes. Can you please confirm it's correct?

@l0rd l0rd changed the title VS Code can be hosted in containers with any version of nodeJS and OpenSSL VS Code for Eclipse Che is bundled with OpenSSL 3 (and works with both UBI 8 and 9) Oct 6, 2022
@azatsarynnyy
Copy link
Member Author

VS Code for Eclipse Che is bundled with OpenSSL 3 (and works with both UBI 8 and 9)

@l0rd VS Code for Eclipse Che is not bundled with OpenSSL 3 after fixing this issue. But OpenSSL 3 is already provided in UBI 9 image.
@RomanNikitenko please, correct me if I'm wrong.

I'd restate the title as VS Code for Eclipse Che works with both UBI 8 and 9.

@azatsarynnyy
Copy link
Member Author

The issue has been fixed by the PR:

Also, we're going to extend the Che-Code readme docs with instructions for running VS Code in a UBI 9-based container.

@l0rd l0rd changed the title VS Code for Eclipse Che is bundled with OpenSSL 3 (and works with both UBI 8 and 9) VS Code for Eclipse Che works with both UBI 8 and 9) Oct 7, 2022
@l0rd l0rd changed the title VS Code for Eclipse Che works with both UBI 8 and 9) VS Code for Eclipse Che works with both UBI 8 and 9 Oct 7, 2022
@azatsarynnyy
Copy link
Member Author

@max-cx
Copy link

max-cx commented Dec 15, 2022

Sync'd with Red Hat JIRA https://issues.redhat.com/browse/CRW-3633

@ArvinB
Copy link

ArvinB commented Oct 18, 2023

@SDawley Are there any plans for 2024 to move Dev Spaces from UBI8 to UBI9 base images?
FYI @nickboldt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/editor/vscode Issues related to the Code OSS editor of Che kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

8 participants