Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
The 'PXELinux global default' is silently overwritten by the ugprade process.
[crash] root@li-lc-1578:~# hammer -c/opt/hoici/etc/sat6/hammer-hoici.yaml template dump --name='PXELinux global default'
empty
[crash] root@li-lc-1578:~# satellite-installer --scenario=satellite --verbose --upgrade
[ INFO 2016-10-05 13:28:32 verbose] Executing hooks in group pre_migrations
[ INFO 2016-10-05 13:28:32 verbose] All hooks in group pre_migrations finished
[ INFO 2016-10-05 13:28:32 verbose] Executing hooks in group boot
[ INFO 2016-10-05 13:28:32 verbose] All hooks in group boot finished
.....
Upgrade Step: db_seed...
[ INFO 2016-10-05 13:34:27 verbose] Upgrade Step: db_seed...
Seeding /usr/share/foreman/db/seeds.d/03-auth_sources.rb
Seeding /usr/share/foreman/db/seeds.d/03-permissions.rb
Seeding /usr/share/foreman/db/seeds.d/03-roles.rb
Seeding /usr/share/foreman/db/seeds.d/04-admin.rb
Seeding /usr/share/foreman/db/seeds.d/05-taxonomies.rb
Seeding /usr/share/foreman/db/seeds.d/06-architectures.rb
Seeding /usr/share/foreman/db/seeds.d/07-provisioning_templates.rb <-------------
Seeding /usr/share/foreman/db/seeds.d/08-partition_tables.rb
Seeding /usr/share/foreman/db/seeds.d/10-installation_media.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.80/db/seeds.d/101-locations.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.80/db/seeds.d/102-organizations.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.80/db/seeds.d/103-provisioning_templates.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.80/db/seeds.d/104-proxy.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.80/db/seeds.d/106-mail_notifications.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.80/db/seeds.d/107-enable_dynflow.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.80/db/seeds.d/108-ensure_sync_notification.rb
Seeding /usr/share/foreman/db/seeds.d/11-smart_proxy_features.rb
Seeding /usr/share/foreman/db/seeds.d/13-compute_profiles.rb
Seeding /usr/share/foreman/db/seeds.d/15-bookmarks.rb
Seeding /usr/share/foreman/db/seeds.d/16-mail_notifications.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.7.14.7/db/seeds.d/20-foreman_tasks_permissions.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/redhat_access-1.0.13/db/seeds.d/200-update-insights-roles.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_bootdisk-6.1.0.3/db/seeds.d/50-bootdisk_templates.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-5.0.0.9/db/seeds.d/50_discovery_templates.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.7.14.7/db/seeds.d/60-dynflow_proxy_feature.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-0.3.0.12/db/seeds.d/60-ssh_proxy_feature.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-5.0.0.9/db/seeds.d/60_discovery_proxy_feature.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.7.14.7/db/seeds.d/61-foreman_tasks_bookmarks.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-0.3.0.12/db/seeds.d/70-job_templates.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.80/db/seeds.d/75-job_templates.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-0.3.0.12/db/seeds.d/90-bookmarks.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_theme_satellite-0.1.28/db/seeds.d/990 - provisioning_templates.rb
....
[crash] root@li-lc-1578:~# hammer -c/opt/hoici/etc/sat6/hammer-hoici.yaml template dump --name='PXELinux global default'
<%#
kind: PXELinux
name: PXELinux global default
%>
<%# This template has special name (do not change it) and it is used for booting unknown hosts. %>
DEFAULT menu
PROMPT 0
MENU TITLE PXE Menu
TIMEOUT 200
TOTALTIMEOUT 6000
ONTIMEOUT local
LABEL local
MENU LABEL (local)
MENU DEFAULT
LOCALBOOT 0
LABEL discovery
MENU LABEL (discovery)
KERNEL boot/fdi-image-rhel_7-vmlinuz
APPEND initrd=boot/fdi-image-rhel_7-img rootflags=loop root=live:/fdi.iso rootfstype=auto ro rd.live.image acpi=force rd.luks=0 rd.md=0 rd.dm=0 rd.lvm=0 rd.bootif=0 rd.neednet=0 nomodeset proxy.url=https://SATELLITE_CAPSULE_URL:9090 proxy.type=proxy
IPAPPEND 2
<% for profile in @profiles -%>
LABEL <%= "#{profile[:template]} - #{profile[:hostgroup]}" %>
KERNEL <%= profile[:hostgroup].operatingsystem.kernel(profile[:hostgroup].architecture) %>
<% case profile[:hostgroup].operatingsystem.pxe_type -%>
<% when 'kickstart' -%>
APPEND initrd=<%= profile[:hostgroup].operatingsystem.initrd(profile[:hostgroup].architecture) %> ks=<%= default_template_url(profile[:template], profile[:hostgroup]) %> ksdevice=bootif network kssendmac
<% when 'preseed' -%>
APPEND initrd=<%= profile[:hostgroup].operatingsystem.initrd(profile[:hostgroup].architecture) %> interface=auto url=<%= default_template_url(profile[:template], profile[:hostgroup]) %> ramdisk_size=10800 root=/dev/rd/0 rw auto hostname=unassigned-hostname locale=<%= profile[:hostgroup].params['lang'] || 'en_US' %> console-setup/ask_detect=false console-setup/layout=USA console-setup/variant=USA
<% end -%>
<% end -%>
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1. Edit the 'PXELinux global default'
2. Dump the 'PXELinux global default' on the console
hammer template dump --name='PXELinux global default'
3. Upgrade satellite
satellite-installer --scenario=satellite --verbose --upgrade
4. Dump the 'PXELinux global default' on the console
hammer template dump --name='PXELinux global default'
Actual results:
Content is changed to the default
Expected results:
- Upgrade process shall not touch manual overwritten files
- Upgrade process shall have logging and history appending when it overwrites content
Additional info:
I think it's valid RFE to allow users modifying the PXE template name via settings. One potential obstacle is that settings are global while templates might be scoped to organization or location. We should probably that the template chosen via settings is available everywhere.
It is also easy to add more logging in case some template is being updated.
Comment 14Satellite Program
2018-02-21 16:51:07 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.
>
> For information on the advisory, and where to find the updated files, follow the link below.
>
> If the solution does not work for you, open a new bug report.
>
> https://access.redhat.com/errata/RHSA-2018:0336
Description of problem: The 'PXELinux global default' is silently overwritten by the ugprade process. [crash] root@li-lc-1578:~# hammer -c/opt/hoici/etc/sat6/hammer-hoici.yaml template dump --name='PXELinux global default' empty [crash] root@li-lc-1578:~# satellite-installer --scenario=satellite --verbose --upgrade [ INFO 2016-10-05 13:28:32 verbose] Executing hooks in group pre_migrations [ INFO 2016-10-05 13:28:32 verbose] All hooks in group pre_migrations finished [ INFO 2016-10-05 13:28:32 verbose] Executing hooks in group boot [ INFO 2016-10-05 13:28:32 verbose] All hooks in group boot finished ..... Upgrade Step: db_seed... [ INFO 2016-10-05 13:34:27 verbose] Upgrade Step: db_seed... Seeding /usr/share/foreman/db/seeds.d/03-auth_sources.rb Seeding /usr/share/foreman/db/seeds.d/03-permissions.rb Seeding /usr/share/foreman/db/seeds.d/03-roles.rb Seeding /usr/share/foreman/db/seeds.d/04-admin.rb Seeding /usr/share/foreman/db/seeds.d/05-taxonomies.rb Seeding /usr/share/foreman/db/seeds.d/06-architectures.rb Seeding /usr/share/foreman/db/seeds.d/07-provisioning_templates.rb <------------- Seeding /usr/share/foreman/db/seeds.d/08-partition_tables.rb Seeding /usr/share/foreman/db/seeds.d/10-installation_media.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.80/db/seeds.d/101-locations.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.80/db/seeds.d/102-organizations.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.80/db/seeds.d/103-provisioning_templates.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.80/db/seeds.d/104-proxy.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.80/db/seeds.d/106-mail_notifications.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.80/db/seeds.d/107-enable_dynflow.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.80/db/seeds.d/108-ensure_sync_notification.rb Seeding /usr/share/foreman/db/seeds.d/11-smart_proxy_features.rb Seeding /usr/share/foreman/db/seeds.d/13-compute_profiles.rb Seeding /usr/share/foreman/db/seeds.d/15-bookmarks.rb Seeding /usr/share/foreman/db/seeds.d/16-mail_notifications.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.7.14.7/db/seeds.d/20-foreman_tasks_permissions.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/redhat_access-1.0.13/db/seeds.d/200-update-insights-roles.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_bootdisk-6.1.0.3/db/seeds.d/50-bootdisk_templates.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-5.0.0.9/db/seeds.d/50_discovery_templates.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.7.14.7/db/seeds.d/60-dynflow_proxy_feature.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-0.3.0.12/db/seeds.d/60-ssh_proxy_feature.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-5.0.0.9/db/seeds.d/60_discovery_proxy_feature.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.7.14.7/db/seeds.d/61-foreman_tasks_bookmarks.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-0.3.0.12/db/seeds.d/70-job_templates.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.80/db/seeds.d/75-job_templates.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-0.3.0.12/db/seeds.d/90-bookmarks.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_theme_satellite-0.1.28/db/seeds.d/990 - provisioning_templates.rb .... [crash] root@li-lc-1578:~# hammer -c/opt/hoici/etc/sat6/hammer-hoici.yaml template dump --name='PXELinux global default' <%# kind: PXELinux name: PXELinux global default %> <%# This template has special name (do not change it) and it is used for booting unknown hosts. %> DEFAULT menu PROMPT 0 MENU TITLE PXE Menu TIMEOUT 200 TOTALTIMEOUT 6000 ONTIMEOUT local LABEL local MENU LABEL (local) MENU DEFAULT LOCALBOOT 0 LABEL discovery MENU LABEL (discovery) KERNEL boot/fdi-image-rhel_7-vmlinuz APPEND initrd=boot/fdi-image-rhel_7-img rootflags=loop root=live:/fdi.iso rootfstype=auto ro rd.live.image acpi=force rd.luks=0 rd.md=0 rd.dm=0 rd.lvm=0 rd.bootif=0 rd.neednet=0 nomodeset proxy.url=https://SATELLITE_CAPSULE_URL:9090 proxy.type=proxy IPAPPEND 2 <% for profile in @profiles -%> LABEL <%= "#{profile[:template]} - #{profile[:hostgroup]}" %> KERNEL <%= profile[:hostgroup].operatingsystem.kernel(profile[:hostgroup].architecture) %> <% case profile[:hostgroup].operatingsystem.pxe_type -%> <% when 'kickstart' -%> APPEND initrd=<%= profile[:hostgroup].operatingsystem.initrd(profile[:hostgroup].architecture) %> ks=<%= default_template_url(profile[:template], profile[:hostgroup]) %> ksdevice=bootif network kssendmac <% when 'preseed' -%> APPEND initrd=<%= profile[:hostgroup].operatingsystem.initrd(profile[:hostgroup].architecture) %> interface=auto url=<%= default_template_url(profile[:template], profile[:hostgroup]) %> ramdisk_size=10800 root=/dev/rd/0 rw auto hostname=unassigned-hostname locale=<%= profile[:hostgroup].params['lang'] || 'en_US' %> console-setup/ask_detect=false console-setup/layout=USA console-setup/variant=USA <% end -%> <% end -%> Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. Edit the 'PXELinux global default' 2. Dump the 'PXELinux global default' on the console hammer template dump --name='PXELinux global default' 3. Upgrade satellite satellite-installer --scenario=satellite --verbose --upgrade 4. Dump the 'PXELinux global default' on the console hammer template dump --name='PXELinux global default' Actual results: Content is changed to the default Expected results: - Upgrade process shall not touch manual overwritten files - Upgrade process shall have logging and history appending when it overwrites content Additional info: