cloudfoundry / cf-for-k8s

The open source deployment manifest for Cloud Foundry on Kubernetes
Apache License 2.0
300 stars 115 forks source link

Unable to run CF tasks for kpack buildpack staged apps #591

Closed tcdowney closed 3 years ago

tcdowney commented 3 years ago

Describe the bug

To Reproduce*

Steps to reproduce the behavior:

  1. Push a buildpack app (e.g. dora): cf push dora
  2. Attempt to run a task for it: cf run-task dora -c "sleep 1000;"
  3. Observe the following error
Creating task for app dora in org o / space s as admin...
Unexpected Response
Response Code: 500
Request ID:    18860184-79a6-4740-964e-428b650cfd87::72fe6eb3-3678-4e80-b936-1608aa906a45
Code: 0, Title: , Detail: {
  "errors": [
    {
      "detail": "Runner error: failed to convert task: docker is the only supported lifecycle",
      "title": "CF-RunnerError",
      "code": 170016
    }
  ]
}
FAILED

Expected behavior

The task should successfully run on the platform.

Additional context

The case statement here needs to account for kpack droplets: https://github.com/cloudfoundry/cloud_controller_ng/blob/40ffe7bd65ffe661c45085da623b51e85bba599c/lib/cloud_controller/opi/task_client.rb#L77-L97

cf-for-k8s SHA

https://github.com/cloudfoundry/cf-for-k8s/tree/1bd95b574a4e547052274399284e1fcdc30c8243

Deploy instructions

Standard deploy of cf-for-k8s. This is a bug in cloud_controller_ng codebase.

Cluster information

GKE

CLI versions

Doesn't matter.

cf-gitbot commented 3 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/176041022

The labels on this github issue will be updated when the story is started.

paulcwarren commented 3 years ago

Marking as known-issue for now

bonzofenix commented 3 years ago

This seems to be resolved in develop as this commit is already merged in cf-for-k8s @paulcwarren, I tested it on my sandbox deployment and I am not seeing the error anymore: https://github.com/cloudfoundry/capi-k8s-release/commit/e8f81c1169cd94001f44e65c6b1370ca7702124b

jamespollard8 commented 3 years ago

Great - glad to hear that @bonzofenix. That's what we experienced and were hoping for too.

This fix will be included in the upcoming v2.0.0 release