Change IP fog Server : unable to change Node storage and TFTP IP
-
@george1421 Hi,
Yes it’s exactly what I did, update .fogsettings file then re-run installer, change ip in web interface and in my DHCP.
-
For TFTP address I had to change it in database because if I modify it in fog settings, it seems ok but if I refresh page old ip is back (10.52 is the new one, 10.60 the old one)
-
For node storage same behavior, I change ip, message ok and then old ip is back.
And if I tried to create new node, message ok but it didn’t appear in node storage…
I don’t know if it’s a configuration issue in my debian server or access right to modify some file or database issue, but I had to revert to the old ip address for the moment…
-
-
@matthieu-jacquart Can you make modification to target computer settings and they stick? The question is everything ignoring your change or just storage node?
The ONLY thing you did was change IP address of the fog server or did you rebuild the fog server?
-
@george1421 The only thing I do was to change Debian server ip, on Fog Web UI I can change everything else but no ip (node, TFTP, multicast or web host). Always message “settings successfully stored” but revert just after…
Maybe database is damaged ?
Is there any log to see this ?
ThanksEdit : in fact the 3 ip in fog settings can be changed by clicking on “update” button but I was just hitting “enter” keyboard… (same message “settings successfully stored” in both case).
For Node storage, whatever I do, no changes are retained. Maybe I can change it in “nfsGroupMembers” database ? -
@matthieu-jacquart I was going to suggest to get your fog server working to update the database by hand.
It would be also interesting to know if you would inspect the apache or pfp-fpm error logs in /var/log to see if either are throwing an error when you try to update via the web ui. Maybe we find a clue why the update is not working via the web ui too.
-
@george1421 I’ll try to update database by hand.
With Web ui, I found this in logs / apache2 / other_vhosts_access.log
192.168.10.60:80 192.168.10.100 - - [31/Mar/2022:11:21:07 +0200] "POST /fog/status/getservertime.php HTTP/1.1" 200 703 "http://192.168.10.60/fog/management/index.php?node=storage&sub=edit&id=8" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0" 192.168.10.60:80 192.168.10.100 - - [31/Mar/2022:11:21:08 +0200] "POST /fog/management/index.php?node=storage&sub=edit&id=8 HTTP/1.1" 200 735 "http://192.168.10.60/fog/management/index.php?node=storage&sub=edit&id=8" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0"
And into table “history” :
[2022-03-31 11:21:08] StorageNode ID: 8 NAME: Fog has been successfully updated.
Spoiler alert : it’s not
Edit : Do I have to use –recreate-CA and –recreate-keys after I change ip ?
-
@matthieu-jacquart From the log file you provided that is only the access side. There should be
<something>error.log
for both apache and php-fpm.As for the certificate I don’t know. I would think its not necessary to regenerate the certificate unless it used the IP address in the common name when creating the certificate. But that is more of a question for a developer.
-
@george1421 ok, I’ll try in few days to change ip and modify database by hand.
There is a file error.log for apache2 but with no error for this problem. -
@matthieu-jacquart said in Change IP fog Server : unable to change Node storage and TFTP IP:
Do I have to use –recreate-CA and –recreate-keys after I change ip ?
No, you should not have to so this. The installer will regenerate the certificate nevertheless but it won’t touch the CA - which is not the same thing!!
-
@sebastian-roth OK thanks, so it could be usefull to update wiki page ?
https://docs.fogproject.org/en/latest/reference/change_fog_server_ip_address.htmlRerun the installer, you’ll need to use –recreate-CA and –recreate-keys keys as the installer provides a certificate with a Common Name based on the ip which will be shipped in the iPxe kernel and failed to load any https resources as the certificate isn’t valid anymore.
-
So i change my server ip, modify the 4 ip by hand, everything works fine !
I didn’t use –recreate-CA and –recreate-keys keys and in folder snapin/ssl ca.cnf is updated with the new ip but req.cnf kept old ip.
I don’t think it will be a problem.Matthieu
-
@matthieu-jacquart So just to be clear if you don’t touch the certificates and only update the IP address as I mentioned everything is OK now?
-
@matthieu-jacquart said in Change IP fog Server : unable to change Node storage and TFTP IP:
I didn’t use –recreate-CA and –recreate-keys keys and in folder snapin/ssl ca.cnf is updated with the new ip but req.cnf kept old ip.
That is an interesting point. Looks like req.cnf and the certificate request file are not being re-generated unless --recreate-keys is specified. I am not sure why but I think we should change this behavior by moving that part out of the if-clause (code reference). What do you think?
-
@george1421 Exactly ! I changed server +.fogsettings ip (+ 4 ip in database by hand…) and everything is fine (ip in default.ipxe changed automatically)
@sebastian-roth for information :
- ca.cnf (with new ip)
[v3_ca] subjectAltName = @alt_names [alt_names] IP.1 = 192.168.10.52 DNS.1 = FOG.lycee.nd
- req.cnf (kept old ip) :
[req] distinguished_name = req_distinguished_name req_extensions = v3_req prompt = yes [req_distinguished_name] CN = 192.168.10.60 [v3_req] subjectAltName = @alt_names [alt_names] IP.1 = 192.168.10.60 DNS.1 = FOG.lycee.nd