Page MenuHomePhabricator

Update Vagrant puppet role to work on Bookworm.
Closed, DeclinedPublicBUG REPORT

Description

When trying to setup a cloud vps with Bookworm I discovered the Vagrant puppet run doesn't work.
The puppet run is failing for a missing file that varies on os version.
(See instructions at https://wikitech.wikimedia.org/wiki/Help:MediaWiki-Vagrant_in_Cloud_VPS#Setting_up_your_instance_with_MediaWiki-Vagrant)

3:45 PM 
hmm Error: /Stage[main]/Lxc/File[/etc/lxc/default.conf]: Could not evaluate: Could not retrieve information from environment production source(s) puppet:///modules/lxc/bookworm/etc-lxc-default.conf

Event Timeline

Change 1002357 had a related patch set uploaded (by Majavah; author: Majavah):

[operations/puppet@production] lxc: Rely on default network config

https://gerrit.wikimedia.org/r/1002357

The above patch fixes the Puppet provisioning error, however the vagrant-lxc plugin seems to be broken:

taavi@taavi-vagrant:/srv/mediawiki-vagrant$ vagrant reload
==> default: Attempting graceful shutdown of VM...
==> default: Checking if box 'sagiru/buster-amd64' version '0.2' is up to date...
==> default: Starting container...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 10.0.3.156:22
    default: SSH username: vagrant
    default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Forwarding ports...
/usr/share/rubygems-integration/all/gems/i18n-1.10.0/lib/i18n.rb:210:in `translate': wrong number of arguments (given 2, expected 0..1) (ArgumentError)
	from /srv/vagrant-data/gems/3.1.2/gems/vagrant-lxc-1.4.3/lib/vagrant-lxc/action/forward_ports.rb:49:in `block in forward_ports'
	from /srv/vagrant-data/gems/3.1.2/gems/vagrant-lxc-1.4.3/lib/vagrant-lxc/action/forward_ports.rb:40:in `each'
	from /srv/vagrant-data/gems/3.1.2/gems/vagrant-lxc-1.4.3/lib/vagrant-lxc/action/forward_ports.rb:40:in `forward_ports'
	from /srv/vagrant-data/gems/3.1.2/gems/vagrant-lxc-1.4.3/lib/vagrant-lxc/action/forward_ports.rb:35:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
	from /srv/vagrant-data/gems/3.1.2/gems/vagrant-lxc-1.4.3/lib/vagrant-lxc/action/warn_networks.rb:14:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/builtin/set_hostname.rb:17:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
	from /srv/vagrant-data/gems/3.1.2/gems/vagrant-lxc-1.4.3/lib/vagrant-lxc/action/prepare_nfs_settings.rb:15:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/builtin/synced_folders.rb:87:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/builtin/delayed.rb:19:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/builtin/synced_folder_cleanup.rb:28:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/plugins/synced_folders/nfs/action_cleanup.rb:25:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
	from /srv/vagrant-data/gems/3.1.2/gems/vagrant-lxc-1.4.3/lib/vagrant-lxc/action/prepare_nfs_valid_ids.rb:14:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:52:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/builtin/env_set.rb:19:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/builtin/provision.rb:80:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
	from /srv/mediawiki-vagrant/lib/mediawiki-vagrant/middleware.rb:24:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/builder.rb:180:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/runner.rb:101:in `block in run'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/util/busy.rb:19:in `busy'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/runner.rb:101:in `run'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/builtin/call.rb:53:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/builtin/box_check_outdated.rb:93:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/builder.rb:180:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/runner.rb:101:in `block in run'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/util/busy.rb:19:in `busy'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/runner.rb:101:in `run'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/builtin/call.rb:53:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
	from /srv/vagrant-data/gems/3.1.2/gems/vagrant-lxc-1.4.3/lib/vagrant-lxc/action/gc_private_network_bridges.rb:13:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
	from /srv/vagrant-data/gems/3.1.2/gems/vagrant-lxc-1.4.3/lib/vagrant-lxc/action/clear_forwarded_ports.rb:31:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/builder.rb:180:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/runner.rb:101:in `block in run'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/util/busy.rb:19:in `busy'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/runner.rb:101:in `run'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/builtin/call.rb:53:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/builder.rb:180:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/runner.rb:101:in `block in run'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/util/busy.rb:19:in `busy'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/runner.rb:101:in `run'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/builtin/call.rb:53:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/builder.rb:180:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/runner.rb:101:in `block in run'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/util/busy.rb:19:in `busy'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/runner.rb:101:in `run'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/machine.rb:248:in `action_raw'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/machine.rb:217:in `block in action'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/environment.rb:631:in `lock'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/machine.rb:203:in `call'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/machine.rb:203:in `action'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/plugins/commands/reload/command.rb:42:in `block in execute'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/plugin/v2/command.rb:243:in `block in with_target_vms'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/plugin/v2/command.rb:232:in `each'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/plugin/v2/command.rb:232:in `with_target_vms'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/plugins/commands/reload/command.rb:40:in `execute'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/cli.rb:67:in `execute'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/environment.rb:301:in `cli'
	from /usr/share/rubygems-integration/all/gems/vagrant-2.3.4/bin/vagrant:243:in `<top (required)>'
	from /usr/bin/vagrant:25:in `load'
	from /usr/bin/vagrant:25:in `<main>'

With the non-free licensing status of modern Vagrant versions I wonder if this is worth spending much more time on.

With the non-free licensing status of modern Vagrant versions I wonder if this is worth spending much more time on.

The vagrant-lxc plugin has been largely unchanged since 2018 and archived since late 2022. It may unfortunately be time to figure out a replacement for the whole MediaWiki-Vagrant stack in Cloud VPS.

https://gitlab.wikimedia.org/toolforge-repos/mwdemo is one example of a method for provisioning MediaWiki as a Toolforge tool, but it does not have any of the advanced features of MediaWiki-Vagrant for provisioning complex extensions and support services.

Change #1002357 abandoned by Majavah:

[operations/puppet@production] lxc: Rely on default network config

Reason:

https://gerrit.wikimedia.org/r/1002357