Hi BoltOps Community,
We are running Terraspace in Azure DevOps pipeline using the Microsoft-hosted agents (using ubuntu-latest). With the MS-hosted agent, everytime the pipeline runs, it starts with a “blank” VM, and we have to install Terraspace (which we’ve embedded to our process). This is how we’re installing Terraspace on the agent:
sudo gem install terraspace
sudo gem install terraspace_plugin_aws
sudo gem install bundler # This appears to be a dependency
Interestingly, it was still working around 8AM AEST today and it stopped working around 10AM AEST today. While the installation itself does not appear to error, when terraspace
is invoked, it produces an error. I don’t believe this is a result of the new version of terraspace (0.6.20) - as we have pipelines running using terraspace 0.6.20 before we encountered the error.
This is the output of doing the installation (as per the installation steps above)
**Gem install terraspace output:**
Successfully installed concurrent-ruby-1.1.9
Successfully installed i18n-1.8.11
Successfully installed tzinfo-2.0.4
Successfully installed activesupport-7.0.0
Successfully installed text-table-1.2.4
Successfully installed zeitwerk-2.5.1
Successfully installed cli-format-0.2.0
Successfully installed deep_merge-1.2.1
Successfully installed rainbow-3.0.0
Successfully installed dsl_evaluator-0.1.3
Building native extensions. This could take a while...
unable to convert "\xDB" from ASCII-8BIT to UTF-8 for lib/google/protobuf/descriptor_pb.rb, skipping
Successfully installed eventmachine-1.2.7
Successfully installed eventmachine-tail-0.6.5
Successfully installed graph-2.10.0
Successfully installed rhcl-0.1.0
Successfully installed hcl_parser-0.2.1
Successfully installed tilt-2.0.10
Successfully installed render_me_pretty-0.8.3
Successfully installed nokogiri-1.12.5-x86_64-linux
Successfully installed thor-1.1.0
Successfully installed terraspace-bundler-0.4.3
Successfully installed tty-tree-0.4.0
Successfully installed aws-sdk-dynamodb-1.69.0
Successfully installed aws-sdk-secretsmanager-1.54.0
Successfully installed aws-sdk-ssm-1.126.0
Successfully installed aws_data-0.1.1
Successfully installed s3-secure-0.5.1
Successfully installed terraspace_plugin_aws-0.3.3
Successfully installed connection_pool-2.2.5
Successfully installed net-http-persistent-4.0.1
Successfully installed azure-storage-common-2.0.4
Successfully installed azure-storage-blob-2.0.3
Successfully installed azure_info-0.1.2
Successfully installed timeliness-0.3.10
Successfully installed ms_rest-0.7.6
Successfully installed ms_rest_azure-0.12.0
Successfully installed azure_mgmt_resources-0.18.2
Successfully installed azure_mgmt_storage-0.23.0
Successfully installed terraspace_plugin_azurerm-0.3.2
Successfully installed gcp_data-0.2.0
Successfully installed google-apis-cloudresourcemanager_v1-0.18.0
Successfully installed google-cloud-resource_manager-0.36.2
Successfully installed google-protobuf-3.19.1-x86_64-linux
Successfully installed googleapis-common-protos-types-1.3.0
Successfully installed grpc-1.42.0-x86_64-linux
Successfully installed googleapis-common-protos-1.3.12
Successfully installed gapic-common-0.7.0
Successfully installed grpc-google-iam-v1-1.0.0
Successfully installed google-cloud-secret_manager-v1-0.11.2
Successfully installed google-cloud-secret_manager-v1beta1-0.8.4
Successfully installed google-cloud-secret_manager-1.1.2
Successfully installed terraspace_plugin_google-0.3.2
Successfully installed rspec-support-3.10.3
Successfully installed rspec-core-3.10.1
Successfully installed diff-lcs-1.4.4
Successfully installed rspec-expectations-3.10.1
Successfully installed rspec-mocks-3.10.2
Successfully installed rspec-3.10.0
Successfully installed rspec-terraspace-0.3.0
Successfully installed terraspace-0.6.19
Parsing documentation for concurrent-ruby-1.1.9
Installing ri documentation for concurrent-ruby-1.1.9
Parsing documentation for i18n-1.8.11
Installing ri documentation for i18n-1.8.11
Parsing documentation for tzinfo-2.0.4
Installing ri documentation for tzinfo-2.0.4
Parsing documentation for activesupport-7.0.0
Installing ri documentation for activesupport-7.0.0
Parsing documentation for text-table-1.2.4
Installing ri documentation for text-table-1.2.4
Parsing documentation for zeitwerk-2.5.1
Installing ri documentation for zeitwerk-2.5.1
Parsing documentation for cli-format-0.2.0
Installing ri documentation for cli-format-0.2.0
Parsing documentation for deep_merge-1.2.1
Installing ri documentation for deep_merge-1.2.1
Parsing documentation for rainbow-3.0.0
Installing ri documentation for rainbow-3.0.0
Parsing documentation for dsl_evaluator-0.1.3
Installing ri documentation for dsl_evaluator-0.1.3
Parsing documentation for eventmachine-1.2.7
Installing ri documentation for eventmachine-1.2.7
Parsing documentation for eventmachine-tail-0.6.5
Installing ri documentation for eventmachine-tail-0.6.5
Parsing documentation for graph-2.10.0
Installing ri documentation for graph-2.10.0
Parsing documentation for rhcl-0.1.0
Installing ri documentation for rhcl-0.1.0
Parsing documentation for hcl_parser-0.2.1
Installing ri documentation for hcl_parser-0.2.1
Parsing documentation for tilt-2.0.10
Installing ri documentation for tilt-2.0.10
Parsing documentation for render_me_pretty-0.8.3
Installing ri documentation for render_me_pretty-0.8.3
Parsing documentation for nokogiri-1.12.5-x86_64-linux
Installing ri documentation for nokogiri-1.12.5-x86_64-linux
Parsing documentation for thor-1.1.0
Installing ri documentation for thor-1.1.0
Parsing documentation for terraspace-bundler-0.4.3
Installing ri documentation for terraspace-bundler-0.4.3
Parsing documentation for tty-tree-0.4.0
Installing ri documentation for tty-tree-0.4.0
Parsing documentation for aws-sdk-dynamodb-1.69.0
Installing ri documentation for aws-sdk-dynamodb-1.69.0
Parsing documentation for aws-sdk-secretsmanager-1.54.0
Installing ri documentation for aws-sdk-secretsmanager-1.54.0
Parsing documentation for aws-sdk-ssm-1.126.0
Installing ri documentation for aws-sdk-ssm-1.126.0
Parsing documentation for aws_data-0.1.1
Installing ri documentation for aws_data-0.1.1
Parsing documentation for s3-secure-0.5.1
Installing ri documentation for s3-secure-0.5.1
Parsing documentation for terraspace_plugin_aws-0.3.3
Installing ri documentation for terraspace_plugin_aws-0.3.3
Parsing documentation for connection_pool-2.2.5
Installing ri documentation for connection_pool-2.2.5
Parsing documentation for net-http-persistent-4.0.1
Installing ri documentation for net-http-persistent-4.0.1
Parsing documentation for azure-storage-common-2.0.4
Installing ri documentation for azure-storage-common-2.0.4
Parsing documentation for azure-storage-blob-2.0.3
Installing ri documentation for azure-storage-blob-2.0.3
Parsing documentation for azure_info-0.1.2
Installing ri documentation for azure_info-0.1.2
Parsing documentation for timeliness-0.3.10
Installing ri documentation for timeliness-0.3.10
Parsing documentation for ms_rest-0.7.6
Installing ri documentation for ms_rest-0.7.6
Parsing documentation for ms_rest_azure-0.12.0
Installing ri documentation for ms_rest_azure-0.12.0
Parsing documentation for azure_mgmt_resources-0.18.2
Installing ri documentation for azure_mgmt_resources-0.18.2
Parsing documentation for azure_mgmt_storage-0.23.0
Installing ri documentation for azure_mgmt_storage-0.23.0
Parsing documentation for terraspace_plugin_azurerm-0.3.2
Installing ri documentation for terraspace_plugin_azurerm-0.3.2
Parsing documentation for gcp_data-0.2.0
Installing ri documentation for gcp_data-0.2.0
Parsing documentation for google-apis-cloudresourcemanager_v1-0.18.0
Installing ri documentation for google-apis-cloudresourcemanager_v1-0.18.0
Parsing documentation for google-cloud-resource_manager-0.36.2
Installing ri documentation for google-cloud-resource_manager-0.36.2
Parsing documentation for google-protobuf-3.19.1-x86_64-linux
Installing ri documentation for google-protobuf-3.19.1-x86_64-linux
Parsing documentation for googleapis-common-protos-types-1.3.0
Installing ri documentation for googleapis-common-protos-types-1.3.0
Parsing documentation for grpc-1.42.0-x86_64-linux
Installing ri documentation for grpc-1.42.0-x86_64-linux
Parsing documentation for googleapis-common-protos-1.3.12
Installing ri documentation for googleapis-common-protos-1.3.12
Parsing documentation for gapic-common-0.7.0
Installing ri documentation for gapic-common-0.7.0
Parsing documentation for grpc-google-iam-v1-1.0.0
Installing ri documentation for grpc-google-iam-v1-1.0.0
Parsing documentation for google-cloud-secret_manager-v1-0.11.2
Installing ri documentation for google-cloud-secret_manager-v1-0.11.2
Parsing documentation for google-cloud-secret_manager-v1beta1-0.8.4
Installing ri documentation for google-cloud-secret_manager-v1beta1-0.8.4
Parsing documentation for google-cloud-secret_manager-1.1.2
Installing ri documentation for google-cloud-secret_manager-1.1.2
Parsing documentation for terraspace_plugin_google-0.3.2
Installing ri documentation for terraspace_plugin_google-0.3.2
Parsing documentation for rspec-support-3.10.3
Installing ri documentation for rspec-support-3.10.3
Parsing documentation for rspec-core-3.10.1
Installing ri documentation for rspec-core-3.10.1
Parsing documentation for diff-lcs-1.4.4
Installing ri documentation for diff-lcs-1.4.4
Parsing documentation for rspec-expectations-3.10.1
Installing ri documentation for rspec-expectations-3.10.1
Parsing documentation for rspec-mocks-3.10.2
Installing ri documentation for rspec-mocks-3.10.2
Parsing documentation for rspec-3.10.0
Installing ri documentation for rspec-3.10.0
Parsing documentation for rspec-terraspace-0.3.0
Installing ri documentation for rspec-terraspace-0.3.0
Parsing documentation for terraspace-0.6.19
Installing ri documentation for terraspace-0.6.19
Done installing documentation for concurrent-ruby, i18n, tzinfo, activesupport, text-table, zeitwerk, cli-format, deep_merge, rainbow, dsl_evaluator, eventmachine, eventmachine-tail, graph, rhcl, hcl_parser, tilt, render_me_pretty, nokogiri, thor, terraspace-bundler, tty-tree, aws-sdk-dynamodb, aws-sdk-secretsmanager, aws-sdk-ssm, aws_data, s3-secure, terraspace_plugin_aws, connection_pool, net-http-persistent, azure-storage-common, azure-storage-blob, azure_info, timeliness, ms_rest, ms_rest_azure, azure_mgmt_resources, azure_mgmt_storage, terraspace_plugin_azurerm, gcp_data, google-apis-cloudresourcemanager_v1, google-cloud-resource_manager, google-protobuf, googleapis-common-protos-types, grpc, googleapis-common-protos, gapic-common, grpc-google-iam-v1, google-cloud-secret_manager-v1, google-cloud-secret_manager-v1beta1, google-cloud-secret_manager, terraspace_plugin_google, rspec-support, rspec-core, diff-lcs, rspec-expectations, rspec-mocks, rspec, rspec-terraspace, terraspace after 69 seconds
59 gems installed
**Gem install terraspace_plugin_aws output:**
Successfully installed terraspace_plugin_aws-0.3.3
Parsing documentation for terraspace_plugin_aws-0.3.3
Done installing documentation for terraspace_plugin_aws after 0 seconds
1 gem installed
**Gem install bundler output:**
Successfully installed bundler-2.2.33
Parsing documentation for bundler-2.2.33
Installing ri documentation for bundler-2.2.33
Done installing documentation for bundler after 1 seconds
1 gem installed
But this is what we’re getting when terraspace
is invoked. E.g. running terraspace version
/var/lib/gems/2.7.0/gems/activesupport-7.0.0/lib/active_support/xml_mini.rb:184:in `current_thread_backend': uninitialized constant ActiveSupport::XmlMini::IsolatedExecutionState (NameError)
from /var/lib/gems/2.7.0/gems/activesupport-7.0.0/lib/active_support/xml_mini.rb:103:in `backend='
from /var/lib/gems/2.7.0/gems/activesupport-7.0.0/lib/active_support/xml_mini.rb:201:in `<module:ActiveSupport>'
from /var/lib/gems/2.7.0/gems/activesupport-7.0.0/lib/active_support/xml_mini.rb:11:in `<top (required)>'
from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
from /var/lib/gems/2.7.0/gems/zeitwerk-2.5.1/lib/zeitwerk/kernel.rb:35:in `require'
from /var/lib/gems/2.7.0/gems/activesupport-7.0.0/lib/active_support/core_ext/hash/conversions.rb:3:in `<top (required)>'
from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
from /var/lib/gems/2.7.0/gems/zeitwerk-2.5.1/lib/zeitwerk/kernel.rb:35:in `require'
from /var/lib/gems/2.7.0/gems/activesupport-7.0.0/lib/active_support/core_ext/hash.rb:3:in `<top (required)>'
from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
from /var/lib/gems/2.7.0/gems/zeitwerk-2.5.1/lib/zeitwerk/kernel.rb:35:in `require'
from /var/lib/gems/2.7.0/gems/terraspace-0.6.19/lib/terraspace.rb:10:in `<top (required)>'
from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
from /var/lib/gems/2.7.0/gems/terraspace-0.6.19/exe/terraspace:11:in `<top (required)>'
from /usr/local/bin/terraspace:23:in `load'
from /usr/local/bin/terraspace:23:in `<main>'
I’ve also tried installing an older version of terraspace using sudo gem install terraspace -v 0.6.19
, and it still produces the same/similar error. I suspect it might be something that’s changed on the MS-hosted agent side, but I’m not sure. However, I was wondering if the error message might mean anything to anyone, and there is a solution for it?
Many thanks,
James