Kitura-OpenAPI icon indicating copy to clipboard operation
Kitura-OpenAPI copied to clipboard

Unable to build/deploy as CloudFoundry app on IBM Cloud

Open oosawak1975 opened this issue 5 years ago • 1 comments

To whom it may concern, We are trying to deploy an Swift app as CloudFoundry on IBM Cloud. When we contain Kitura-OpenAPI and Kitura-CouchDB, it fails due to 2GB disk space limitation of CloudFoundry. We tried the SWIFT_BUILD_DIR_CACHE: false setting in manifest file, but no luck. Also, 2GB disk space seems to be a hard limit. Is there any workaround to build and deploy?

The df command shows:

Filesystem 1K-blocks Used Available Use% Mounted on
overlay 2097152 774416 1322736 37% /
tmpfs 16467392 0 16467392 0% /dev
tmpfs 16467392 0 16467392 0% /dev/shm
/dev/xvdc2 277086368 94244140 168744004 36% /tmp/garden-init
tmpfs 16467392 0 16467392 0% /sys/fs/cgroup
tmpfs 2952 936 2016 32% /etc/cf-instance-credentials
udev 16439524 0 16439524 0% /dev/tty
tmpfs 16467392 0 16467392 0% /proc/scsi
tmpfs 16467392 0 16467392 0% /sys/firmware

However if we add the below dependencies

Kitura-OpenAPI located at https://github.com/IBM-Swift/Kitura-OpenAPI.git
Kitura-CouchDB located at https://github.com/IBM-Swift/Kitura-CouchDB.git

The application fails with the below error:

-----> Copying binaries to 'bin'
cp: cannot create regular file '/tmp/app/.swift-bin/Multitool': Disk quota exceeded
cp: cannot create regular file '/tmp/app/.swift-bin/libcpuplugin.so': Disk quota exceeded
cp: cannot create regular file '/tmp/app/.swift-bin/libmemplugin.so': Disk quota exceeded
cp: cannot create regular file '/tmp/app/.swift-bin/libhcapiplugin.so': Disk quota exceeded
cp: cannot create regular file '/tmp/app/.swift-bin/libenvplugin.so': Disk quota exceeded
cp: cannot create regular file '/tmp/app/.swift-bin/libagentcore.so': Disk quota exceeded
-----> Clearing previous swift cache
mkdir: cannot create directory ‘/tmp/cache/final/swift’: Disk quota exceeded
Failed to compile droplet: Failed to compile droplet: exit status 1

oosawak1975 avatar Sep 17 '20 07:09 oosawak1975

Unfortunately I think this is a known issue - see: https://github.com/IBM-Swift/swift-buildpack/issues/123

I doubt that the Kitura-OpenAPI project is at fault here, likely the additional libraries that it pulls in are just enough to cause the Swift build to exceed the file system limit.

djones6 avatar Sep 21 '20 09:09 djones6