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!

  • Moderator

    @Tom-Elliott I am willing in a heartbeat. The problem right now may be my “history” of the old trunk builds causing some headaches in the past. I have some convincing to do for my boss, but having solid things that are fixed/improved helps the case. I am also probably going to need to take a medical leave soon and want to have FOG be stable while I’m gone. I will look at the features 1.6 and see if I can’t earn that tester badge again 😀

  • Senior Developer

    @fry_p if you’re willing to upgrade, would you mind giving a try to working-1.6? I think you’ll like the new GUI and it has this fix in it as well. It’ll also give us something to work for with regard to getting it improved upon. Of course totally up to you, but could be useful I think.

  • Moderator

    @Sebastian-Roth said in Database maintenance script?:

    @fry_p Sorry it took such a long time to answer. Almost forgot about this topic. I finally got to fix this issue - see on github.

    That’s sick! I will have to update soon. I see this is on dev-branch, so I can try to convince my boss to update when I am in. Thanks for sticking with it!

  • Developer

    @fry_p Sorry it took such a long time to answer. Almost forgot about this topic. I finally got to fix this issue - see on github.

  • 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