cloudfoundry-community / cf-resource

Concourse resource for interacting with Cloud Foundry
Apache License 2.0
35 stars 63 forks source link

Pushing a big file with zero down time consistently fails. #65

Open dam5s opened 5 years ago

dam5s commented 5 years ago

Whenever trying to push a pretty big app with a lot of files, the zero down time deployment fails.

error: Error processing app files: Error uploading application.

Error performing request: Put https://api.run.pivotal.io/v2/resource_match: http: ContentLength=144633 with Body length 0

error running command: exit status 1

When looking at the logs, the request for resource_match never comes back with a response.

If pushing without zero downtime, the cf cli handles the failure to do resource_match appropriately.

I think this is because of the fixes in the CLI for the following issues - https://github.com/cloudfoundry/cli/issues/1042 https://github.com/cloudfoundry/cli/issues/1123

In our case we are facing the issues that were faced in this issue: https://github.com/cloudfoundry/cli/issues/1123

vito commented 5 years ago

Maybe this is fixed by just bumping the cf CLI?

I kicked off a new build - could you try it out? If this is fixed I'll publish a new release.

resource_types:
- name: cf
  type: docker-image
  source:
    repository: concourse/cf-resource
    tag: dev
dam5s commented 5 years ago

Unfortunately it does not fix it. I did try before as well, with a docker image having latest CLI and the Autopilot plugin: run cf push it works, run cf zero-downtime-push it does not.

It's not a huge emergency right now for us, as it's not an app that desperately needs the zero downtime, and in the worst case I would implement my own zero downtime. But it would be nice to get to the bottom of it. Thanks!

dam5s commented 5 years ago

I also faced the issue of trying to push a docker container with zero down time, and it's something that autopilot does not support either.

So I forked the resource and applied the following commit: https://github.com/platform-acceleration-lab/cf-resource/commit/master

Is it a change that would be considered?

My current implementation probably doesn't cover all the edge cases that autopilot did (what if an app called venerable exist, et c.), but it shells out to the cf cli for everything instead.

dam5s commented 5 years ago

Created a pull request to fix it https://github.com/concourse/cf-resource/pull/72