FOG Database Transfer Issues (Host Issues)
We’re planning on swapping out the master node on our primary cluster for a more up-to-date machine soon. As such, we wanted to fully back-up the data and images to our secondary cluster, so our imaging team can continue to work if we have any problems with the swap.
In both these cases, our plan was to take a node from the functioning cluster, import image data from there to the secondary FOG server, and then import our database settings through the web GUIs using the .sql file provided by the primary web GUI.
I got as far as copying all images to our secondary master’s /images. I used the LFTP method found here:
I then was able to import the .sql database file from our primary master. In the web management portal, it gave me the appropriate response of asking to finish installing the database, as it does on a new install. Once this finished, I was able to access almost all of the web GUI, and it looked like image info, MySQL creds, users, and storage imported correctly. I had to delete all the servers listed under storage and re-add our secondary servers manually, as they are on a different Vlan, but I didn’t think this would affect anything, as we usually have to add servers manually after fresh installs anyway.
However, I was not able to access Hosts; whenever I selected the Host tab in my secondary cluster’s GUI, the page immediately crashed and would not reload. Also of note, immediately after importing and updating, I went to image; the laptop receives DHCP and goes to an imaging screen, but when I select an image nothing happens, and the screen colours have inverted (previously white - blue as standard, now black - red).
Our primary host list is quite large; could this be taking a while to propagate? As the file is less than 3000MB it seems unlikely.
Any thoughts or feedback are much appreciated. Thank you!
@george1421 Great, thank you! I appreciate the help.
@scarlyle Its ok to remove this log file. You might also want to look at the apache directory there for large log files too. Its safe to delete any of those log files (in php-fpm as well as apache) to free up space.
@Sebastian-Roth Hey Sebastian,
We ended up doubling down on updating our old system, and were successful as far as we can tell; thanks for your recommendation there.
As you may know this offhandedly, the only issue we’re running into now is that our root filesystem is running out of room due to an increasingly large fog.access.log file under /var/log/php-fpm. Do you know if this is just recording our interactions with the system, and is therefore safe to clear and will recreate itself when more logs are available? Or is this log file also necessary to the function of FOG?
We were having difficulties with a recent update, which is one of the reasons we were attempting this transfer.
I am wondering if it would be easier to just get the update error fixed instead of transferring the whole lot to another system. While it’s not impossible to do it seems a hell lot more work than just fixing the update issue.
Our original database is still on 184.108.40.206, but the back-up master and new master we’ll be installing are both on 1.5.8.
Ok, so the version gap is not really that huge. And it’s all fairly recent versions. Good to know we are not talking about a move from 1.2.0 to 1.5.8.
is that something the old MySQL/MariaDB database could’ve applied that needs to be updated on our new system?
Not that I’d know of straight away. Obviously there is an issue but I expect it to be in the database and it’s very hard to diagnose not having access to this. Line 260 in fogcontroller.class.php is in the function
set, a general method used throughout the code in many places. We’d need to add debugging statements to find out what is causing this. If you’d provide a database dump I can try to replicate the issue. Or we could do a remote session to try and find it.
Type: 1024, File: /var/www/fog/lib/fog/fogftp.class.php, Line: 219, Message: FTP connection failed
Please check out George’s tutorial on re-syncing the
fogprojectaccount. Sure you have other passwords stored in the DB than you have on the other master FOG server to cause these issues.
I feel like this should mean something more to me, but of note as well, I just tried a kernel update through the web GUI, and it gave me this message:
Type: 1024, File: /var/www/fog/lib/fog/fogftp.class.php, Line: 219, Message: FTP connection failed, Host: 10.15.0.2, Username: fogproject
These identifiers belong to our primary master node, which is not what we’re trying to image from. I re-entered the node on the node page in the web GUI, but it looks like there’s something additional needing to be done to the TFTP protocols?
Thanks for your response; my answers are below.
You say cluster. What exactly do you mean by this? There is nothing in the FOG world we call “cluster” so you need to clarify what exactly your setup looks like. I might not play a role for the issues you see but you never know.
By this, I simply mean that we have two separate Vlans with two separate FOG node clusters; one is our primary, with seven nodes, and another is our backup, with two.
What version of FOG do you use? Are all nodes on the same FOG version?
We were having difficulties with a recent update, which is one of the reasons we were attempting this transfer. Our original database is still on 220.127.116.11, but the back-up master and new master we’ll be installing are both on 1.5.8. We haven’t had issues with inter-generational nodes before, but I understand that this is a different process than imaging.
When you say, the hosts page crashed, what does that mean? 500 server error? Please take a look at the apache and PHP-FPM error logs (see my signature) and post more details here.
Correct, I was given a 500 server error. Looking at the log (attached below), it almost looks like a memory error; is that something the old MySQL/MariaDB database could’ve applied that needs to be updated on our new system?
Thanks for your insight!
@scarlyle There are a few things that come to my mind reading your request:
- You say cluster. What exactly do you mean by this? There is nothing in the FOG world we call “cluster” so you need to clarify what exactly your setup looks like. I might not play a role for the issues you see but you never know.
- What version of FOG do you use? Are all nodes on the same FOG version?
- When you say, the hosts page crashed, what does that mean? 500 server error? Please take a look at the apache and PHP-FPM error logs (see my signature) and post more details here.