che icon indicating copy to clipboard operation
che copied to clipboard

Make it possible to run Che-Code on UBI 9

Open azatsarynnyy opened this issue 2 years ago • 5 comments

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.

Additional context

No response

azatsarynnyy avatar Aug 10 '22 16:08 azatsarynnyy

on ubi9 there are different libcrypto versions

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

benoitf avatar Aug 17 '22 15:08 benoitf

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

benoitf avatar Aug 17 '22 16:08 benoitf

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.

nickboldt avatar Sep 12 '22 11:09 nickboldt

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.

l0rd avatar Sep 16 '22 12:09 l0rd

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

RomanNikitenko avatar Sep 19 '22 11:09 RomanNikitenko

@l0rd @benoitf we're going to apply the solution proposed in https://github.com/che-incubator/che-code/pull/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.

azatsarynnyy avatar Oct 03 '22 08:10 azatsarynnyy

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

benoitf avatar Oct 03 '22 08:10 benoitf

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.

RomanNikitenko avatar Oct 03 '22 09:10 RomanNikitenko

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

azatsarynnyy avatar Oct 05 '22 17:10 azatsarynnyy

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

l0rd avatar Oct 06 '22 12:10 l0rd

@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 avatar Oct 06 '22 12:10 l0rd

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 avatar Oct 06 '22 15:10 azatsarynnyy

The issue has been fixed by the PR:

  • https://github.com/che-incubator/che-code/pull/120

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

azatsarynnyy avatar Oct 06 '22 16:10 azatsarynnyy

The instructions on how to run VS Code in a UBI9-based container: https://github.com/che-incubator/che-code/tree/main/build/dockerfiles#running-visual-studio-code---open-source-code---oss-in-a-ubi9-based-container

azatsarynnyy avatar Oct 12 '22 13:10 azatsarynnyy

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

max-cx avatar Dec 15 '22 21:12 max-cx

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

ArvinB avatar Oct 18 '23 15:10 ArvinB