Error When Creating or Editing Host Group With Operating System
You can reproduce this by create a host group with an OS with no family
1. hammer architecture create --organization-id 1 --name 'reproducer_arch'
2. echo 'default ptable layout' > /tmp/ptable_layout
3. hammer partition-table create --organization-id 1 --name 'reproducer_ptable' --file /tmp/ptable_layout
4. hammer os create --major 7574 --name 'reproducer_os' --architecture-ids :arch_id --partition-table-ids :ptable_id
5. hammer hostgroup create --name 'reproducer_hostgroup' --architecture-id :arch_id --partition-table-id :ptable_id --operatingsystem-id :os_id
Fixes #25917 - Check operating sys supports 'kickstart_repository'
- Fixes #25917 - Check operatingsys supports 'kickstart_repository'
before calling. Operating systems with no family won't have the
'kickstart_repository' method since this is a method for RedHat
class operating systems.
I'm not sure if this bug is a symptom of larger issues around
operating systems, but it does fix the issue and I've added a test
that reproduces the issue.
- Refs #25917 - Change to use respond_to?
#5 Updated by Tomer Brisker almost 2 years ago
- Triaged changed from Yes to No
- Found in Releases Katello 3.10.0 added
Looks like this was introduced in 3.10 by #25379, and also breaks hostsgroups for all non-RH oses, a user just came in reporting xenserver is broken with:
Oops, we're sorry but something went wrong undefined method `kickstart_repos' for #<Xenserver:0x00007f418abd8b20>
Removing triage and proposing pulling this into 3.10.1 and 3.11.