• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Change IP fog Server : unable to change Node storage and TFTP IP

    Scheduled Pinned Locked Moved
    FOG Problems
    3
    15
    1.7k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Matthieu JacquartM
      Matthieu Jacquart
      last edited by Matthieu Jacquart

      Hi,

      I’ve just change my fog ip server so I followed this procedure : https://docs.fogproject.org/en/latest/reference/change_fog_server_ip_address.html

      • edit /tftpboot/default.ipxe and /opt/fog/.fogsettings
      • –recreate-CA and –recreate-keys keys
      • change ip on fog settings

      BUT I can’t change tftp host ip and storage node ip (update message is ok but just after ip is roolling back to the old one)
      I tried to create another storage but it doesn’t appear, so I delete storage node to recreate new one and still the same, it never appears…

      Thanks for your help !

      Matthieu

      Fog 1.5.9.138
      Debian 11
      Vmware ESXi

      george1421G 1 Reply Last reply Reply Quote 0
      • george1421G
        george1421 Moderator @Matthieu Jacquart
        last edited by

        @matthieu-jacquart said in Change IP fog Server : unable to change Node storage and TFTP IP:

        edit /tftpboot/default.ipxe and /opt/fog/.fogsettings

        I would rerun the fog installer once you updated the .fogsettings file.

        Then go into the web ui -> FOG Configuration -> FOG Settings hit the expand all button. Search for the old IP address.

        Then in Storage Management default storage node fix the IPs there if its not correct.

        That should do it for the updates. I know the wiki page basically says the same thing but this process has always worked in the past.

        Don’t forget to update your dhcp server with the new ip address of your fog server since that value is static in dhcp.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

        Matthieu JacquartM 1 Reply Last reply Reply Quote 0
        • Matthieu JacquartM
          Matthieu Jacquart @george1421
          last edited by

          @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.

          1. 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)
            1.jpg
            2.jpg

          2. 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…
            3.jpg
            4.jpg

          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…

          Fog 1.5.9.138
          Debian 11
          Vmware ESXi

          george1421G 1 Reply Last reply Reply Quote 0
          • george1421G
            george1421 Moderator @Matthieu Jacquart
            last edited by

            @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?

            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

            Matthieu JacquartM 1 Reply Last reply Reply Quote 0
            • Matthieu JacquartM
              Matthieu Jacquart @george1421
              last edited by Matthieu Jacquart

              @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 ?
              Thanks

              Edit : 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 ?

              Fog 1.5.9.138
              Debian 11
              Vmware ESXi

              george1421G 1 Reply Last reply Reply Quote 0
              • george1421G
                george1421 Moderator @Matthieu Jacquart
                last edited by

                @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.

                Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                Matthieu JacquartM 1 Reply Last reply Reply Quote 0
                • Matthieu JacquartM
                  Matthieu Jacquart @george1421
                  last edited by Matthieu Jacquart

                  @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 ?

                  Fog 1.5.9.138
                  Debian 11
                  Vmware ESXi

                  george1421G 1 Reply Last reply Reply Quote 0
                  • george1421G
                    george1421 Moderator @Matthieu Jacquart
                    last edited by

                    @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.

                    Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                    Matthieu JacquartM 1 Reply Last reply Reply Quote 0
                    • Matthieu JacquartM
                      Matthieu Jacquart @george1421
                      last edited by

                      @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.

                      Fog 1.5.9.138
                      Debian 11
                      Vmware ESXi

                      1 Reply Last reply Reply Quote 0
                      • S
                        Sebastian Roth Moderator
                        last edited by

                        @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!!

                        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                        Matthieu JacquartM 1 Reply Last reply Reply Quote 1
                        • Matthieu JacquartM
                          Matthieu Jacquart @Sebastian Roth
                          last edited by

                          @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.html

                          Rerun 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.
                          

                          Fog 1.5.9.138
                          Debian 11
                          Vmware ESXi

                          1 Reply Last reply Reply Quote 1
                          • Matthieu JacquartM
                            Matthieu Jacquart
                            last edited by Matthieu Jacquart

                            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

                            Fog 1.5.9.138
                            Debian 11
                            Vmware ESXi

                            george1421G 1 Reply Last reply Reply Quote 0
                            • george1421G
                              george1421 Moderator @Matthieu Jacquart
                              last edited by

                              @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?

                              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                              Matthieu JacquartM 1 Reply Last reply Reply Quote 0
                              • S
                                Sebastian Roth Moderator
                                last edited by Sebastian Roth

                                @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?

                                Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                1 Reply Last reply Reply Quote 0
                                • Matthieu JacquartM
                                  Matthieu Jacquart @george1421
                                  last edited by

                                  @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
                                  

                                  Fog 1.5.9.138
                                  Debian 11
                                  Vmware ESXi

                                  1 Reply Last reply Reply Quote 1
                                  • 1 / 1
                                  • First post
                                    Last post

                                  163

                                  Online

                                  12.0k

                                  Users

                                  17.3k

                                  Topics

                                  155.2k

                                  Posts
                                  Copyright © 2012-2024 FOG Project