How to rebuild the FOG Settings -> Genral Settings value
-
Remotely did two things, check for linux updates and tried a simple change of bumping Memory setting up another 128 to try and resolve the Inventory Report not working anymore. I had issues with writing/saving the changes in the General Settings tab. The first symptom was not being able to log into the Web GUI anymore. At the workbench, the iPXE menu was displayed in red and selections would not work. Checked the General Settings file and most of the values were blank. (I can log into the Web page). This was an older and reliable install running on a XEN box.
I believe I corrupted the values in the General Setting Tab. I do have several copies of FOG and had no luck copying their values over. Is there an easy way to set these values to default? I do not have a value for the UUID for the installation. Since it is the weekend can these be done via the command line. My search of log files did not make anything obvious to me.
Fri Dec 08, 2023 19:17 pm
Running Version 1.4.0-RC-9.3
SVN Revision: 6069 -
Digging deeper. Yes, the majority of the settings in globalSettings table are blank. During spot checks, I did find two IDs that still have the same value. I have two SQL backups from the same day in 2017 and this looks like it will get me the closest but I am not looking forward to adding 178 records manually.
I do not trust the data in the current table. The only field that has changed is settingValue. The field appears blank but there may be some other value in it. In reviewing the backup most of the records are obvious. But I have made many changes in the ID=74 PXE Advance The PXE screen appear correct, ( other than being red ), but nothing works.
I also have another VM that is labeled “newfog” . I will need to do a comparison to see if the values in globalSettings are different. I do not remember if it is a copy of my original FOG or a new instance of FOG.
Backup early, Backup often.
-
@Foaming It’s been a minute, but I believe you could attempt a “reset” by setting the schemaVersion.vValue to 1
I only suggest one as this will cause the whole schema to be adjusted for all tables, (where it matches)
But should maintain the data where necessary as well.
I’m only saying this as it “shoudl” fix things, but it won’t necessary be a save all.
It may seem strange, but I’d suggest making a backup of the DB as it sits now.
Do this change.
if it makes things that much “worse” you can revert back to this non functional state. if it works, awesome.
What will happen is when you change the value, it will tell you (from the gui) that an update is needed.
Please follow the steps from there and you should be back in business.
-
@Tom-Elliott Thank you for your time. I will look at that. With a backup, I may try it just to see. Current vValue in schemaVersion is 259.
Years back, more than 10 years, ( Yes, long time user, Seems like .26 was my first but definitly by .32 ), I had something similar happen and it was obvious what field was corrupt because when it hit that point in the display of the web page we got garbage.
For this case, I do not have my notes at home but one of the records value when displayed in mysql was about 20 pages of stuff. I recall it was one the the paths and should have been 10 to 15 characters. Most of the rows settingValue in the globalSettings table were empty. I was trying to update the FOG_MEMORY_LIMIT in the Web Gui when I had an issue with the save. After a couple of tries it saved the 384 number but the other values were missing.
What I have done is go through each row and replace it with either the older backup value or what I thought it should be. Tonight, I was just correcting the two rows with the IP addresses because of the wrong value discovered with today’s test.
My old backup had the values for MINIG and the new table did not
Right now production is a concern and time is short. The web GUI is working again. I will need to test tonight’s changes for the IP address. Today’s test the screen was still red but it had the wrong IP address for the tftp and web server and may need to work on the PXE menu. I have some pxe menu options that were not fully moved over to the newer advanced options that are in settingID=74.
As always lesson learned, consistent backups and get the box updated. This is a xen VM and I have another FOG named newFOG but I did not compare values yet or check what version. In the past I would make a copy and upgrade the copy.