redhat-developer / odo

odo - Developer-focused CLI for fast & iterative container-based application development on Podman and Kubernetes. Implementation of the open Devfile standard.
https://odo.dev
Apache License 2.0
792 stars 244 forks source link

Unable to install bundler for Ruby image while "odo push" on 4.6 cluster #3683

Closed prietyc123 closed 4 years ago

prietyc123 commented 4 years ago

/kind bug /area testing

What versions of software are you using?

Operating System: All supported

Output of odo version: master

How did you run odo exactly?

Enabled 4.6 cluster for odo test on periodic jobs leads component build error. PR - https://github.com/openshift/release/pull/10346

Actual behavior

Created dir: /tmp/858150600
Creating a new project: xaiectbfmj
Running odo with args [odo project create xaiectbfmj -w -v4]
[odo]  •  Waiting for project to come up  ...
[odo] I0803 14:15:56.593698   17984 occlient.go:541] Status of creation of project xaiectbfmj is Active
[odo] I0803 14:15:56.594282   17984 occlient.go:546] Project xaiectbfmj now exists
[odo] I0803 14:15:56.611104   17984 occlient.go:581] Status of creation of service account &ServiceAccount{ObjectMeta:{default  xaiectbfmj /api/v1/namespaces/xaiectbfmj/serviceaccounts/default 8726d100-b041-43ca-a757-40cd567de0a7 92615 0 2020-08-03 14:15:56 +0000 UTC <nil> <nil> map[] map[] [] []  []},Secrets:[]ObjectReference{ObjectReference{Kind:,Namespace:,Name:default-dockercfg-7fd7t,UID:,APIVersion:,ResourceVersion:,FieldPath:,},ObjectReference{Kind:,Namespace:,Name:default-token-wnblh,UID:,APIVersion:,ResourceVersion:,FieldPath:,},},ImagePullSecrets:[]LocalObjectReference{LocalObjectReference{Name:default-dockercfg-7fd7t,},},AutomountServiceAccountToken:nil,} is ready
[odo] 
 ✓  Waiting for project to come up [618ms]
[odo]  ✓  Project 'xaiectbfmj' is ready for use
[odo]  ✓  New project created and now using project: xaiectbfmj
[odo] I0803 14:15:56.622549   17984 odo.go:72] Could not get the latest release information in time. Never mind, exiting gracefully :)
Current working dir: /go/src/github.com/openshift/odo/tests/integration
Setting current dir to: /tmp/858150600
Running odo with args [odo component create ruby ref-test --project xaiectbfmj --git https://github.com/girishramnani/ruby-ex.git --ref develop]
[odo] I0803 14:15:56.718836   18005 preference.go:196] The path for preference file is /tmp/858150600/config.yaml
[odo] I0803 14:15:56.793456   18005 preference.go:196] The path for preference file is /tmp/858150600/config.yaml
[odo] I0803 14:15:56.902203   18005 occlient.go:797] Found exact image tag match for ruby:latest
[odo] Validation
[...]
✓  Creating component [320ms]
[odo] I0803 14:15:57.617317   18030 preference.go:196] The path for preference file is /tmp/858150600/config.yaml
[odo]  •  Triggering build from git  ...
[odo] I0803 14:15:57.617402   18030 occlient.go:1727] Build ref-test-app started.
[odo] 
 ✓  Triggering build from git [141ms]
[odo]  •  Waiting for build to finish  ...
[odo] I0803 14:15:57.759096   18030 occlient.go:1737] Build ref-test-app for BuildConfig ref-test-app-1 triggered.
[odo] I0803 14:15:57.759178   18030 occlient.go:1746] Waiting for ref-test-app-1  build to finish
[odo] I0803 14:15:57.981384   18030 occlient.go:1766] Status of ref-test-app-1 build is New
[odo] I0803 14:15:58.298968   18030 occlient.go:1766] Status of ref-test-app-1 build is Pending
[odo] I0803 14:16:01.086871   18030 occlient.go:1766] Status of ref-test-app-1 build is Running
[odo] Cloning "https://github.com/girishramnani/ruby-ex.git" ...
[odo]   Commit: de0de61fc38b1aabe3b955829b25b0e2cd84770c (Update config.ru)
[odo]   Author: girish ramnani <girishramnani95@gmail.com>
[odo]   Date:   Wed Dec 5 17:11:51 2018 +0530
[odo] Caching blobs under "/var/cache/blobs".
[odo] Getting image source signatures
[odo] Copying blob sha256:fc5b206e9329a1674dd9e8efbee45c9be28d0d0dcbabba3c6bb67a2f22cfcf2a
[odo] Copying blob sha256:9e7a6dc796f0a75c560158a9f9e30fb8b5a90cb53edce9ffbdf5778406e4de39
[odo] Copying blob sha256:f659c5c779ac4373302bfe3dc7d713c59cf9ec9f179a71e9b26336a51043fad2
[odo] Copying blob sha256:e7021e0589e97471d99c4265b7c8e64da328e48f116b5f260353b2e0a2adb373
[odo] Copying blob sha256:b6e6e2398a4fb287c5c6c203271ef6bb9c828e99a49b5f64aaa158428bc86f8d
[odo] Copying config sha256:80b759c91f48b3995570c72bab387e31fb1f613e5f4a801eb94b1ea2c197ba3d
[odo] Writing manifest to image destination
[odo] Storing signatures
[odo] Generating dockerfile with builder image image-registry.openshift-image-registry.svc:5000/openshift/ruby@sha256:0e6e657cc73103bdbc9a2aa0eaa590e61cf51ea78df162a36fecbf6103d11be8
[odo] STEP 1: FROM image-registry.openshift-image-registry.svc:5000/openshift/ruby@sha256:0e6e657cc73103bdbc9a2aa0eaa590e61cf51ea78df162a36fecbf6103d11be8
[odo] STEP 2: LABEL "io.openshift.build.image"="image-registry.openshift-image-registry.svc:5000/openshift/ruby@sha256:0e6e657cc73103bdbc9a2aa0eaa590e61cf51ea78df162a36fecbf6103d11be8"       "io.openshift.build.commit.author"="girish ramnani <girishramnani95@gmail.com>"       "io.openshift.build.commit.date"="Wed Dec 5 17:11:51 2018 +0530"       "io.openshift.build.commit.id"="de0de61fc38b1aabe3b955829b25b0e2cd84770c"       "io.openshift.build.commit.ref"="develop"       "io.openshift.build.commit.message"="Update config.ru"       "io.openshift.build.source-location"="https://github.com/girishramnani/ruby-ex.git"
[odo] STEP 3: ENV OPENSHIFT_BUILD_NAME="ref-test-app-1"     OPENSHIFT_BUILD_NAMESPACE="xaiectbfmj"     OPENSHIFT_BUILD_SOURCE="https://github.com/girishramnani/ruby-ex.git"     OPENSHIFT_BUILD_REFERENCE="develop"     OPENSHIFT_BUILD_COMMIT="de0de61fc38b1aabe3b955829b25b0e2cd84770c"     DEBUG_PORT="5858"
[odo] STEP 4: USER root
[odo] STEP 5: COPY upload/src /tmp/src
[odo] STEP 6: RUN chown -R 1001:0 /tmp/src
[odo] STEP 7: USER 1001
[odo] STEP 8: RUN /usr/libexec/s2i/assemble
[odo] ---> Installing application source ...
[odo] ---> Building your Ruby application from source ...
[odo] ---> Running 'bundle install --retry 2 --deployment --without development:test' ...
[odo] /opt/rh/rh-ruby27/root/usr/share/rubygems/rubygems.rb:275:in `find_spec_for_exe': Could not find 'bundler' (1.11.2) required by your /opt/app-root/src/Gemfile.lock. (Gem::GemNotFoundException)
[odo] To update to the latest version installed on your system, run `bundle update --bundler`.
[odo] To install the missing version, run `gem install bundler:1.11.2`
[odo]   from /opt/rh/rh-ruby27/root/usr/share/rubygems/rubygems.rb:294:in `activate_bin_path'
[odo]   from /opt/rh/rh-ruby27/root/usr/bin/bundle:23:in `<main>'
[odo] subprocess exited with status 1
[odo] subprocess exited with status 1
[odo] error: build error: error building at STEP "RUN /usr/libexec/s2i/assemble": exit status 1
[odo] I0803 14:16:47.410086   18030 occlient.go:1766] Status of ref-test-app-1 build is Running
[odo] I0803 14:16:47.410725   18030 occlient.go:1766] Status of ref-test-app-1 build is Failed
[odo]  ✗  Waiting for build to finish [50s]
[odo]  ✗  Failed to create component with name ref-test. Please use `odo config view` to view settings used to create component. Error: failed to build component with args {Name:ref-test SourcePath:https://github.com/girishramnani/ruby-ex.git SourceRef:develop SourceType:git ImageName:ruby EnvVars:[DEBUG_PORT=5858] Ports:[8080/TCP] Resources:&ResourceRequirements{Limits:ResourceList{},Requests:ResourceList{},} ApplicationName:app Wait:true StorageToBeMounted:map[] StdOut:0xc000010018}: unable to build ref-test-app-1, error: : build ref-test-app-1 status Failed
Deleting project: xaiectbfmj
Running odo with args [odo project delete xaiectbfmj -f]
[odo] I0803 14:16:47.702871   18157 application.go:49] Unable to list Service Catalog instances: unable to list ServiceInstances: serviceinstances.servicecatalog.k8s.io is forbidden: User "developer" cannot list resource "serviceinstances" in API group "servicecatalog.k8s.io" in the namespace "xaiectbfmj"
[odo] This project contains the following applications, which will be deleted
[odo] Application app
[...]
[odo] component named ref-test
[odo] No services / could not get services
[odo] I0803 14:16:48.089720   18157 project.go:136] unable to list services: unable to list ServiceInstances: serviceinstances.servicecatalog.k8s.io is forbidden: User "developer" cannot list resource "serviceinstances" in API group "servicecatalog.k8s.io" in the namespace "xaiectbfmj"
[odo]  ⚠  Warning! Projects are deleted from the cluster asynchronously. Odo does its best to delete the project. Due to multi-tenant clusters, the project may still exist on a different node.
[odo] I0803 14:16:48.126774   18157 odo.go:72] Could not get the latest release information in time. Never mind, exiting gracefully :)
[odo]  ✓  Deleted project : xaiectbfmj
Setting current dir to: /go/src/github.com/openshift/odo/tests/integration
Deleting dir: /tmp/858150600
• Failure [52.321 seconds]
odo sub component command tests
/go/src/github.com/openshift/odo/tests/integration/cmd_cmp_sub_test.go:13
  Creating component
  /go/src/github.com/openshift/odo/tests/integration/component.go:52
    should create the component from the branch ref when provided [It]
    /go/src/github.com/openshift/odo/tests/integration/component.go:188
    No future change is possible.  Bailing out early after 50.385s.

    Running odo with args [odo component push]
    Expected
        <int>: 1
    to match exit code:
        <int>: 0

Expected behavior

Component build should run successfully and install the required bundler while s2i assemble run.

Any logs, error output, etc?

More details : https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/openshift_release/10346/rehearse-10346-periodic-ci-openshift-odo-master-v4.6-integration-e2e-periodic/1290276399654899712

prietyc123 commented 4 years ago

Though we do not support ruby app, but this is blocking us in enabling 4.6 cluster for periodic jobs as mentioned in the description of the issue. However we need upcoming cluster to be running on periodic job for OPENSHIFT 4.6 feature_freeze Testing.

So keeping this issue in the current sprint.

prietyc123 commented 4 years ago

/kind bug

prietyc123 commented 4 years ago

Raised a PR #3706 which will remove the Ruby image test and unblock 4.6 cluster test run. So once it get merged I will remove this issue from the current sprint as it will be of low priority and not required for v2.

kadel commented 4 years ago

reason for this that the ruby version in s2i image was incompatible with the example source code

/clsoe

kadel commented 4 years ago

/close

openshift-ci-robot commented 4 years ago

@kadel: Closing this issue.

In response to [this](https://github.com/openshift/odo/issues/3683#issuecomment-680877614): >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.