Database maintenance script?

  • Moderator

    Hi all,
    First and foremost, congrats on the 1.5.6 release! I will try to convince my boss to upgrade soon!
    I had a question about the viability and potential harm in creating a script that would periodically run the (safe) database maintenance commands from the wiki.

    My question is really should I do this? Is there anything this could mess up if it runs regularly? Right now I sporadically copy and paste them from the wiki into bash manually, but I am all about the automation of tasks like this. I typically only do this when I notice issues with adding to groups, but also periodically when I update fog or do OS updates on the server.

    If you guys don’t think it is harmful (I still accept that I will be doing this at my own risk), I can write up a simple script and maybe even share it here!

    Thanks as always!

  • Developer

    @fry_p From my point of view this is not indented behavior! While running the maintenance commands might help in this case I still think we should try to figure out why this happens. Thanks heaps for the details! Very likely we need to replicate the issue on a fresh install anyway to figure out what’s going on. So up to now there is no need for you to provide any more data. The story is clear enough I think. Possibly we’ll get back to you soon anyway if we can’t replicate things as expected.

    Not sure though when we’ll get to it. No promise this will be found and fixed in the next days.

  • Moderator

    @Sebastian-Roth I can give you an example as to why. I work in a school district and I would like to create a group for the 200 wing at the high school in FOG. So I go to the search bar and type “HS2”, bringing up all of the 200 wing hosts. Cool. I use the select all checkbox on the host list results and go to the bottom to create a group or add it to an existing group. Everything on this page looks good.

    When I go to the group and select membership, I see all of the “HS2” hosts I selected but there are other hosts I did not select in the group. They are always the hosts that have been registered since the last Database maintenance.

    The funny thing about this is if I create a new group, select membership, check the box for hosts that can be added and use that search box, it only adds the ones I search for.

    I suppose this could be more of a bug report at this point. I can provide screenshots/logs on Monday if needed, perhaps earlier if I remote in this weekend at all. I just assumed this was normal FOG maintenance.

  • Developer

    @fry_p May I first ask why you regularly run the database maintenance commands? Do you see issues if you don’t?

Log in to reply