Skip to content

Invalid group object #2297

@EmmaTinten

Description

@EmmaTinten

Expected Behavior

Recreating a previously deleted hostgroup which is configured to a hostobject not using the "Assign where"-rule will give the error in the title.

Current Behavior

Deleting a hostgroup to which hosts are assigned via the host object and NOT via Assign where rule will not remove the hostgroup from the hostobjects Recreating the hostgroup will give an error "Invalid host group object(IcingaObjectGroups.php:219) when assigning the new group by editing the host object. The host will not be a member of the group.
Doing the assignment using the "Assign where" rule of the hostgroup object works without problems.

Possible Solution

Do not assign host groups by editing the destination host object. Use "Assign where" of the hostgroup.

Steps to Reproduce (for bugs)

  1. Create a hostgroup
  2. Create a host
  3. Assign the created hostgroup by editing the host object
  4. Delete the hostgroup
  5. Create the hostgroup with the identical name
  6. Edit the host object and remove the old hostgroup
  7. Edit the host object and add the new (recreated) hostgroup

Your Environment

  • Director version (System - About): 1.7.2
  • Icinga Web 2 version and modules (System - About): 2.8.2
  • Icinga 2 version (icinga2 --version):2.12.3
  • Operating System and version: Debian GNU/Linux 10
  • Webserver, PHP versions: Apache 2.4.38 PHP: 7.3.27-1~deb10u1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions