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

HTTPD build is failed due to rsync is not install in the s2i base image #2289

Closed
GeekArthur opened this issue Oct 15, 2019 · 8 comments
Closed

Comments

@GeekArthur
Copy link
Contributor

GeekArthur commented Oct 15, 2019

[kind/bug]

What versions of software are you using?

  • Operating System:
jingfus-mbp:~ jingfuwang$ uname -a
Darwin jingfus-mbp.war.can.ibm.com 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64
  • Output of odo version:
jingfus-mbp:~ jingfuwang$ odo version
odo v1.0.0-beta7 (785a922d)

Server: https://jing-okd-master.rtp.raleigh.ibm.com:8443
OpenShift: v3.11.0+3a34b96-217
Kubernetes: v1.11.0+d4cacc0

How did you run odo exactly?

  1. git clone https://github.com/OpenShiftDemos/http-base
  2. odo create httpd httpdodo
  3. odo push

Actual behavior

Build is failed with error /opt/odo/bin/assemble-and-restart: line 24: rsync: command not found, logs with details are below

Expected behavior

Build should be successfully then deploy application to cluster

Any logs, error output, etc?

jingfus-mbp:http-base jingfuwang$ odo create httpd httpdodo
Warning: httpd is not fully supported by odo, and it is not guaranteed to work.
 ✓  Validating component [80ms]
Please use `odo push` command to create the component with source deployed
jingfus-mbp:http-base jingfuwang$ odo push
Validation
 ✓  Checking component [126ms]

Configuration changes
 ✓  Initializing component
 ✓  Creating component [395ms]

Pushing to component httpdodo of type local
 ✓  Checking files for pushing [1ms]
 ✓  Waiting for component to start [13s]
 ✓  Syncing files to the component [1s]
 ◓  Building component ✗  Unable to build files
+ set -eo pipefail
+ export ODO_UTILS_DIR=/opt/odo
+ ODO_UTILS_DIR=/opt/odo
+ export ODO_IMAGE_MAPPINGS_FILE=/opt/odo/language-scripts/image-mappings.json
+ ODO_IMAGE_MAPPINGS_FILE=/opt/odo/language-scripts/image-mappings.json
++ /opt/odo/bin/getlanguage
+ IMAGE_LANG=
+ '[' '!' -z /opt/app-root/src ']'
+ '[' /tmp '!=' /opt/app-root/src ']'
+ '[' -n /opt/app-root/src-backup ']'
+ '[' '!' -d /opt/app-root/src-backup ']'
+ mkdir -p /opt/app-root/src-backup/src
+ rsync -rlO /tmp/src/. /opt/app-root/src-backup/src/
/opt/odo/bin/assemble-and-restart: line 24: rsync: command not found

 ✗  Building component [495ms]
 ✗  command terminated with exit code 127
@cdrage
Copy link
Member

cdrage commented Oct 15, 2019

Hey @GeekArthur

I actually created an issue here: sclorg/httpd-container#78 with regards to rsync not being added with httpd.

A PR was merged, which fixed base container httpd was using: sclorg/s2i-base-container#169

Is there any way you may be using an older version of the httpd container from the service catalog? If so, could you update it and try again?

@GeekArthur
Copy link
Contributor Author

GeekArthur commented Oct 15, 2019

@cdrage I am not sure how to update the version of httpd container. Given we already cloned the component locally and run odo create <component type> <component name> to create the .odo, my understanding is that once we run the odo push, odo will pull the latest s2i base image then trigger the build? If that's the design I should already used the latest s2i base image but that one doesn't have rsync installed.

@kadel
Copy link
Member

kadel commented Oct 16, 2019

odo will pull the latest s2i base image then trigger the build?

odo is not pulling any s2i builder images, it uses the ImageStreams definitions that are in your OpenShift cluster in the openshift project.

To update the s2i builder image you will have to update the httpd ImageStream inside the openshfit project.

Sadly we can't currently guaranteed that odo will work with any s2i builder image. This is why we recently started grouping images into supported, and unsupported. Supported are those that we test and we make sure that it works (currently nodejs, and java (openjdk based)), the unsupported might work, or might break, it depends how image was built.

We are currently looking for a better solution for this.

Supported images are listed at https://github.com/openshift/odo/blob/425d77670264efc502e02aed28a5665546bfefd8/pkg/catalog/catalog.go#L282-L290

@GeekArthur
Copy link
Contributor Author

@kadel Thanks for your clarification! I am new to ImageStream but I make it work. I find when I update the ImageStream I can use oc tag to let the the ImageStream points to specific builder image and I need to specify the registry. Seems like not all odo supported images are in DockerHub registry (eg. openjdk/openjdk-11-rhel8:latest), do you know which registry stores them?

Also another question is for official odo supported templates, the templates from here: https://docs.openshift.com/container-platform/4.2/cli_reference/openshift_developer_cli/creating-a-single-component-application-with-odo.html#examples-from-git-repositories are the templates that odo recommend to use or have better support of odo?

@mchauvel
Copy link

mchauvel commented Nov 8, 2019

Seams PHP images have the same bug since rhel8/ubi8.

@kadel
Copy link
Member

kadel commented Dec 19, 2019

Also another question is for official odo supported templates, the templates from here: https://docs.openshift.com/container-platform/4.2/cli_reference/openshift_developer_cli/creating-a-single-component-application-with-odo.html#examples-from-git-repositories are the templates that odo recommend to use or have better support of odo?

Not really :-( Documentation is a little bit misleading there :-(

The templates (component types) that odo recommended to use are just nodejs and java that are based on the images listed at https://docs.openshift.com/container-platform/4.2/cli_reference/openshift_developer_cli/understanding-odo.html#odo-supported-languages-and-images
You can verify that on your cluster using odo catalog list components. You will get a list of all available images that odo see. The first group is supported images, those are supported, and we guarantee that it will work wit odo. The second group is unsupported images, those are images that should work, but we can't guarantee that as s2i builder image interface is too loose, and there might be images that are not compatible with odo.

@kadel
Copy link
Member

kadel commented Dec 19, 2019

I'm closing this issue, as currently there is not anything that we can do on odo side.
/close

@GeekArthur , if you have any additional questions we can continue the discussion here

@openshift-ci-robot
Copy link
Collaborator

@kadel: Closing this issue.

In response to this:

I'm closing this issue, as currently there is not anything that we can do on odo side.
/close

@GeekArthur , if you have any additional questions we can continue the discussion here

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants