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

Initial implementation of hypervisor #10 #11

Merged
merged 7 commits into from
Sep 22, 2023

Conversation

oneiros
Copy link
Contributor

@oneiros oneiros commented Nov 21, 2022

Offers limited options to customize server creation (choosing an image, server type and location by name).

SSH keys are being generated on-the-fly building on the ssh_data gem.

See #10 for details.

Offers limited options to customize server creation
(choosing an image, server type and location by name).

SSH keys are being generated on-the-fly building on
the `ssh_data` gem.
@oneiros oneiros mentioned this pull request Nov 21, 2022
@codecov
Copy link

codecov bot commented Nov 21, 2022

Codecov Report

Base: 0.00% // Head: 92.30% // Increases project coverage by +92.30% 🎉

Coverage data is based on head (9de4aa7) compared to base (0866ee3).
Patch coverage: 94.73% of modified lines in pull request are covered.

❗ Current head 9de4aa7 differs from pull request most recent head 50a8a4a. Consider uploading reports for the commit 50a8a4a to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           master      #11       +/-   ##
===========================================
+ Coverage    0.00%   92.30%   +92.30%     
===========================================
  Files           2        3        +1     
  Lines          26       78       +52     
===========================================
+ Hits            0       72       +72     
+ Misses         26        6       -20     
Impacted Files Coverage Δ
lib/beaker-hcloud/version.rb 0.00% <0.00%> (ø)
lib/beaker/hypervisor/hcloud.rb 94.44% <94.44%> (ø)
lib/beaker-hcloud/ssh_data_patches.rb 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

README.md Outdated
You need to create an API token using Hetzner's cloud console. Make
sure to create the token in the correct project.

`beaker-hcloud` expects the token to be in the `HCLOUD_TOKEN`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ekohl when we introduce a new environment variable, do we want it prefixed with BEAKER_?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like a good idea to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay, but I finally got around to renaming the environment variable.

s.add_runtime_dependency 'hcloud', '>= 1.0.3', '< 2.0.0'
s.add_runtime_dependency 'ssh_data', '~> 1.3'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a bit dissapointing that the ed25519 isn't sufficient here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, the ed25519 gem is only about the algorithm itself. It knows nothing about SSH. The (to me) disappointing bit was that no existing gem seems to support the key generation / serialization of ed25519 keys. net-ssh does not include key generation at all. There is a gem called sshkey which would be perfect but only supports RSA/DSA (with partial support for reading ed25519 keys).

ssh_data was the closest thing I could find for what we need, but it still lacked the serialization of the private key.

@bastelfreak bastelfreak added the enhancement New feature or request label Dec 7, 2022
@bastelfreak
Copy link
Member

Sorry for the slow response here, I was busy with other stuff :(.I gave this a try in our puppet-hdm module:

voxpupuli/puppet-hdm#18

This fails because our github action doesn't support a custom image option (yet). This results in the following error:

bastelfreak@bastelfreak-nb ~/code/puppet-hdm $ BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_setfile=ubuntu1804-64{hostname=ubuntu1804-64.example.com} BEAKER_HYPERVISOR=hcloud bundle exec rake beakerTo use retry middleware with Faraday v2.0+, install `faraday-retry` gem
/usr/bin/ruby -I/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib:/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/rspec-support-3.12.0/lib /home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/rspec-core-3.12.0/exe/rspec --pattern spec/acceptance/\*\*/\*_spec.rb
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/beaker-rspec-7.1.0/lib/beaker-rspec/helpers/serverspec.rb:43: warning: already initialized constant Module::VALID_OPTIONS_KEYS
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/specinfra-2.83.4/lib/specinfra/configuration.rb:4: warning: previous definition of VALID_OPTIONS_KEYS was here

Hosts file 'ubuntu1804-64{hostname=ubuntu1804-64.example.com}' does not exist.
Trying as beaker-hostgenerator input.

Hypervisor for ubuntu1804-64.example.com is hcloud
Beaker::Hypervisor, found some hcloud boxes to create
Provisioning hcloud
Generating SSH keypair
Creating hcloud SSH key
provisioning ubuntu1804-64.example.com
invalid input in fields 'source_server', 'image'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/hcloud-1.1.0/lib/hcloud/typhoeus_ext.rb:54:in `check_for_error'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/hcloud-1.1.0/lib/hcloud/client.rb:150:in `block in request'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/typhoeus-1.4.0/lib/typhoeus/request/callbacks.rb:146:in `block in execute_callbacks'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/typhoeus-1.4.0/lib/typhoeus/request/callbacks.rb:145:in `each'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/typhoeus-1.4.0/lib/typhoeus/request/callbacks.rb:145:in `execute_callbacks'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/typhoeus-1.4.0/lib/typhoeus/request/operations.rb:35:in `finish'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/typhoeus-1.4.0/lib/typhoeus/easy_factory.rb:164:in `block in set_callback'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/ethon-0.16.0/lib/ethon/easy/response_callbacks.rb:74:in `block in complete'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/ethon-0.16.0/lib/ethon/easy/response_callbacks.rb:74:in `each'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/ethon-0.16.0/lib/ethon/easy/response_callbacks.rb:74:in `complete'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/ethon-0.16.0/lib/ethon/easy/operations.rb:34:in `perform'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/typhoeus-1.4.0/lib/typhoeus/request/operations.rb:16:in `run'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/typhoeus-1.4.0/lib/typhoeus/request/cacheable.rb:18:in `run'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/typhoeus-1.4.0/lib/typhoeus/request/block_connection.rb:31:in `run'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/typhoeus-1.4.0/lib/typhoeus/request/stubbable.rb:25:in `run'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/typhoeus-1.4.0/lib/typhoeus/request/before.rb:26:in `run'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/hcloud-1.1.0/lib/hcloud/client.rb:117:in `prepare_request'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/hcloud-1.1.0/lib/hcloud/abstract_resource.rb:9:in `prepare_request'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/hcloud-1.1.0/lib/hcloud/server_resource.rb:18:in `create'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/bundler/gems/beaker-hcloud-6d0512902e85/lib/beaker/hypervisor/hcloud.rb:76:in `create_server'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/bundler/gems/beaker-hcloud-6d0512902e85/lib/beaker/hypervisor/hcloud.rb:28:in `block in provision'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/bundler/gems/beaker-hcloud-6d0512902e85/lib/beaker/hypervisor/hcloud.rb:27:in `each'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/bundler/gems/beaker-hcloud-6d0512902e85/lib/beaker/hypervisor/hcloud.rb:27:in `provision'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/beaker-4.38.1/lib/beaker/hypervisor.rb:37:in `create'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/beaker-4.38.1/lib/beaker/network_manager.rb:72:in `block in provision'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/beaker-4.38.1/lib/beaker/network_manager.rb:71:in `each_key'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/beaker-4.38.1/lib/beaker/network_manager.rb:71:in `provision'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/beaker-rspec-7.1.0/lib/beaker-rspec/beaker_shim.rb:35:in `provision'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/beaker-rspec-7.1.0/lib/beaker-rspec/spec_helper.rb:57:in `block in <top (required)>'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core.rb:98:in `configure'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/beaker-rspec-7.1.0/lib/beaker-rspec/spec_helper.rb:5:in `<top (required)>'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/beaker-rspec-7.1.0/lib/beaker-rspec.rb:5:in `require'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/beaker-rspec-7.1.0/lib/beaker-rspec.rb:5:in `<module:BeakerRSpec>'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/beaker-rspec-7.1.0/lib/beaker-rspec.rb:1:in `<top (required)>'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/voxpupuli-acceptance-1.2.0/lib/voxpupuli/acceptance/spec_helper_acceptance.rb:12:in `require'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/voxpupuli-acceptance-1.2.0/lib/voxpupuli/acceptance/spec_helper_acceptance.rb:12:in `configure_beaker'
/home/bastelfreak/code/puppet-hdm/spec/spec_helper_acceptance.rb:8:in `<top (required)>'
/home/bastelfreak/code/puppet-hdm/spec/acceptance/docker_spec.rb:3:in `require'
/home/bastelfreak/code/puppet-hdm/spec/acceptance/docker_spec.rb:3:in `<top (required)>'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/configuration.rb:2117:in `load'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/configuration.rb:2117:in `load_file_handling_errors'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/configuration.rb:1617:in `block in load_spec_files'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/configuration.rb:1615:in `each'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/configuration.rb:1615:in `load_spec_files'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:102:in `setup'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:86:in `run'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:71:in `run'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:45:in `invoke'
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/rspec-core-3.12.0/exe/rspec:4:in `<main>'
/usr/bin/ruby -I/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib:/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/rspec-support-3.12.0/lib /home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/rspec-core-3.12.0/exe/rspec --pattern spec/acceptance/\*\*/\*_spec.rb failed
bastelfreak@bastelfreak-nb ~/code/puppet-hdm $

When I pass the image attribute it works and creates a VM:

bastelfreak@bastelfreak-nb ~/code/puppet-hdm $ BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_setfile=ubuntu1804-64{hostname=ubuntu1804-64.example.com,image=ubuntu-20.04} BEAKER_HYPERVISOR=hcloud bundle exec rake beakerTo use retry middleware with Faraday v2.0+, install `faraday-retry` gem
/usr/bin/ruby -I/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib:/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/rspec-support-3.12.0/lib /home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/rspec-core-3.12.0/exe/rspec --pattern spec/acceptance/\*\*/\*_spec.rb
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/beaker-rspec-7.1.0/lib/beaker-rspec/helpers/serverspec.rb:43: warning: already initialized constant Module::VALID_OPTIONS_KEYS
/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/specinfra-2.83.4/lib/specinfra/configuration.rb:4: warning: previous definition of VALID_OPTIONS_KEYS was here

Hosts file 'ubuntu1804-64{hostname=ubuntu1804-64.example.com,image=ubuntu-20.04}' does not exist.
Trying as beaker-hostgenerator input.

Hypervisor for ubuntu1804-64.example.com is hcloud
Beaker::Hypervisor, found some hcloud boxes to create
Provisioning hcloud
Generating SSH keypair
Creating hcloud SSH key
provisioning ubuntu1804-64.example.com
Done provisioning hcloud

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) 09:47:40$ dpkg -s curl
  Attempting ssh connection to 159.69.147.58, user: root, opts: {:config=>false, :verify_host_key=>false, :auth_methods=>["publickey"], :port=>22, :forward_agent=>true, :keys=>["/tmp/Beaker-bastelfreak-bastelfreak-nb-fritz-box-6290777939-2022-12-07_09_47_33_90444055520221207-21124-w52t1v"], :user_known_hosts_file=>"/home/bastelfreak/.ssh/known_hosts", :keepalive=>true}
  Warning: Try 1 -- Host 159.69.147.58 unreachable: Errno::EHOSTUNREACH - No route to host - connect(2) for 159.69.147.58:22
  Warning: Trying again in 3 seconds
  Attempting ssh connection to 159.69.147.58, user: root, opts: {:config=>false, :verify_host_key=>false, :auth_methods=>["publickey"], :port=>22, :forward_agent=>true, :keys=>["/tmp/Beaker-bastelfreak-bastelfreak-nb-fritz-box-6290777939-2022-12-07_09_47_33_90444055520221207-21124-w52t1v"], :user_known_hosts_file=>"/home/bastelfreak/.ssh/known_hosts", :keepalive=>true, :logger=>#<Logger:0x00000e2ba7c9d390 @level=4, @progname=nil, @default_formatter=#<Logger::Formatter:0x00000e2ba7c9d250 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x00000e2ba7c9d098 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDERR>>, @binmode=false, @mon_data=#<Monitor:0x00000e2ba7c9cfd0>, @mon_data_owner_object_id=56420>>, :password_prompt=>#<Net::SSH::Prompt:0x00000e2ba7c9cdc8>, :user=>"root"}
  Warning: Try 2 -- Host 159.69.147.58 unreachable: Errno::EHOSTUNREACH - No route to host - connect(2) for 159.69.147.58:22
  Warning: Trying again in 5 seconds
  Attempting ssh connection to 159.69.147.58, user: root, opts: {:config=>false, :verify_host_key=>false, :auth_methods=>["publickey"], :port=>22, :forward_agent=>true, :keys=>["/tmp/Beaker-bastelfreak-bastelfreak-nb-fritz-box-6290777939-2022-12-07_09_47_33_90444055520221207-21124-w52t1v"], :user_known_hosts_file=>"/home/bastelfreak/.ssh/known_hosts", :keepalive=>true, :logger=>#<Logger:0x00000e2ba7c9d390 @level=4, @progname=nil, @default_formatter=#<Logger::Formatter:0x00000e2ba7c9d250 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x00000e2ba7c9d098 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDERR>>, @binmode=false, @mon_data=#<Monitor:0x00000e2ba7c9cfd0>, @mon_data_owner_object_id=56420>>, :password_prompt=>#<Net::SSH::Prompt:0x00000e2ba7c9cdc8>, :user=>"root"}
  Warning: Try 3 -- Host 159.69.147.58 unreachable: Errno::ECONNREFUSED - Connection refused - connect(2) for 159.69.147.58:22
  Warning: Trying again in 8 seconds
  Attempting ssh connection to 159.69.147.58, user: root, opts: {:config=>false, :verify_host_key=>false, :auth_methods=>["publickey"], :port=>22, :forward_agent=>true, :keys=>["/tmp/Beaker-bastelfreak-bastelfreak-nb-fritz-box-6290777939-2022-12-07_09_47_33_90444055520221207-21124-w52t1v"], :user_known_hosts_file=>"/home/bastelfreak/.ssh/known_hosts", :keepalive=>true, :logger=>#<Logger:0x00000e2ba7c9d390 @level=4, @progname=nil, @default_formatter=#<Logger::Formatter:0x00000e2ba7c9d250 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x00000e2ba7c9d098 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDERR>>, @binmode=false, @mon_data=#<Monitor:0x00000e2ba7c9cfd0>, @mon_data_owner_object_id=56420>>, :password_prompt=>#<Net::SSH::Prompt:0x00000e2ba7c9cdc8>, :user=>"root"}
verify_host_key: false is deprecated, use :never
  Package: curl
  Status: install ok installed
  Priority: optional
  Section: web
  Installed-Size: 402
  Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
  Architecture: amd64
  Multi-Arch: foreign
  Version: 7.68.0-1ubuntu2.12
  Depends: libc6 (>= 2.17), libcurl4 (= 7.68.0-1ubuntu2.12), zlib1g (>= 1:1.1.4)
  Description: command line tool for transferring data with URL syntax
   curl is a command line tool for transferring data with URL syntax, supporting
   DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3,
   POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP.
   .
   curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form
   based upload, proxies, cookies, user+password authentication (Basic, Digest,
   NTLM, Negotiate, kerberos...), file transfer resume, proxy tunneling and a
   busload of other useful tricks.
  Homepage: http://curl.haxx.se
  Original-Maintainer: Alessandro Ghedini <ghedo@debian.org>

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) executed in 23.02 seconds

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) 09:48:03$ dpkg -s ntpdate
  dpkg-query: package 'ntpdate' is not installed and no information is available
  Use dpkg --info (= dpkg-deb --info) to examine archive files.

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) executed in 0.08 seconds
Exited: 1

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) 09:48:03$ apt-get update
  Get:1 https://mirror.hetzner.com/ubuntu/packages focal InRelease [265 kB]
  Get:2 https://mirror.hetzner.com/ubuntu/packages focal-updates InRelease [114 kB]
  Get:3 https://mirror.hetzner.com/ubuntu/packages focal-backports InRelease [108 kB]
  Get:4 https://mirror.hetzner.com/ubuntu/security focal-security InRelease [114 kB]
  Get:5 https://mirror.hetzner.com/ubuntu/packages focal/main amd64 Packages [970 kB]
  Get:6 https://mirror.hetzner.com/ubuntu/packages focal/main Translation-en [506 kB]
  Get:7 https://mirror.hetzner.com/ubuntu/packages focal/main amd64 c-n-f Metadata [29.5 kB]
  Get:8 https://mirror.hetzner.com/ubuntu/packages focal/restricted amd64 Packages [22.0 kB]
  Get:9 https://mirror.hetzner.com/ubuntu/packages focal/restricted Translation-en [6,212 B]
  Get:10 https://mirror.hetzner.com/ubuntu/packages focal/restricted amd64 c-n-f Metadata [392 B]
  Get:11 https://mirror.hetzner.com/ubuntu/packages focal/universe amd64 Packages [8,628 kB]
  Get:12 https://mirror.hetzner.com/ubuntu/packages focal/universe Translation-en [5,124 kB]
  Get:13 https://mirror.hetzner.com/ubuntu/packages focal/universe amd64 c-n-f Metadata [265 kB]
  Get:14 https://mirror.hetzner.com/ubuntu/packages focal/multiverse amd64 Packages [144 kB]
  Get:15 https://mirror.hetzner.com/ubuntu/packages focal/multiverse Translation-en [104 kB]
  Get:16 https://mirror.hetzner.com/ubuntu/packages focal/multiverse amd64 c-n-f Metadata [9,136 B]
  Get:17 https://mirror.hetzner.com/ubuntu/packages focal-updates/main amd64 Packages [2,263 kB]
  Get:18 https://mirror.hetzner.com/ubuntu/packages focal-updates/main Translation-en [394 kB]
  Get:19 https://mirror.hetzner.com/ubuntu/packages focal-updates/main amd64 c-n-f Metadata [16.1 kB]
  Get:20 https://mirror.hetzner.com/ubuntu/packages focal-updates/restricted amd64 Packages [1,470 kB]
  Get:21 https://mirror.hetzner.com/ubuntu/packages focal-updates/restricted Translation-en [208 kB]
  Get:22 https://mirror.hetzner.com/ubuntu/packages focal-updates/restricted amd64 c-n-f Metadata [592 B]
  Get:23 https://mirror.hetzner.com/ubuntu/packages focal-updates/universe amd64 Packages [1,008 kB]
  Get:24 https://mirror.hetzner.com/ubuntu/packages focal-updates/universe Translation-en [234 kB]
  Get:25 https://mirror.hetzner.com/ubuntu/packages focal-updates/universe amd64 c-n-f Metadata [23.2 kB]
  Get:26 https://mirror.hetzner.com/ubuntu/packages focal-updates/multiverse amd64 Packages [24.5 kB]
  Get:27 https://mirror.hetzner.com/ubuntu/packages focal-updates/multiverse Translation-en [7,380 B]
  Get:28 https://mirror.hetzner.com/ubuntu/packages focal-updates/multiverse amd64 c-n-f Metadata [592 B]
  Get:29 https://mirror.hetzner.com/ubuntu/packages focal-backports/main amd64 Packages [45.7 kB]
  Get:30 https://mirror.hetzner.com/ubuntu/packages focal-backports/main Translation-en [16.3 kB]
  Get:31 https://mirror.hetzner.com/ubuntu/packages focal-backports/main amd64 c-n-f Metadata [1,420 B]
  Get:32 https://mirror.hetzner.com/ubuntu/packages focal-backports/restricted amd64 c-n-f Metadata [116 B]
  Get:33 https://mirror.hetzner.com/ubuntu/packages focal-backports/universe amd64 Packages [24.9 kB]
  Get:34 https://mirror.hetzner.com/ubuntu/packages focal-backports/universe Translation-en [16.3 kB]
  Get:35 https://mirror.hetzner.com/ubuntu/packages focal-backports/universe amd64 c-n-f Metadata [880 B]
  Get:36 https://mirror.hetzner.com/ubuntu/packages focal-backports/multiverse amd64 c-n-f Metadata [116 B]
  Get:37 https://mirror.hetzner.com/ubuntu/security focal-security/main amd64 Packages [1,890 kB]
  Get:38 https://mirror.hetzner.com/ubuntu/security focal-security/main Translation-en [310 kB]
  Get:39 https://mirror.hetzner.com/ubuntu/security focal-security/main amd64 c-n-f Metadata [11.5 kB]
  Get:40 https://mirror.hetzner.com/ubuntu/security focal-security/restricted amd64 Packages [1,383 kB]
  Get:41 https://mirror.hetzner.com/ubuntu/security focal-security/restricted Translation-en [195 kB]
  Get:42 https://mirror.hetzner.com/ubuntu/security focal-security/restricted amd64 c-n-f Metadata [596 B]
  Get:43 https://mirror.hetzner.com/ubuntu/security focal-security/universe amd64 Packages [777 kB]
  Get:44 https://mirror.hetzner.com/ubuntu/security focal-security/universe Translation-en [150 kB]
  Get:45 https://mirror.hetzner.com/ubuntu/security focal-security/universe amd64 c-n-f Metadata [16.9 kB]
  Get:46 https://mirror.hetzner.com/ubuntu/security focal-security/multiverse amd64 Packages [22.2 kB]
  Get:47 https://mirror.hetzner.com/ubuntu/security focal-security/multiverse Translation-en [5,464 B]
  Get:48 https://mirror.hetzner.com/ubuntu/security focal-security/multiverse amd64 c-n-f Metadata [516 B]
  Fetched 26.9 MB in 5s (5,245 kB/s)
  Reading package lists...

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) executed in 11.71 seconds

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) 09:48:15$ apt-get install --force-yes  -y ntpdate
  Reading package lists...
  Building dependency tree...
  Reading state information...
  The following NEW packages will be installed:
    ntpdate
  0 upgraded, 1 newly installed, 0 to remove and 68 not upgraded.
  Need to get 48.8 kB of archives.
  After this operation, 178 kB of additional disk space will be used.
  Get:1 https://mirror.hetzner.com/ubuntu/packages focal-updates/universe amd64 ntpdate amd64 1:4.2.8p12+dfsg-3ubuntu4.20.04.1 [48.8 kB]
  debconf: unable to initialize frontend: Dialog
  debconf: (TERM is not set, so the dialog frontend is not usable.)
  debconf: falling back to frontend: Readline
  debconf: unable to initialize frontend: Readline
  debconf: (This frontend requires a controlling tty.)
  debconf: falling back to frontend: Teletype
  dpkg-preconfigure: unable to re-open stdin:
  Fetched 48.8 kB in 0s (1,212 kB/s)
  Selecting previously unselected package ntpdate.
  (Reading database ...   (Reading database ... 5%  (Reading database ... 10%  (Reading database ... 15%  (Reading database ... 20%  (Reading database ... 25%  (Reading database ... 30%  (Reading database ... 35%  (Reading database ... 40%  (Reading database ... 45%  (Reading database ... 50%  (Reading database ... 55%  (Reading database ... 60%  (Reading database ... 65%  (Reading database ... 70%  (Reading database ... 75%  (Reading database ... 80%  (Reading database ... 85%  (Reading database ... 90%  (Reading database ... 95%  (Reading database ... 100%  (Reading database ...   36240 files and directories currently installed.)
  Preparing to unpack .../ntpdate_1%3a4.2.8p12+dfsg-3ubuntu4.20.04.1_amd64.deb ...
  Unpacking ntpdate (1:4.2.8p12+dfsg-3ubuntu4.20.04.1) ...
  Setting up ntpdate (1:4.2.8p12+dfsg-3ubuntu4.20.04.1) ...
  Processing triggers for man-db (2.9.1-1) ...
  W  :   --force-yes is deprecated, use one of the options starting with --allow instead.

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) executed in 3.91 seconds
setting local environment on ubuntu1804-64.example.com

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) 09:48:19$ mktemp -dt .XXXXXX
  /tmp/.eMdtkz

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) executed in 0.11 seconds

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) 09:48:19$ echo 'PermitUserEnvironment yes' | cat - /etc/ssh/sshd_config > /tmp/.eMdtkz/sshd_config.permit

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) executed in 0.07 seconds

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) 09:48:19$ mv /tmp/.eMdtkz/sshd_config.permit /etc/ssh/sshd_config

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) executed in 0.11 seconds

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) 09:48:19$ service ssh restart

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) executed in 0.15 seconds

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) 09:48:19$ mkdir -p ~/.ssh

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) executed in 0.11 seconds

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) 09:48:20$ chmod 0600 ~/.ssh

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) executed in 0.07 seconds

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) 09:48:20$ touch ~/.ssh/environment

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) executed in 0.11 seconds

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) 09:48:20$ grep ^PATH=.*\$PATH ~/.ssh/environment

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) executed in 0.07 seconds
Exited: 1

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) 09:48:20$ grep ^PATH= ~/.ssh/environment

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) executed in 0.10 seconds
Exited: 1

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) 09:48:20$ echo "PATH=$PATH" >> ~/.ssh/environment

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) executed in 0.06 seconds
will not mirror environment to /etc/profile.d on non-sles platform host
ssh connection to ubuntu1804-64.example.com has been terminated

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) 09:48:20$ cat ~/.ssh/environment
  Attempting ssh connection to 159.69.147.58, user: root, opts: {:config=>false, :verify_host_key=>false, :auth_methods=>["publickey"], :port=>22, :forward_agent=>true, :keys=>["/tmp/Beaker-bastelfreak-bastelfreak-nb-fritz-box-6290777939-2022-12-07_09_47_33_90444055520221207-21124-w52t1v"], :user_known_hosts_file=>"/home/bastelfreak/.ssh/known_hosts", :keepalive=>true, :logger=>#<Logger:0x00000e2ba7c9d390 @level=4, @progname=nil, @default_formatter=#<Logger::Formatter:0x00000e2ba7c9d250 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x00000e2ba7c9d098 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDERR>>, @binmode=false, @mon_data=#<Monitor:0x00000e2ba7c9cfd0>, @mon_data_owner_object_id=56420>>, :password_prompt=>#<Net::SSH::Prompt:0x00000e2ba7c9cdc8>, :user=>"root"}
verify_host_key: false is deprecated, use :never
  PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) executed in 0.62 seconds
Disabling updates.puppetlabs.com by modifying hosts file to resolve updates to 127.0.0.1 on static.58.147.69.159.clients.your-server.de

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) 09:48:21$ echo '127.0.0.1	updates.puppetlabs.com
' >> /etc/hosts

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) executed in 0.06 seconds

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) 09:48:21$ wget -O /tmp/puppet.deb https://apt.puppet.com/puppet6-release-bionic.deb
  --2022-12-07 08:48:20--  https://apt.puppet.com/puppet6-release-bionic.deb
  Resolving apt.puppet.com (apt.puppet.com)...   2600:9000:206f:7e00:1d:fc37:1cc0:93a1  ,   2600:9000:206f:1e00:1d:fc37:1cc0:93a1  ,   2600:9000:206f:b400:1d:fc37:1cc0:93a1  , ...
  Connecting to apt.puppet.com (apt.puppet.com)|2600:9000:206f:7e00:1d:fc37:1cc0:93a1|:443...   connected.
  HTTP request sent, awaiting response...   200 OK
  Length:   11700   (11K)   [application/x-debian-package]
  Saving to: ‘/tmp/puppet.deb’

       0K     .  .  .  .  .  .  .  .  .  .     .                                                                                                                                100%   23.5M  =0s
  2022-12-07 08:48:20 (23.5 MB/s) - ‘/tmp/puppet.deb’ saved [11700/11700]

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) executed in 0.10 seconds

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) 09:48:21$ dpkg -i --force-all /tmp/puppet.deb
  Selecting previously unselected package puppet6-release.
  (Reading database ... 36252 files and directories currently installed.)
  Preparing to unpack /tmp/puppet.deb ...
  Unpacking puppet6-release (6.0.0-22bionic) ...
  Setting up puppet6-release (6.0.0-22bionic) ...

  Configuration file '/etc/apt/sources.list.d/puppet6.list', does not exist on system.
  Installing new config file as you requested.

  Configuration file '/etc/apt/trusted.gpg.d/puppet6-keyring.gpg', does not exist on system.
  Installing new config file as you requested.

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) executed in 0.18 seconds

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) 09:48:21$ apt-get update
  Hit:1 https://mirror.hetzner.com/ubuntu/packages focal InRelease
  Hit:2 https://mirror.hetzner.com/ubuntu/packages focal-updates InRelease
  Hit:3 https://mirror.hetzner.com/ubuntu/packages focal-backports InRelease
  Hit:4 https://mirror.hetzner.com/ubuntu/security focal-security InRelease
  Get:5 http://apt.puppetlabs.com bionic InRelease [143 kB]
  Get:6 http://apt.puppetlabs.com bionic/puppet6 all Packages [29.3 kB]
  Get:7 http://apt.puppetlabs.com bionic/puppet6 amd64 Packages [75.7 kB]
  Fetched 248 kB in 1s (208 kB/s)
  Reading package lists...

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) executed in 6.39 seconds

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) 09:48:27$ echo "/opt/puppetlabs/bin"
  /opt/puppetlabs/bin

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) executed in 0.06 seconds

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) 09:48:28$ echo "/opt/puppetlabs/puppet/bin"
  /opt/puppetlabs/puppet/bin

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) executed in 0.10 seconds

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) 09:48:28$ grep ^PATH=.*\/opt\/puppetlabs\/bin:\/opt\/puppetlabs\/puppet\/bin ~/.ssh/environment

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) executed in 0.06 seconds
Exited: 1

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) 09:48:28$ grep ^PATH= ~/.ssh/environment
  PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) executed in 0.10 seconds

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) 09:48:28$ sed -i -e "s/^PATH=/PATH=\/opt\/puppetlabs\/bin:\/opt\/puppetlabs\/puppet\/bin:/" ~/.ssh/environment

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) executed in 0.06 seconds
will not mirror environment to /etc/profile.d on non-sles platform host

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) 09:48:28$ apt-get install --force-yes  -y puppet-agent
  Reading package lists...
  Building dependency tree...
  Reading state information...
  The following NEW packages will be installed:
    puppet-agent
  0 upgraded, 1 newly installed, 0 to remove and 68 not upgraded.
  Need to get 37.7 MB of archives.
  After this operation, 141 MB of additional disk space will be used.
  Get:1 http://apt.puppetlabs.com bionic/puppet6 amd64 puppet-agent amd64 6.28.0-1bionic [37.7 MB]
  debconf: unable to initialize frontend: Dialog
  debconf: (TERM is not set, so the dialog frontend is not usable.)
  debconf: falling back to frontend: Readline
  debconf: unable to initialize frontend: Readline
  debconf: (This frontend requires a controlling tty.)
  debconf: falling back to frontend: Teletype
  dpkg-preconfigure: unable to re-open stdin:
  Fetched 37.7 MB in 0s (76.9 MB/s)
  Selecting previously unselected package puppet-agent.
  (Reading database ...   (Reading database ... 5%  (Reading database ... 10%  (Reading database ... 15%  (Reading database ... 20%  (Reading database ... 25%  (Reading database ... 30%  (Reading database ... 35%  (Reading database ... 40%  (Reading database ... 45%  (Reading database ... 50%  (Reading database ... 55%  (Reading database ... 60%  (Reading database ... 65%  (Reading database ... 70%  (Reading database ... 75%  (Reading database ... 80%  (Reading database ... 85%  (Reading database ... 90%  (Reading database ... 95%  (Reading database ... 100%  (Reading database ...   36257 files and directories currently installed.)
  Preparing to unpack .../puppet-agent_6.28.0-1bionic_amd64.deb ...
  Unpacking puppet-agent (6.28.0-1bionic) ...
  Setting up puppet-agent (6.28.0-1bionic) ...
  Created symlink /etc/systemd/system/multi-user.target.wants/puppet.service → /lib/systemd/system/puppet.service.
  Created symlink /etc/systemd/system/multi-user.target.wants/pxp-agent.service → /lib/systemd/system/pxp-agent.service.
  Removed /etc/systemd/system/multi-user.target.wants/pxp-agent.service.
  Processing triggers for libc-bin (2.31-0ubuntu9.9) ...
  W  :   --force-yes is deprecated, use one of the options starting with --allow instead.

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) executed in 8.94 seconds

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) 09:48:37$ echo "/opt/puppetlabs/bin"
  /opt/puppetlabs/bin

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) executed in 0.06 seconds

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) 09:48:37$ echo "/opt/puppetlabs/puppet/bin"
  /opt/puppetlabs/puppet/bin

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) executed in 0.10 seconds

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) 09:48:37$ grep ^PATH=.*\/opt\/puppetlabs\/bin:\/opt\/puppetlabs\/puppet\/bin ~/.ssh/environment
  PATH=/opt/puppetlabs/bin:/opt/puppetlabs/puppet/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) executed in 0.06 seconds

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) 09:48:37$ echo /etc/puppetlabs/code/modules
  /etc/puppetlabs/code/modules

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) executed in 0.04 seconds
Using scp to transfer /home/bastelfreak/code/puppet-hdm to /etc/puppetlabs/code/modules/hdm
localhost $ scp /home/bastelfreak/code/puppet-hdm ubuntu1804-64.example.com:/etc/puppetlabs/code/modules {:ignore => ["/.bundle", "/.git", "/.idea", "/.vagrant", "/.vendor", "/vendor", "/acceptance", "/bundle", "/spec", "/tests", "/log", "/.svn", "/junit", "/pkg", "/example", "/tmp", ".", ".."]}
going to ignore (?-mix:((\/|\A)\/\.bundle(\/|\z))|((\/|\A)\/\.git(\/|\z))|((\/|\A)\/\.idea(\/|\z))|((\/|\A)\/\.vagrant(\/|\z))|((\/|\A)\/\.vendor(\/|\z))|((\/|\A)\/vendor(\/|\z))|((\/|\A)\/acceptance(\/|\z))|((\/|\A)\/bundle(\/|\z))|((\/|\A)\/spec(\/|\z))|((\/|\A)\/tests(\/|\z))|((\/|\A)\/log(\/|\z))|((\/|\A)\/\.svn(\/|\z))|((\/|\A)\/junit(\/|\z))|((\/|\A)\/pkg(\/|\z))|((\/|\A)\/example(\/|\z))|((\/|\A)\/tmp(\/|\z))|((\/|\A)\.(\/|\z))|((\/|\A)\.\.(\/|\z)))

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) 09:48:41$ rm -rf /etc/puppetlabs/code/modules/hdm

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) executed in 0.06 seconds

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) 09:48:41$ mv /etc/puppetlabs/code/modules/puppet-hdm /etc/puppetlabs/code/modules/hdm

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) executed in 0.11 seconds

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) 09:48:43$ puppet module install puppetlabs-stdlib -v 8.5.0
  bash: puppet: command not found

static.58.147.69.159.clients.your-server.de (ubuntu1804-64.example.com) executed in 0.04 seconds
Exited: 127

An error occurred in a `before(:suite)` hook.
Failure/Error: raise CommandFailure, "Host '#{self}' exited with #{result.exit_code} running:\n #{cmdline}\nLast #{@options[:trace_limit]} lines of output were:\n#{result.formatted_output(@options[:trace_limit])}"
Beaker::Host::CommandFailure:
  Host 'static.58.147.69.159.clients.your-server.de' exited with 127 running:
   puppet module install puppetlabs-stdlib -v 8.5.0
  Last 10 lines of output were:
  	bash: puppet: command not found

# ./.vendor/ruby/3.0.0/gems/beaker-4.38.1/lib/beaker/host.rb:396:in `exec'
# ./.vendor/ruby/3.0.0/gems/beaker-4.38.1/lib/beaker/dsl/helpers/host_helpers.rb:83:in `block in on'
# ./.vendor/ruby/3.0.0/gems/beaker-4.38.1/lib/beaker/shared/host_manager.rb:130:in `run_block_on'
# ./.vendor/ruby/3.0.0/gems/beaker-4.38.1/lib/beaker/dsl/patterns.rb:37:in `block_on'
# ./.vendor/ruby/3.0.0/gems/beaker-4.38.1/lib/beaker/dsl/helpers/host_helpers.rb:63:in `on'
# ./.vendor/ruby/3.0.0/gems/beaker-puppet-1.29.0/lib/beaker-puppet/install_utils/module_utils.rb:84:in `block in install_puppet_module_via_pmt_on'
# ./.vendor/ruby/3.0.0/gems/beaker-4.38.1/lib/beaker/shared/host_manager.rb:130:in `run_block_on'
# ./.vendor/ruby/3.0.0/gems/beaker-4.38.1/lib/beaker/dsl/patterns.rb:37:in `block_on'
# ./.vendor/ruby/3.0.0/gems/beaker-puppet-1.29.0/lib/beaker-puppet/install_utils/module_utils.rb:62:in `install_puppet_module_via_pmt_on'
# ./.vendor/ruby/3.0.0/gems/beaker-module_install_helper-1.0.0/lib/beaker/module_install_helper.rb:43:in `block (2 levels) in install_module_dependencies_on'
# ./.vendor/ruby/3.0.0/gems/beaker-module_install_helper-1.0.0/lib/beaker/module_install_helper.rb:41:in `each'
# ./.vendor/ruby/3.0.0/gems/beaker-module_install_helper-1.0.0/lib/beaker/module_install_helper.rb:41:in `block in install_module_dependencies_on'
# ./.vendor/ruby/3.0.0/gems/beaker-module_install_helper-1.0.0/lib/beaker/module_install_helper.rb:40:in `each'
# ./.vendor/ruby/3.0.0/gems/beaker-module_install_helper-1.0.0/lib/beaker/module_install_helper.rb:40:in `install_module_dependencies_on'
# ./.vendor/ruby/3.0.0/gems/beaker-module_install_helper-1.0.0/lib/beaker/module_install_helper.rb:28:in `install_module_dependencies'
# ./.vendor/ruby/3.0.0/gems/voxpupuli-acceptance-1.2.0/lib/voxpupuli/acceptance/spec_helper_acceptance.rb:35:in `block (2 levels) in configure_beaker'
ssh connection to ubuntu1804-64.example.com has been terminated
Cleaning up hcloud
Deleting hcloud server ubuntu1804-64.example.com
Deleting hcloud SSH key
Done cleaning up hcloud

Finished in 7.62 seconds (files took 1 minute 4.57 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples

/usr/bin/ruby -I/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib:/home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/rspec-support-3.12.0/lib /home/bastelfreak/code/puppet-hdm/.vendor/ruby/3.0.0/gems/rspec-core-3.12.0/exe/rspec --pattern spec/acceptance/\*\*/\*_spec.rb failed
bastelfreak@bastelfreak-nb ~/code/puppet-hdm $

@bastelfreak
Copy link
Member

bastelfreak commented Dec 7, 2022

Edit: When I don't mix ubuntu 18 and 20 it's actually working:

BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_setfile=ubuntu1804-64{hostname=ubuntu1804-64.example.com,image=ubuntu-18.04} BEAKER_HYPERVISOR=hcloud bundle exec rake beaker

Edit 2: I did some try and error and updated beaker-hostgenerator: voxpupuli/beaker-hostgenerator#261

@bastelfreak
Copy link
Member

@oneiros thanks for the work, can you please also take a look at oneiros#1 ?

configure the hostname with the desired hostname
@oneiros
Copy link
Contributor Author

oneiros commented Jan 3, 2023

The rubocop action is now failing. Sadly, I cannot reproduce this locally. Also the error message given does not indicate where the problem occurs 🤷‍♂️

@bastelfreak
Copy link
Member

@oneiros check https://github.com/voxpupuli/beaker-hcloud/pull/11/files. rubocop does annotations and complains in line 93 in file spec/beaker/hypervisor/hcloud_spec.rb. Does that help?

@oneiros
Copy link
Contributor Author

oneiros commented Jan 25, 2023

@bastelfreak Thank you so much. That helped!

I fixed the problem and rubocop immediately found more ones 🙄

But this finally led me to understand why I could not observe this locally: Since Gemfile.lock is not part of the repo, the Github action always installs the latest version of rubocop, whereas mine locally was locked to the one that was current when I did bundle install. Sadly, rubocop is a very fast moving target, and you might want to consider to tighten the version requirements some more.

OTOH, this way you always get up-to-date feedback on every CI run.

@bastelfreak
Copy link
Member

yes, we need to figure out which rubocop version (and ruby version) we want to use. All other beaker gems suppory Ruby 2.4/2.5 and newer, but we plan to update this in the next weeks. Do you have any idea why Ruby 2.7 fails in CI?

@oneiros
Copy link
Contributor Author

oneiros commented Jan 27, 2023

Do you have any idea why Ruby 2.7 fails in CI?

Not to the point that I can fully explain it, no 😅

But I pushed a fix that seems to work.

@bastelfreak bastelfreak merged commit 4e7e439 into voxpupuli:master Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants