Project

General

Profile

Actions

Bug #15354

closed

some provisioning templates are broken after upgrade from 1.11.1 to 1.11.2

Added by Konstantin Orekhov almost 8 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Templates
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

After upgrading to 1.11.2 from 1.11.1 (for DHCP API performance improvements), I found that my Foreman provisioning/tempates are broken in several places.

1. "<% kernel, initrd = @host.operatingsystem.boot_files_uri(@host.medium,@host.architecture) ->
KERNEL <
= kernel >
INITRD <
= initrd %>

in PXELinux template used to return these:

KERNEL http://installsvc.domain.com/images/ubuntu/trusty/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/linux
INITRD http://installsvc.domain.com/images/ubuntu/trusty/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/initrd.gz

now it complains and gives me this:

There was an error rendering the Ubuntu_PXELinux template: ERF42-8219 [Foreman::Exception]: Invalid medium for Ubuntu 14.04

2. no @preseed_path or @preseed_server vars populated in neither PXELinux or provisioning templates. They are just empty, but used to be something like this:

http://installsvc.domain.com:80/images/ubuntu/trusty

3. "<%= @host.os.medium_uri(@host) %>" used in finish script to get this:

http://installsvc.domain.com/images/ubuntu/trusty

now gives me this error:

There was an error rendering the Ubuntu_postinstall template: The snippet 'Ubuntu_repos' threw an error: undefined method `path' for nil:NilClass

Did my upgrade go wrong or what happened?

Actions #1

Updated by Anonymous almost 8 years ago

Is safe mode disabled? If not, please disable it and report back, if it makes a difference.
With a change like https://github.com/theforeman/community-templates/commit/3677ded3bfb80364c125c651b950353e61048771#diff-d8f84c1aef76700b3e72dee8e2a80641 at least one similar problem was fixed with safe mode on.

Actions #2

Updated by Anonymous almost 8 years ago

  • Subject changed from OS provisioning is broken after upgrade from 1.11.1 to 1.11.2 to some provisioning templates are broken after upgrade from 1.11.1 to 1.11.2
  • Category set to Templates
Actions #3

Updated by Konstantin Orekhov almost 8 years ago

safemode rendering is set to "false", just like in 1.11.1 before the upgrade.

Setting it to true gives me this:

There was an error rendering the Ubuntu_PXELinux template: Safemode doesn't allow to access 'to_ary' on @host.to_jail.operatingsystem.to_jail.boot_files_uri(@host.to_jail.medium, @host.to_jail.architecture)

Actions #4

Updated by Dominic Cleal almost 8 years ago

Can you check the installation medium is assigned to the host? Something like <%= @host.medium %>

Actions #5

Updated by Konstantin Orekhov almost 8 years ago

Nope, it did not have it any more although this host was built by Foreman before the upgrade.
Restoring it fixed my problem with templates.

Do you think an upgrade has anything to do with this?

Thanks!

Actions #6

Updated by Dominic Cleal almost 8 years ago

  • Status changed from New to Resolved

Konstantin Orekhov wrote:

Do you think an upgrade has anything to do with this?

I don't think so, we don't have any DB migrations or similar in minor updates so there shouldn't be any reason for the database to be changed between these versions. Not sure how it might have become unassociated - it's possible that the audit log shows the event and time, but probably not the reason why.

Glad it's sorted now though.

Actions

Also available in: Atom PDF