Uploaded image for project: 'Quarkus'
  1. Quarkus
  2. QUARKUS-2063

Setting quarkus.openshift.arguments in native mode without entrypoint breaks container start

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • None
    • None
    • OpenShift
    • Hide

      1.

      mvn io.quarkus.platform:quarkus-maven-plugin:2.8.3.Final:create -DprojectGroupId=org.acme -DprojectArtifactId=oc -Dextensions=quarkus-openshift
      cd oc
      mvn clean install -Dquarkus.native.container-runtime=docker -Dquarkus.native.container-build=true -Dquarkus.openshift.route.expose=true -Dquarkus.kubernetes.deploy=true -Dquarkus.kubernetes-client.trust-certs=true -Dquarkus.openshift.arguments=A,B -Dnative 
      # BUILD SUCCESS, but pod status is 'CreateContainerError'

      1.b) use ' -Dquarkus.native.builder-image=registry-proxy.engineering.redhat.com/rh-osbs/quarkus-mandrel-21-rhel8:21.3' with the same result

      Show
      1. mvn io.quarkus.platform:quarkus-maven-plugin:2.8.3.Final:create -DprojectGroupId=org.acme -DprojectArtifactId=oc -Dextensions=quarkus-openshift cd oc mvn clean install -Dquarkus. native .container-runtime=docker -Dquarkus. native .container-build= true -Dquarkus.openshift.route.expose= true -Dquarkus.kubernetes.deploy= true -Dquarkus.kubernetes-client.trust-certs= true -Dquarkus.openshift.arguments=A,B -Dnative # BUILD SUCCESS, but pod status is 'CreateContainerError' 1.b) use ' -Dquarkus.native.builder-image=registry-proxy.engineering.redhat.com/rh-osbs/quarkus-mandrel-21-rhel8:21.3' with the same result
    • +
    • ---

    Description

      Issue:

      Setting quarkus.openshift.arguments in native mode iff entrypoint is not set nor overriden by quarkus.openshift.command leads to 'CreateContainerError'. The behavior is nicely explained here.

      Tested with OpenShift 4.10 and 4.6, but I suspect the same behavior will affect Kubernetes. Tested both with 2.7.5.CR1 and upstream. Tested with Docker container runtime.

      Imho problem lays in 'io.quarkus.container.image.openshift.deployment.OpenshiftProcessor#openshiftRequirementsNative' as after reading this method I found easy workaround - just set 'quarkus.openshift.command' to entrypoint and the problem's fixed. Thus for default 'io.quarkus.container.image.openshift.deployment.OpenshiftBaseNativeImage#QUARKUS' set 'quarkus.openshift.command=/home/quarkus/application'.

      Expected behavior:

      'quarkus.openshift.arguments' in native mode are passed to app and container starts.

      Attachments

        Activity

          People

            gandrian Georgios Andrianakis
            rh-ee-mvavrik Michal Vavrik
            Michal Vavrik Michal Vavrik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: