Closed lodener closed 1 year ago
the commit you pointed out to is used in v95
so if v95
works for you than this should not be the change causing this issue
but as you are running bosh create-env
bundler should be available in your path on the machine/image you are running it from.
@lodener could you post the contents of /root/.bosh/installations/68520a9a-0b2a-44c1-74e3-a60b789679aa/packages/aws-cpi-ruby-3.1/bosh/compile.env
?
@ramonskie ah yes you're right, my bad. So something related to the package being moved/renamed from ruby-3.1
to aws-cpi-ruby-3.1
then perhaps?
@rkoster both compile.env and runtime.env appear to be empty on v96. ./packages/:
total 12
drwxr-xr-x 6 root root 4096 Jan 6 12:18 ..
drwxr-xr-x 3 root root 4096 Jan 6 12:18 .
drwxr-xr-x 3 root root 4096 Jan 6 12:18 aws-cpi-ruby-3.1
./packages/aws-cpi-ruby-3.1/bosh/:
total 12
-rw-r--r-- 1 root root 0 Jan 6 11:02 runtime.env
-rw-r--r-- 1 root root 19 Jan 6 11:02 gemrc
-rw-r--r-- 1 root root 0 Jan 6 11:02 compile.env
drwxr-xr-x 7 root root 4096 Jan 6 11:48 ..
drwxr-xr-x 2 root root 4096 Jan 6 11:48 .
Whereas on v95 they are properly populated (./ruby-3.1/bosh/):
total 20
-rw-r--r-- 1 root root 150 Jan 6 11:55 runtime.env
-rw-r--r-- 1 root root 19 Jan 6 11:55 gemrc
-rw-r--r-- 1 root root 1085 Jan 6 11:55 compile.env
drwxr-xr-x 7 root root 4096 Jan 6 11:55 ..
drwxr-xr-x 2 root root 4096 Jan 6 11:55 .
compile.env on v95:
#!/bin/bash
# shellcheck disable=1090
source "${BOSH_PACKAGES_DIR:-/var/vcap/packages}/ruby-3.1/bosh/runtime.env"
# Use Clang if available; the resulting Ruby is faster
if [ -x /usr/bin/clang ]; then
export CXX=/usr/bin/clang++ CC=/usr/bin/clang
fi
bosh_bundle() {
bundle config set --local no_prune 'true'
bundle config set --local without 'development test'
bundle config set --local path "${BOSH_INSTALL_TARGET}/gem_home"
bundle install \
--binstubs "${BOSH_INSTALL_TARGET}/bin" \
"$@"
}
bosh_bundle_local() {
bundle config set --local no_prune 'true'
bundle config set --local without 'development test'
bundle config set --local path "${BOSH_INSTALL_TARGET}/gem_home"
bundle install \
--local \
--binstubs "${BOSH_INSTALL_TARGET}/bin" \
"$@"
}
bosh_generate_runtime_env() {
mkdir -p "${BOSH_INSTALL_TARGET}/bosh"
cat > "${BOSH_INSTALL_TARGET}/bosh/runtime.env" <<EOF
export PATH=${BOSH_INSTALL_TARGET}/bin:\$PATH
export GEM_HOME=${BOSH_INSTALL_TARGET}/gem_home/ruby/3.1.2
export BUNDLE_GEMFILE=${BOSH_INSTALL_TARGET}/Gemfile
EOF
}
Additionally, this is being run on a Concourse 7.9.0 worker VM (Linux 97078b27-44a5-444f-51d8-53a31b70d446 5.15.0-56-generic #62-Ubuntu SMP Tue Nov 22 19:54:14 UTC 2022 x86_64 GNU/Linux
).
When you say:
both compile.env and runtime.env appear to be empty on v96.
./packages/:
total 12
drwxr-xr-x 6 root root 4096 Jan 6 12:18 ..
drwxr-xr-x 3 root root 4096 Jan 6 12:18 .
drwxr-xr-x 3 root root 4096 Jan 6 12:18 aws-cpi-ruby-3.1
Do you mean the ./packages/aws-cpi-ruby-3.1
directory is empty?
I think you are running into: https://github.com/bosh-packages/ruby-release/commit/f390302c17b090bb7d449e0fef6798986b812c00
Could you try installing envsubst
in your concourse container?
The above change has already been bumped into the aws-cpi, so the next release will use sed
instead of envsubst
.
When you say:
both compile.env and runtime.env appear to be empty on v96. ./packages/: total 12 drwxr-xr-x 6 root root 4096 Jan 6 12:18 .. drwxr-xr-x 3 root root 4096 Jan 6 12:18 . drwxr-xr-x 3 root root 4096 Jan 6 12:18 aws-cpi-ruby-3.1
Do you mean the
./packages/aws-cpi-ruby-3.1
directory is empty?
No I only added that just to show the directory is actually created, the directory itself is not empty.
I think you are running into: bosh-packages/ruby-release@f390302
Could you try installing
envsubst
in your concourse container?
Spot on, the gettext
package was indeed not present and after installing it,envsubst
is there and the .env files are populated properly resulting in a successful create-env
run.
The above change has already been bumped into the aws-cpi, so the next release will use
sed
instead ofenvsubst
.
Nice, thanks for the insight-/helpful replies!
This is clarified and this is fixed in Ruby 3.2 update.
When updating our BOSH director, the create-env operation seems to fail during the compilation of
bosh_aws_cpi
. It appears as if PATH is not including the bundle bin location when the change from 25868caf383634f214d239cf889cac82e49506fe is run.Debug output:
This issue does not occur when falling back to the v95 CPI release.