cloudfoundry / go-buildpack

Cloud Foundry buildpack for the Go Language
http://docs.cloudfoundry.org/buildpacks/
Apache License 2.0
82 stars 119 forks source link

Exceeding buildpack max_package_size #53

Closed richard-cox closed 7 years ago

richard-cox commented 7 years ago

What version of Cloud Foundry and CF CLI are you using? (i.e. What is the output of running cf curl /v2/info && cf version?

"api_version": "2.84.0", cf version 6.26.0+9c9a261.2017-04-06

What version of the buildpack you are using? v1.8.6, v1.8.5, v1.8.4

If you were attempting to accomplish a task, what was it you were attempting to do? Execute cf push on an application (https://github.com/SUSE/stratos-ui, see https://github.com/SUSE/stratos-ui/tree/master/deploy/cloud-foundry for deploy instructions) that uses the multi-buildpack and the following individual buildpacks

buildpacks:
  - https://github.com/cloudfoundry/go-buildpack
  - https://github.com/cloudfoundry/nodejs-buildpack
  - https://github.com/cloudfoundry/binary-buildpack

What did you expect to happen? Application push successfully completes

What was the actual behavior? Application push fails due to 'Disk quota exceeded' errors, for example

2017-08-23T17:07:33.29+0100 [STG/0] ERR cp: cannot create directory ‘/tmp/contents284822944/app/node_modules/gulp-angular-templatecache’: Disk quota exceeded

This will occur at different times per attempt, it seems that max_package_size is being exceeded when it was not before. Unfortunately I can't supply which version of the multi-buildpack or individual buildpack which caused this. However I can say rolling back to ...

buildpacks:
  - https://github.com/cloudfoundry/go-buildpack#v1.8.4
  - https://github.com/cloudfoundry/nodejs-buildpack#v1.6.0
  - https://github.com/cloudfoundry/binary-buildpack

Shows the issue more succinctly. With the above configuration and the default max_package_size of 1GB cf push will always fail before any application specific code is executed.

The logs show that GO is downloaded three times

-----> Download go 1.8.1
-----> Running go build compile
-----> Multi Buildpack version 0.2.4
-----> Running buildpacks:
       https://github.com/cloudfoundry/go-buildpack#v1.8.4
       https://github.com/cloudfoundry/nodejs-buildpack#v1.6.0
       https://github.com/cloudfoundry/binary-buildpack
-----> Download go 1.8.3
-----> Running go build supply
-----> Go Buildpack version 1.8.4
-----> Installing godep v79
       Download [https://buildpacks.cloudfoundry.org/dependencies/godep/godep-v79-linux-x64-9e37ce0f.tgz]
-----> Installing glide v0.12.3
       Download [https://buildpacks.cloudfoundry.org/dependencies/glide/glide-v0.12.3-linux-x64-aa256363.tgz]
-----> Installing go 1.8.3
       Download [https://buildpacks.cloudfoundry.org/dependencies/go/go1.8.3.linux-amd64-32ec5ac6.tar.gz]
-----> Download go 1.8.1
-----> Running go build supply
-----> Nodejs Buildpack version 1.6.0
-----> Installing binaries
       engines.node (package.json): 6.x.x
       engines.npm (package.json): unspecified (use default)
-----> Installing node 6.11.0
       Download [https://buildpacks.cloudfoundry.org/dependencies/node/node-6.11.0-linux-x64-2c8100a9.tgz]
       Using default npm version: 3.10.10
-----> Installing yarn 0.24.6
       Download [https://buildpacks.cloudfoundry.org/dependencies/yarn/yarn-v0.24.6-156eb82f.tar.gz]
       Installed yarn 0.24.6
-----> Creating runtime environment
-------> Buildpack version 1.0.14
cp: error writing ‘/tmp/contents624226720/app/tmp/src/golang.org/x/net/http2/go18.go’: Disk quota exceeded

Once for the multi-buildpack, once for the go buildpack and then once again?

Either way it seems something has changed and there's now a much greater disk impact which is forcing the build to exceed the max (default) 1GB size limt.

My real question here is has anything changed buildpack that would facilitate an increase in size? Can anything be done to mitigate?

Please confirm where necessary:

cf-gitbot commented 7 years ago

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

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

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

dgodd commented 7 years ago

@richard-cox I'm slightly confused, are you saying that using multi buildpacks with those three buildpacks and your app ever worked with the default disk quota? Or that using a single buildpack worked with the default disk quota?

As an aside, have you tried pushing the app with a larger quota?

sclevine commented 7 years ago

Closing in favor of https://github.com/cloudfoundry-incubator/multi-buildpack/issues/3.