diff --git a/puppet-manifests/src/bin/puppet-manifest-apply.sh b/puppet-manifests/src/bin/puppet-manifest-apply.sh index 95e9958a0..d9ff9863f 100755 --- a/puppet-manifests/src/bin/puppet-manifest-apply.sh +++ b/puppet-manifests/src/bin/puppet-manifest-apply.sh @@ -23,6 +23,7 @@ RUNTIMEDATA=$5 PUPPET_MODULES_PATH=/usr/share/puppet/modules:/usr/share/openstack-puppet/modules PUPPET_MANIFEST=/etc/puppet/manifests/${MANIFEST}.pp PUPPET_TMP=/tmp/puppet +FILEBUCKET_PATH=/var/lib/puppet/clientbucket # Setup log directory and file DATETIME=$(date -u +"%Y-%m-%d-%H-%M-%S") @@ -86,6 +87,12 @@ function finish { # Save the logs tar czf ${SAVEDLOGS} ${LOGDIR} 2>/dev/null fi + + # To avoid the ever growing contents of filebucket which may trigger inode + # issues, clean up its contents after every apply. + if [ -d ${FILEBUCKET_PATH} ]; then + rm -fr ${FILEBUCKET_PATH}/* + fi } trap finish EXIT