Project

General

Profile

Bug #7331

Unassigned OS Template Defaults Generate an Exception Upon Deletion Preventing You from Deleting Them

Added by Paul Calabro almost 5 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Templates
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

I have a few OSes. Of them, only one has templates assigned to it-- CentOS 6.5.
For that one, it has an iPXE template and a provision template. The user_data and finish are unassigned.
There's a couple templates I can't delete-- one user_data and one finish template. If I try do delete them, I receive an exception saying that CentOS 6.5 is using it (well, it's a little more cryptic than that, but someone in the channel showed me a command to run to identify the associated OS using the console and it's the CentOS 6.5 OS).

One interesting point to mention is that If i create a "test" template and substitute that as the user_data template, I can delete the old unused user_data template which i want to delete. Once I unselect the "test" template for user_data and set it to nothing again, however, I can't delete test. It seems as though specifying no default template for a given type doesn't remove the previous association.

foreman.sql foreman.sql 16.8 KB Dump of operatingsystems, operatingsystems, and os_default_templates tables Paul Calabro, 09/07/2014 09:43 PM

Associated revisions

Revision c330aee0 (diff)
Added by Shlomi Zadok almost 5 years ago

fixes #7331 - delete unassigned os default templates

History

#1 Updated by Stephen Benjamin almost 5 years ago

  • Category set to Templates

#2 Updated by Paul Calabro almost 5 years ago

Here's a video of the bug occurring: http://youtu.be/M8m1pM66ucI

#3 Updated by Shlomi Zadok almost 5 years ago

  • Status changed from New to Need more information
  • Assignee set to Shlomi Zadok

I can't seem to reproduce on my development environment.
Can you please provide me with steps to reproduce or preferably dump data of the following tables: "operatingsystems", "config_templates", "os_default_templates"
Thanks!

#4 Updated by Paul Calabro almost 5 years ago

The steps to reproduce can be found in the video above.
Table dump is attached.
Please let me know if you need anything else.

#5 Updated by Dominic Cleal almost 5 years ago

  • Status changed from Need more information to New
  • Legacy Backlogs Release (now unused) deleted (10)

#6 Updated by The Foreman Bot almost 5 years ago

  • Status changed from New to Ready For Testing
  • Target version set to 1.7.2
  • Pull request https://github.com/theforeman/foreman/pull/1844 added
  • Pull request deleted ()

#7 Updated by Shlomi Zadok almost 5 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#8 Updated by Dominic Cleal almost 5 years ago

  • Legacy Backlogs Release (now unused) set to 27

#9 Updated by Dominic Cleal over 4 years ago

  • Legacy Backlogs Release (now unused) changed from 27 to 21

Also available in: Atom PDF