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

Failing to run s2i task on kubernetes/minikube #110

Closed
chmouel opened this issue Oct 23, 2019 · 5 comments
Closed

Failing to run s2i task on kubernetes/minikube #110

chmouel opened this issue Oct 23, 2019 · 5 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@chmouel
Copy link
Member

chmouel commented Oct 23, 2019

Expected Behavior

S2i building application properly

Actual Behavior

When running s2i task under minikube or kubernetes we are getting this error :

[....]
---> Pruning the development dependencies
npm info it worked if it ends with ok
npm info using npm@6.10.3
npm info using node@v12.10.0
npm timing stage:loadCurrentTree Completed in 33ms
npm timing stage:loadIdealTree:cloneCurrentTree Completed in 1ms
npm timing stage:loadIdealTree:loadShrinkwrap Completed in 6ms
npm timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 3ms
npm timing stage:loadIdealTree Completed in 21ms
npm timing stage:generateActionsToTake Completed in 7ms
npm timing stage:executeActions Completed in 56ms
npm timing stage:rollbackFailedOptional Completed in 2ms
npm timing stage:runTopLevelLifecycles Completed in 134ms
npm timing audit submit Completed in 449ms
npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 453ms
npm timing audit body Completed in 6ms
up to date in 0.533s
found 0 vulnerabilities

npm timing npm Completed in 1167ms
npm info ok
---> Cleaning up npm cache
---> Fix permissions on app-root
error committing container for step {Env:[PATH=/opt/app-root/src/node_modules/.bin/:/opt/app-root/src/.npm-global/bin/:/opt/app-root/src/bin:/opt/app-root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin SUMMARY=Platform for building and running Node.js 12.10.0 applications DESCRIPTION=Node.js  available as docker container is a base platform for building and running various Node.js  applications and frameworks. Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices. STI_SCRIPTS_URL=image:///usr/libexec/s2i STI_SCRIPTS_PATH=/usr/libexec/s2i APP_ROOT=/opt/app-root HOME=/opt/app-root/src PLATFORM=el7 BASH_ENV=/opt/app-root/etc/scl_enable ENV=/opt/app-root/etc/scl_enable PROMPT_COMMAND=. /opt/app-root/etc/scl_enable NODEJS_SCL=rh-nodejs10 NPM_RUN=start NODE_VERSION=12.10.0 NPM_VERSION=6.10.3 NODE_LTS=false NPM_CONFIG_LOGLEVEL=info NPM_CONFIG_PREFIX=/opt/app-root/src/.npm-global NPM_CONFIG_TARBALL=/usr/share/node/node-v12.10.0-headers.tar.gz DEBUG_PORT=5858 LD_LIBRARY_PATH=/opt/rh/httpd24/root/usr/lib64] Command:run Args:[/usr/libexec/s2i/assemble] Flags:[] Attrs:map[] Message:RUN /usr/libexec/s2i/assemble Original:RUN /usr/libexec/s2i/assemble}: error copying layers and metadata for container "50b91ee8a2c440fa6467bb0e7afa1932ce596259d267ec7f03e8e6bbc965247c": Error initializing source containers-storage:e68f92fecf6fffae93b5eb830d66e4d832fbd9af572c5f89c8af524c5898ae66-working-container: error extracting layer "ee67b56b473b3521d9e30919a551d56d8e97cfc1843ae7f02306e78066b8520b": lstat /var/lib/containers/storage/overlay/ee67b56b473b3521d9e30919a551d56d8e97cfc1843ae7f02306e78066b8520b/merged/usr/bin/git: input/output error

Steps to Reproduce the Problem

  1. Create a resource
resource.yaml
 ---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
  name: nodejs-s2i-example
spec:
  type: git
  params:
  - name: revision
    value: master
  - name: url
    value: https://github.com/chmouel/nodejs-health-check
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
  name: image
spec:
  type: image
  params:
  - name: url
    value: localhost:5000/nodejs-health-check-tekton
  1. Create a taskrun
taskrun.yaml
 ---
apiVersion: tekton.dev/v1alpha1
kind: TaskRun
metadata:
  name: s2i-run
spec:
  serviceAccount: default
  taskRef:
    name: s2i
  outputs:
    resources:
      - name: image
        resourceRef:
          name: image
  inputs:
    resources:
      - name: source
        resourceRef:
          name: nodejs-s2i-example
    params:
    - name: BUILDER_IMAGE
      value: nodeshift/centos7-s2i-nodejs:latest
    - name: TLSVERIFY
      value: "false"
  1. Apply the Task
task.yaml
 apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
  name: s2i
spec:
  inputs:
    resources:
     - name: source
       type: git
    params:
    - name: BUILDER_IMAGE
      description: The location of the s2i builder image.
    - name: PATH_CONTEXT
      description: The location of the path to run s2i from.
      default: .
    - name: TLSVERIFY
      description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry)
      default: "true"

outputs:
resources:
- name: image
type: image

steps:

  • name: generate
    image: quay.io/openshift-pipeline/s2i
    workingdir: /workspace/source
    command: ['s2i', 'build', '$(inputs.params.PATH_CONTEXT)', '$(inputs.params.BUILDER_IMAGE)', '--as-dockerfile', '/gen-source/Dockerfile.gen']
    volumeMounts:

    • name: gen-source
      mountPath: /gen-source
  • name: build
    image: quay.io/buildah/stable
    workingdir: /gen-source
    command: ['buildah', 'bud', '--tls-verify=$(inputs.params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(outputs.resources.image.url)', '.']
    volumeMounts:

    • name: varlibcontainers
      mountPath: /var/lib/containers
    • name: gen-source
      mountPath: /gen-source
      securityContext:
      privileged: true
  • name: push
    image: quay.io/buildah/stable
    command: ['buildah', 'push', '--tls-verify=$(inputs.params.TLSVERIFY)', '$(outputs.resources.image.url)', 'docker://$(outputs.resources.image.url)']
    volumeMounts:

    • name: varlibcontainers
      mountPath: /var/lib/containers
      securityContext:
      privileged: true

volumes:

  • name: varlibcontainers
    emptyDir: {}
  • name: gen-source
    emptyDir: {}

watch the logs,

Additional Info

  • I have tried this under with different s2i git repos with the same failures
  • buildah task do build properly only s2i is not working here
  • This was tested as work on openshift4
@chmouel
Copy link
Member Author

chmouel commented Oct 23, 2019

/kind bug

@tekton-robot tekton-robot added the kind/bug Categorizes issue or PR as related to a bug. label Oct 23, 2019
@tekton-robot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.

/lifecycle stale

Send feedback to tektoncd/plumbing.

@tekton-robot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.

/lifecycle rotten

Send feedback to tektoncd/plumbing.

@tekton-robot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

/close

Send feedback to tektoncd/plumbing.

@tekton-robot tekton-robot added lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels Aug 12, 2020
@tekton-robot
Copy link

@tekton-robot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

/close

Send feedback to tektoncd/plumbing.

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
kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

2 participants