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

OpenShift deployment don't generate command when arguments are provided #29451

Open
michalvavrik opened this issue Nov 23, 2022 · 2 comments
Open
Labels
area/kubernetes kind/bug Something isn't working

Comments

@michalvavrik
Copy link
Member

Describe the bug

When quarkus.openshift.arguments are provided, first one is used as command is not generated. I think the behavior was introduced by #27733, but the PR description says The command may still be generated if the user provides arguments without command.

Expected behavior

One of:

Actual behavior

Container fails to start as first argument is used to start the app.

Error: container create failed: time="2022-11-23T15:50:25Z" level=error msg="runc create failed: unable to start container process: exec: "ARG1": executable file not found in $PATH"

How to Reproduce?

Reproducer:

Steps to reproduce the behavior:

  1. OC - logged in
  2. quarkus create app org.acme:openshift-quickstart \ --extension='resteasy-reactive,openshift'
  3. cd openshift-quickstart
  4. quarkus build -Dquarkus.kubernetes.deploy=true -Dquarkus.kubernetes-client.trust-certs=true -Dquarkus.openshift.arguments="ARG1,ARG2" -Dquarkus.platform.version=2.13.0.Final -DskipTests -DskipITs (NOTE: same happens when you use -Dnative)
  5. oc get pod

Alternatively:

  1. git clone https://github.com/quarkus-qe/quarkus-test-suite.git
  2. cd quarkus-test-suite/lifecycle-application
  3. mvn clean verify -Dopenshift -Dit.test=OpenShiftLifecycleApplicationIT (NOTE: same happens when you use -Dnative)
  4. oc get pod

Output of uname -a or ver

Linux

Output of java -version

openjdk version "17.0.5" 2022-10-18

GraalVM version (if different from Java)

GraalVM CE 22.3.0

Quarkus version or git rev

2.13.0 +, 2.14, 999-SNAPSHOT

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.8.6

Additional information

No response

@michalvavrik michalvavrik added kind/bug Something isn't working area/kubernetes labels Nov 23, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Nov 23, 2022

/cc @Sgitario, @geoand, @iocanel

@Sgitario
Copy link
Contributor

Sgitario commented Dec 7, 2022

This is an issue with the default images "ubi8/openjdk-11" and "ubi8/openjdk-17" (also for the new "ubi9" images).
These images seem to use the first argument when provided on purpose. Though I think this is wrong, let's workaround it by providing the command.
This issue is also happening in Native mode.
Fix #29724

Sgitario added a commit to Sgitario/quarkus that referenced this issue Dec 7, 2022
The default base image for OpenShift s2i builds: ubi8/openjdk-11 or ubi8/openjdk-17 needs the Java command when there are arguments. Therefore, let's generate always the command when using these images (the old ubi8 and ubi9 images) and also in Native mode. 

Fix quarkusio#29451
Relates quarkusio#29642
Sgitario added a commit to Sgitario/quarkus that referenced this issue Dec 7, 2022
The default base image for OpenShift s2i builds: ubi8/openjdk-11 or ubi8/openjdk-17 needs the Java command when there are arguments. Therefore, let's generate always the command when using these images (the old ubi8 and ubi9 images) and also in Native mode. 

Fix quarkusio#29451
Fix quarkusio#29642
Sgitario added a commit to Sgitario/quarkus that referenced this issue Dec 7, 2022
The default base image for OpenShift s2i builds: ubi8/openjdk-11 or ubi8/openjdk-17 needs the Java command when there are arguments. Therefore, let's generate always the command when using these images (the old ubi8 and ubi9 images) and also in Native mode. 

Fix quarkusio#29451
Fix quarkusio#29642
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubernetes kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants