File tree Expand file tree Collapse file tree
blobstore_benchmark/templates
rotate_cc_database_key/templates Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,4 +3,5 @@ processes:
33 executable: /var/vcap/jobs/blobstore_benchmark/bin/run
44 args:
55 - run
6+ ephemeral_disk: true
67
Original file line number Diff line number Diff line change @@ -4,3 +4,4 @@ processes:
44 executable: /var/vcap/jobs/rotate_cc_database_key/bin/run
55 args:
66 - run
7+ ephemeral_disk: true
Original file line number Diff line number Diff line change @@ -5,12 +5,18 @@ CC_PACKAGE_DIR="${BOSH_PACKAGES_DIR:-/var/vcap/packages}/cloud_controller_ng"
55BUNDLER_VERSION=$(grep "BUNDLED WITH" ${CC_PACKAGE_DIR}/cloud_controller_ng/Gemfile.lock -A 1 | grep -v "BUNDLED" | awk '{print $1}')
66
77# Install the vendored bundler if it's not already installed
8- # Use a lock file to avoid concurrent installations
9- BUNDLER_LOCK_FILE="/var/vcap/sys/run/bundler_install.lock"
10- mkdir -p "$(dirname $BUNDLER_LOCK_FILE)"
11- (
12- flock -x 200
13- if ! gem list -i bundler -v $BUNDLER_VERSION > /dev/null 2> &1; then
8+ if ! gem list -i bundler -v $BUNDLER_VERSION > /dev/null 2> &1; then
9+ # Use a lock file to avoid concurrent installations (for colocated jobs).
10+ # Skip locking if /var/vcap/sys/run isn't available (e.g., dedicated errand VMs).
11+ BUNDLER_LOCK_FILE="/var/vcap/sys/run/bundler_install.lock"
12+ if [[ -d "$(dirname $BUNDLER_LOCK_FILE)" ]]; then
13+ (
14+ flock -x 200
15+ if ! gem list -i bundler -v $BUNDLER_VERSION > /dev/null 2> &1; then
16+ gem install --local ${CC_PACKAGE_DIR}/cloud_controller_ng/vendor/cache/bundler-${BUNDLER_VERSION}.gem
17+ fi
18+ ) 200> $BUNDLER_LOCK_FILE
19+ else
1420 gem install --local ${CC_PACKAGE_DIR}/cloud_controller_ng/vendor/cache/bundler-${BUNDLER_VERSION}.gem
1521 fi
16- ) 200 > $BUNDLER_LOCK_FILE
22+ fi
You can’t perform that action at this time.
0 commit comments