Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken offline environment create-env #251

Merged
merged 1 commit into from
Aug 1, 2022

Conversation

nouseforaname
Copy link

bundler stopped picking up some cli flags and some env vars. there have
been warnings around this but we do not see them when the create-env
succeeds. It wasn't caught in CI since the CI environment is not
internetless. In that case bundler was still able to reach out to get the
gems that were already present locally (which it ignored because it
ignored the cli flags)

fixes:

Finished installing CPI (00:03:11)
Cleaning up rendered CPI jobs... Finished (00:00:00)
Error getting CPI info:
  Executing external CPI command: '/home/tempest-web/.bosh/installations/22a68df8-5b95-4b3c-41a4-4f2dd8dab4e7/jobs/openstack_cpi/bin/cpi':
    Running command: '/home/tempest-web/.bosh/installations/22a68df8-5b95-4b3c-41a4-4f2dd8dab4e7/jobs/openstack_cpi/bin/cpi', stdout: '', stderr: 'bundler: failed to load command: /home/tempest-web/.bosh/installations/22a68df8-5b95-4b3c-41a4-4f2dd8dab4e7/packages/bosh_openstack_cpi/bin/openstack_cpi (/home/tempest-web/.bosh/installations/22a68df8-5b95-4b3c-41a4-4f2dd8dab4e7/packages/bosh_openstack_cpi/bin/openstack_cpi)
/home/tempest-web/.bosh/installations/22a68df8-5b95-4b3c-41a4-4f2dd8dab4e7/packages/ruby-3.1.0-r0.81.0/lib/ruby/site_ruby/3.1.0/bundler/definition.rb:481:in `materialize': Could not find bosh_common-1.3262.24.0, bosh_cpi-2.5.0, excon-0.71.1, fog-openstack-1.1.0, httpclient-2.8.3, membrane-1.1.0, netaddr-2.0.5, logging-1.8.2, semi_semantic-1.2.0, fog-core-2.2.4, fog-json-1.2.0, ipaddress-0.8.3, little-plugger-1.1.4, multi_json-1.15.0, builder-3.2.4, formatador-0.3.0, mime-types-3.4.1, mime-types-data-3.2022.0105 in any of the sources (Bundler::GemNotFound)
from /home/tempest-web/.bosh/installations/22a68df8-5b95-4b3c-41a4-4f2dd8dab4e7/packages/ruby-3.1.0-r0.81.0/lib/ruby/site_ruby/3.1.0/bundler/definition.rb:190:in `specs'
from /home/tempest-web/.bosh/installations/22a68df8-5b95-4b3c-41a4-4f2dd8dab4e7/packages/ruby-3.1.0-r0.81.0/lib/ruby/site_ruby/3.1.0/bundler/definition.rb:238:in `specs_for'

Signed-off-by: jpalermo [email protected]

bundler stopped picking up some cli flags and some env vars. there have
been warnings around this but we do not see them when the create-env
succeeds. It wasn't caught in CI since the CI environment is not
internetless. In that case bundler was still able to reach out to get the
gems that were already present locally (which it ignored because it
ignored the cli flags)

fixes:

```
Finished installing CPI (00:03:11)
Cleaning up rendered CPI jobs... Finished (00:00:00)
Error getting CPI info:
  Executing external CPI command: '/home/tempest-web/.bosh/installations/22a68df8-5b95-4b3c-41a4-4f2dd8dab4e7/jobs/openstack_cpi/bin/cpi':
    Running command: '/home/tempest-web/.bosh/installations/22a68df8-5b95-4b3c-41a4-4f2dd8dab4e7/jobs/openstack_cpi/bin/cpi', stdout: '', stderr: 'bundler: failed to load command: /home/tempest-web/.bosh/installations/22a68df8-5b95-4b3c-41a4-4f2dd8dab4e7/packages/bosh_openstack_cpi/bin/openstack_cpi (/home/tempest-web/.bosh/installations/22a68df8-5b95-4b3c-41a4-4f2dd8dab4e7/packages/bosh_openstack_cpi/bin/openstack_cpi)
/home/tempest-web/.bosh/installations/22a68df8-5b95-4b3c-41a4-4f2dd8dab4e7/packages/ruby-3.1.0-r0.81.0/lib/ruby/site_ruby/3.1.0/bundler/definition.rb:481:in `materialize': Could not find bosh_common-1.3262.24.0, bosh_cpi-2.5.0, excon-0.71.1, fog-openstack-1.1.0, httpclient-2.8.3, membrane-1.1.0, netaddr-2.0.5, logging-1.8.2, semi_semantic-1.2.0, fog-core-2.2.4, fog-json-1.2.0, ipaddress-0.8.3, little-plugger-1.1.4, multi_json-1.15.0, builder-3.2.4, formatador-0.3.0, mime-types-3.4.1, mime-types-data-3.2022.0105 in any of the sources (Bundler::GemNotFound)
from /home/tempest-web/.bosh/installations/22a68df8-5b95-4b3c-41a4-4f2dd8dab4e7/packages/ruby-3.1.0-r0.81.0/lib/ruby/site_ruby/3.1.0/bundler/definition.rb:190:in `specs'
from /home/tempest-web/.bosh/installations/22a68df8-5b95-4b3c-41a4-4f2dd8dab4e7/packages/ruby-3.1.0-r0.81.0/lib/ruby/site_ruby/3.1.0/bundler/definition.rb:238:in `specs_for'
```

Signed-off-by: jpalermo <[email protected]>
@jpalermo jpalermo merged commit 6bca790 into master Aug 1, 2022
jpalermo added a commit that referenced this pull request Aug 1, 2022
Update the templates used to generate packaging scripts and update
additional bundle flags

Also update the cpi binary to use the new bundle flags

Signed-off-by: Joseph Palermo <[email protected]>
Co-authored-by: Joseph Palermo <[email protected]>
jpalermo added a commit that referenced this pull request Aug 1, 2022
We must cd into the package before setting the bundle config so
the options persist into the src directory for when we run `bundle exec`
later.

Signed-off-by: Joseph Palermo <[email protected]>
Co-authored-by: Joseph Palermo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants