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

Fix image not running in K8s (ROSA) #24

Merged
merged 3 commits into from Jun 15, 2022

Conversation

MadLittleMods
Copy link
Contributor

@MadLittleMods MadLittleMods commented Jun 15, 2022

Fix image not running in K8s (ROSA)

Trying to solve the container exiting with error code 243. npm throws 243 for any command you try to run with it.

Here is how to get into the container while the entrypoint normally errors.

$ oc run -i --tty --image=ghcr.io/matrix-org/matrix-public-archive/matrix-public-archive:sha-65edaea1a9713bb2cc93fa98638327fdeff765cd mpa-test2 --port=3050 --restart=Never --env="DOMAIN=cluster" --command /bin/bash
$ npm start

$ echo $?
243

Why does the same image work in Docker?

$ docker run -it --entrypoint /bin/bash ghcr.io/matrix-org/matrix-public-archive/matrix-public-archive:sha-65edaea1a9713bb2cc93fa98638327fdeff765cd
$ npm start
# it starts ✅

Root cause

Seems like it could be either of these issues. Both are 8.6.0+ problems as well which lines up with the npm version available in each base image.

I don't know if this solves it.

Trying to solve the container exiting with error code `243`. `npm` throws `243` for any command you try to run with it.

Here is how to get into the container while the entrypoint normally errors.
```
$ oc run -i --tty --image=ghcr.io/matrix-org/matrix-public-archive/matrix-public-archive:main mpa-test2 --port=3050 --restart=Never --env="DOMAIN=cluster" --command /bin/bash
$ npm start

$ echo $?
243
```
@MadLittleMods MadLittleMods added the T-Defect Something isn't working. Bugs, crashes, or other reported issues. label Jun 15, 2022
@@ -4,8 +4,6 @@ RUN mkdir -p /app

WORKDIR /app

RUN npm install npm@^8 --location=global
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Doesn't solve the problem but I think we can get rid of this anyway. I added it before because I saw a warning about the package-lock.json made in an earlier version and to do the one-time upgrade, etc. I didn't see the warning in the latest build anyway.

@@ -1,11 +1,9 @@
FROM node:16.15-buster-slim
FROM node:16.14.2-buster-slim
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This seems to have fixed it 🤷 . Here are the packaged versions:

$ node --version
v16.14.2
$ npm --version
8.5.0

Previously it was using:

$ node --version
v16.15.1
$ npm --version
8.11.0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems like it could be either of these issues. Both are 8.6.0+ problems as well which lines up with the npm version available in each base image.

@MadLittleMods MadLittleMods marked this pull request as ready for review June 15, 2022 23:41
@MadLittleMods MadLittleMods changed the title Fix image not running in k8s (ROSA) Fix image not running in K8s (ROSA) Jun 15, 2022
@MadLittleMods MadLittleMods merged commit 724c562 into main Jun 15, 2022
@MadLittleMods MadLittleMods deleted the madlittlemods/try-to-run-on-rosa branch April 26, 2023 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Defect Something isn't working. Bugs, crashes, or other reported issues.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant