Fixes #38178 - Add linuxefi/initrdefi wrapper to GRUB2 templates #2406
Annotations
7 errors
Run rake test:units:
test/unit/foreman/renderer_test.rb#L39
Failure: test_0070_rendered Preseed default PXEGrub2 Autoinstall template should match snapshots
Rendered template Preseed default PXEGrub2 Autoinstall did not match the snapshot..
--- expected
+++ actual
@@ -11,6 +11,14 @@
# System locale
#
+# Wrapper for deprecated linuxefi/initrd commands
+function linuxefi {
+ linux $*
+}
+function initrdefi {
+ initrd $*
+}
+
set default=0
set timeout=10
|
Run rake test:units:
test/unit/foreman/renderer_test.rb#L39
Failure: test_0038_rendered Preseed default PXEGrub2 template should match snapshots
NameError: undefined local variable or method `efi_suffix' for #<Foreman::Renderer::Scope::Provisioning:0x0000559fa037d800 @source=#<Foreman::Renderer::Source::Snapshot:0x0000559fa037d990 @template=#<Template id: nil, name: "Preseed default PXEGrub2", template: "<%#\nkind: PXEGrub2\nname: Preseed default PXEGrub2\n...", snippet: false, template_kind_id: nil, created_at: nil, updated_at: nil, locked: false, default: false, vendor: nil, type: nil, os_family: nil, description: nil, cloned_from_id: nil>, @name="Preseed default PXEGrub2", @content="<%#\nkind: PXEGrub2\nname: Preseed default PXEGrub2\nmodel: ProvisioningTemplate\noses:\n- Debian\n- Ubuntu\ntest_on:\n- debian4dhcp\n- ubuntu4dhcp\ndescription: |\n The template to render Grub2 bootloader configuration for preseed based distributions.\n The output is deployed on the host's subnet TFTP proxy.\n-%>\n#\n# This file was deployed via '<%= template_name %>' template\n\n# Wrapper for deprecated linuxefi/initrd commands\nfunction linuxefi {\n linux $*\n}\nfunction initrdefi {\n initrd $*\n}\n\nset default=0\nset timeout=<%= host_param('loader_timeout') || 10 %>\n\nmenuentry '<%= template_name %>' {\n linux<%= efi_suffix %> <%= @kernel %> interface=auto url=<%= foreman_url('provision')%> ramdisk_size=10800 root=/dev/rd/0 rw auto <%= snippet(\"preseed_kernel_options\").strip %>\n initrd<%= efi_suffix %> <%= @initrd %>\n}\n\n<%= snippet_if_exists(template_name + \" custom menu\") %>\n">, @host=#<Host::Managed id: nil, name: "snapshot-ipv4-dhcp-deb10", last_compile: nil, last_report: nil, updated_at: nil, created_at: nil, root_pass: [FILTERED], architecture_id: nil, operatingsystem_id: nil, ptable_id: nil, medium_id: nil, build: false, comment: "", disk: nil, installed_at: nil, model_id: nil, hostgroup_id: nil, owner_id: nil, owner_type: nil, enabled: true, puppet_ca_proxy_id: nil, managed: true, use_image: nil, image_file: nil, uuid: nil, compute_resource_id: nil, puppet_proxy_id: nil, certname: "snapshot-ipv4-dhcp-deb10", image_id: nil, organization_id: 447626438, location_id: 255093256, type: "Host::Managed", otp: nil, realm_id: nil, compute_profile_id: nil, provision_method: nil, grub_pass: "", global_status: 0, lookup_value_matcher: nil, pxe_loader: "PXELinux BIOS", initiated_at: nil, build_errors: nil, creator_id: nil>, @params={}, @variables_keys=[], @mode="real", @template_name="Preseed default PXEGrub2", @loaded=["load_variables_base"], @medium_provider=#<MediumProviders::Default:0x0000559fa037d5a8 @entity=#<Host::Managed id: nil, name: "snapshot-ipv4-dhcp-deb10", last_compile: nil, last_report: nil, updated_at: nil, created_at: nil, root_pass: [FILTERED], architecture_id: nil, operatingsystem_id: nil, ptable_id: nil, medium_id: nil, build: false, comment: "", disk: nil, installed_at: nil, model_id: nil, hostgroup_id: nil, owner_id: nil, owner_type: nil, enabled: true, puppet_ca_proxy_id: nil, managed: true, use_image: nil, image_file: nil, uuid: nil, compute_resource_id: nil, puppet_proxy_id: nil, certname: "snapshot-ipv4-dhcp-deb10", image_id: nil, organization_id: 447626438, location_id: 255093256, type: "Host::Managed", otp: nil, realm_id: nil, compute_profile_id: nil, provision_method: nil, grub_pass: "", global_status: 0, lookup_value_matcher: nil, pxe_loader: "PXELinux BIOS", initiated_at: nil, build_errors: nil, creator_id: nil>, @errors=[], @unique_id="debian-mirror-2De7fzShMmxe">, @additional_media=[], @provisioning_type="host", @static=false, @template_url=nil, @template_input_values={}, @Renderer=Foreman::Renderer::UnsafeModeRenderer, @kernel="boot/debian-mirror-2De7fzShMmxe-linux", @initrd="boot/debian-mirror-2De7fzShMmxe-initrd.gz", @kernel_uri="http://ftp.debian.org/debian/dists/buster/main/installer-amd64/current/images/netboot/debian-installer/amd64/linux", @initrd_uri="http://ftp.debian.org/debian/dists/buster/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz", @preseed_path="/debian", @preseed_server="ftp.debian.org:80">
app/s
|
Run rake test:units:
test/unit/foreman/renderer_test.rb#L39
Failure: test_0005_rendered PXEGrub2 global default template should match snapshots
Rendered template PXEGrub2 global default did not match the snapshot..
--- expected
+++ actual
@@ -1,4 +1,12 @@
-"default=local
+"# Wrapper for deprecated linuxefi/initrd commands
+function linuxefi {
+ linux $*
+}
+function initrdefi {
+ initrd $*
+}
+
+default=local
timeout=20
echo Default PXE global template entry is set to 'local'
|
Run rake test:units:
test/unit/foreman/renderer_test.rb#L27
Failure: test_0070_rendered Preseed default PXEGrub2 Autoinstall template should match snapshots
Rendered template Preseed default PXEGrub2 Autoinstall did not match the snapshot..
--- expected
+++ actual
@@ -11,6 +11,14 @@
# System locale
#
+# Wrapper for deprecated linuxefi/initrd commands
+function linuxefi {
+ linux $*
+}
+function initrdefi {
+ initrd $*
+}
+
set default=0
set timeout=10
|
Run rake test:units:
test/unit/foreman/renderer_test.rb#L27
Failure: test_0038_rendered Preseed default PXEGrub2 template should match snapshots
Safemode::SecurityError: Safemode doesn't allow to access 'efi_suffix' on #<Safemode::ScopeObject>
app/services/foreman/renderer/safe_mode_renderer.rb:7:in `render'
app/services/foreman/renderer/base_renderer.rb:18:in `render'
app/services/foreman/renderer.rb:46:in `render'
app/services/foreman/template_snapshot_service.rb:61:in `render_template'
test/unit/foreman/renderer_test.rb:49:in `block in assert_template'
test/unit/foreman/renderer_test.rb:47:in `each'
test/unit/foreman/renderer_test.rb:47:in `assert_template'
test/unit/foreman/renderer_test.rb:27:in `block (3 levels) in <class:RendererTest>'
|
Run rake test:units:
test/unit/foreman/renderer_test.rb#L27
Failure: test_0005_rendered PXEGrub2 global default template should match snapshots
Rendered template PXEGrub2 global default did not match the snapshot..
--- expected
+++ actual
@@ -1,4 +1,12 @@
-"default=local
+"# Wrapper for deprecated linuxefi/initrd commands
+function linuxefi {
+ linux $*
+}
+function initrdefi {
+ initrd $*
+}
+
+default=local
timeout=20
echo Default PXE global template entry is set to 'local'
|
Run rake test:units
Process completed with exit code 1.
|
Loading