SOLVED Creating Group from Host Management Page

  • FOG:
    Running Version 8355
    SVN Revision: 5805

    Creating groups from the Host Management page adds a phantom Group Member.

    Steps to reproduce:

    1. Go to the Hosts Management Page
    2. Search for a host or hosts
    3. Select the host
    4. Scroll to the bottom and Create a new group
    5. Switch to the Group Management Page and take a look at the group you just created. The numbers of members listed in the bottom left will be 1 more than the actual numbers of members listed on the Membership page.

    This only occurs if you create the group from the Host Management page. If you create the group from the Group Management page and then add hosts from either the Group page or the Host Management page, the member number is correct.

  • Sweet. Ran the delete statement and it fixed the issue. I will pull the latest version down in the morning and rerun the installer.

    Thanks for the quick response everyone!

  • The phantom member is 0.

  • This I found and fixed this morning. Please update. YOu may need to run:

    delete from groupMembers where gmHostID=0;

  • Here is what I found from the database tables. Here is the list of members from a group that I create with just two hosts.

    mysql> select * from groupMembers where gmGroupID=68;
    | gmID | gmHostID | gmGroupID |
    | 1911 |      880 |        68 |
    | 1910 |        0 |        68 |
    | 1912 |      879 |        68 |
    3 rows in set (0.00 sec)

    HostIDs 880 and 879 real host. It is the second entry (HostID 0) that is for a fake host.

    mysql> select * from hosts where hostID = 0;
    Empty set (0.00 sec)

    Might be a loop iteration issue.

  • Very nice attention to detail. Moving this to bugs.

    How are you with SQL? Can you figure out what the phantom member is?