-
Bug
-
Resolution: Done
-
Critical
-
3.1.0.GA
-
None
-
False
-
None
-
False
-
Release Notes
-
-
Known Issue
-
Done
Some sample projects in Dev Spaces refer to devfiles which include commands to deploy the application to OpenShift.
However, the deploy commands (for example mvn fabric8:deploy or mvn oc:deploy) attempt to build a container image based on a base image that is not available out of the box in an airgapped Dev Spaces deployment. These base images could be:
- registry.access.redhat.com/ubi8/openjdk-11 - https://github.com/devspaces-samples/vertx-health-checks-example-redhat/blob/devspaces-3-rhel-8/pom.xml#L25
- registry.access.redhat.com/ubi8/openjdk-11 - https://github.com/devspaces-samples/vertx-http-example/blob/devspaces-3-rhel-8/pom.xml#L20
- registry.access.redhat.com/ubi8/openjdk-8:1.3 - https://github.com/devspaces-samples/rest-http-example/blob/devspaces-3-rhel-8/pom.xml#L38
- registry.redhat.io/fuse7/fuse-java-openshift-jdk11-rhel8:1.10 - https://github.com/devspaces-samples/fuse-rest-http-booster/blob/devspaces-3-rhel-8/pom.xml#L19
- registry.redhat.io/ubi8/openjdk-11:latest - https://github.com/devspaces-samples/microprofile-quickstart-bootable/blob/devspaces-3-rhel-8/microprofile-fault-tolerance/pom.xml#L57
- registry.access.redhat.com/ubi8/nodejs-12 - https://github.com/devspaces-samples/nodejs-configmap/blob/devspaces-3-rhel-8/package.json#L16
So, the easiest solution here would be to ensure the missing images are copied (skopeo copy --all ...) inside the cluster's internal container registry, so that they can be pulled by a user.
vertx-health-checks-example-redhat relies on docker://registry.access.redhat.com/ubi8/openjdk-11:latest
We are currently unable to run the deploy command in disconnected environment
- exec: commandLine: 'mvn fabric8:deploy -Popenshift -DskipTests -Dvertx.disableDnsResolver=true' component: tools group: kind: run workingDir: '${PROJECTS_ROOT}/vertx-health-checks-example-redhat' id: 6-deploy-to-openshift
[INFO] F8: Using Container image name of namespace: default [INFO] F8: Running generator vertx [INFO] F8: vertx: Using Container image registry.access.redhat.com/ubi8/openjdk-11 as base / builder [INFO] F8: using resource templates from /projects/vertx-health-checks-example-redhat/src/main/fabric8 [INFO] F8: fmp-service: Adding a default service 'health-check-vertx' with ports [8080] [INFO] F8: fmp-ingress: Not generating Ingress for service health-check-vertx type is not LoadBalancer: null [INFO] F8: fmp-revision-history: Adding revision history limit to 2 [INFO] F8: validating /projects/vertx-health-checks-example-redhat/target/classes/META-INF/fabric8/kubernetes/health-check-vertx-deployment.yml resource [INFO] F8: validating /projects/vertx-health-checks-example-redhat/target/classes/META-INF/fabric8/kubernetes/health-check-vertx-service.yml resource [INFO] F8: using resource templates from /projects/vertx-health-checks-example-redhat/src/main/fabric8 [INFO] F8: fmp-service: Adding a default service 'health-check-vertx' with ports [8080] [INFO] F8: fmp-revision-history: Adding revision history limit to 2 [INFO] F8: validating /projects/vertx-health-checks-example-redhat/target/classes/META-INF/fabric8/openshift/health-check-vertx-deploymentconfig.yml resource [INFO] F8: validating /projects/vertx-health-checks-example-redhat/target/classes/META-INF/fabric8/openshift/health-check-vertx-route.yml resource [INFO] F8: validating /projects/vertx-health-checks-example-redhat/target/classes/META-INF/fabric8/openshift/health-check-vertx-service.yml resource [INFO] [INFO] --- fabric8-maven-plugin:4.4.1:build (fmp) @ health-check-vertx --- [INFO] F8: Running in OpenShift mode [INFO] F8: Using OpenShift build with strategy S2I [INFO] F8: Running generator vertx [INFO] F8: vertx: Using Container image registry.access.redhat.com/ubi8/openjdk-11 as base / builder [INFO] Copying files to /projects/vertx-health-checks-example-redhat/target/docker/health-check-vertx/latest/build/maven [INFO] Building tar: /projects/vertx-health-checks-example-redhat/target/docker/health-check-vertx/latest/tmp/docker-build.tar [INFO] F8: [health-check-vertx:latest] "vertx": Created docker source tar /projects/vertx-health-checks-example-redhat/target/docker/health-check-vertx/latest/tmp/docker-build.tar [INFO] F8: Creating BuildServiceConfig health-check-vertx-s2i for Source build [INFO] F8: Creating ImageStream health-check-vertx [INFO] F8: Starting Build health-check-vertx-s2i [INFO] F8: Waiting for build health-check-vertx-s2i-1 to complete... [INFO] F8: Adding cluster TLS certificate authority to trust store [INFO] F8: time="2022-08-02T10:15:06Z" level=info msg="Not using native diff for overlay, this may cause degraded performance for building images: kernel has CONFIG_OVERLAY_FS_REDIRECT_DIR enabled" [INFO] F8: I0802 10:15:06.318091 1 defaults.go:102] Defaulting to storage driver "overlay" with options [mountopt=metacopy=on]. [INFO] F8: Caching blobs under "/var/cache/blobs". [INFO] F8: Trying to pull registry.access.redhat.com/ubi8/openjdk-11:latest... [INFO] F8: Warning: Pull failed, retrying in 5s ... [INFO] F8: Trying to pull registry.access.redhat.com/ubi8/openjdk-11:latest... [INFO] F8: Warning: Pull failed, retrying in 5s ... [INFO] F8: Trying to pull registry.access.redhat.com/ubi8/openjdk-11:latest... [INFO] F8: Warning: Pull failed, retrying in 5s ... [INFO] F8: error: build error: After retrying 2 times, Pull image still failed due to error: initializing source docker://registry.access.redhat.com/ubi8/openjdk-11:latest: pinging container registry registry.access.redhat.com: Get "https://registry.access.redhat.com/v2/": Forbidden [ERROR] F8: Failed to execute the build: org.apache.maven.plugin.MojoExecutionException: OpenShift Build health-check-vertx-s2i-1 failed: Failed: GenericBuildFailed
Solution
Remove devfiles that do not fully work from the registry. All Getting-Started devfiles should be fully functional https://github.com/redhat-developer/devspaces-images/tree/devspaces-3-rhel-8/devspaces-devfileregistry/devfiles-extra :
- 00_java11-maven-microprofile-bootable
- 02_java11-maven-fuse
- 03_java11-maven-vertx-http-booster
- 03_java11-maven-vertx
- 03_java8-maven-spring-boot-http-booster
- 04_nodejs-configmap