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

    DHCP configuration bug

    Scheduled Pinned Locked Moved Solved
    Bug Reports
    3
    12
    2.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.
    • Wayne WorkmanW
      Wayne Workman
      last edited by Wayne Workman

      Fedora 21 Server minimal, fully updated, r6623
      @Tom-Elliott @Sebastian-Roth

      I helped update one of our sites that uses FOG for dhcp on Friday, and unknown to me, the DHCP configuration didn’t have a DNS or Router address written into it.

      There was widespread panic on Monday morning when no computer in the building worked.

      Here’s why.

      There’s some new lines within /lib/common/functions.sh Line numbers 1846 and 1847:

      [[ $(validip $routeraddress) -eq 0 ]] && echo "    option routers $routeraddress;" >> "$dhcptouse"
      [[ $(validip $dnsaddress) -eq 0 ]] && echo "    option domain-name-servers $dnsaddress;" >> "$dhcptouse"
      

      While I see how these checks would be beneficial, it results in chaos when /opt/fog/.fogsettings has these lines:

      routeraddress="         option routers      10.13.15.254;";
      dnsaddress="    option domain-name-servers      10.51.1.7; ";
      

      Clearly these variables aren’t “valid IPs” because they have the whitespace in them and text such as “option routers” and “option domain-name-servers” and semicolons and so forth, and would fail the validip function, therefore never getting echo’d to the dhcpd.conf file.

      I’ve since fixed the /opt/fog/.fogsettings file so that it’s correct and will work, but that doesn’t mean other people’s are fixed. We need to correct for this.

      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!
      Daily Clean Installation Results:
      https://fogtesting.fogproject.us/
      FOG Reporting:
      https://fog-external-reporting-results.fogproject.us/

      1 Reply Last reply Reply Quote 0
      • Wayne WorkmanW
        Wayne Workman
        last edited by

        I’m going to create a feature request with the ISC-DHCP people.

        there wasn’t an error, let alone even a message that there was no router address set in the DHCP config.

        I feel very strongly that there should be a message for a DHCP option so critical!
        ISC-DHCP gives messages about having other interfaces with other networks available that don’t have declarations. Why not a message for router addresses not being present?

        It’s a trivial thing but it would have immensely helped out. I would have at least caught the problem before I left on Friday, because I always check the status of DHCPD after FOG gets done setting it up - because it’s that important.

        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!
        Daily Clean Installation Results:
        https://fogtesting.fogproject.us/
        FOG Reporting:
        https://fog-external-reporting-results.fogproject.us/

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

          @Wayne-Workman Shall we have a false case for those statements like:

          [[ $(validip $routeraddress) -eq 0 ]] && echo "    option routers $routeraddress;" >> "$dhcptouse" || echo "    option routers-seams-to-not-be-a-valid-ip $routeraddress;" >> "$dhcptouse"
          [[ $(validip $dnsaddress) -eq 0 ]] && echo "    option domain-name-servers $dnsaddress;" >> "$dhcptouse" || echo "    option domain-name-servers-seams-to-not-be-a-valid-ip $dnsaddress;" >> "$dhcptouse"
          

          This would cause the DHCP server to fail on start I’d say!

          Beside that I wonder why you had the full isc-dhcp config string in your .fogsettings file. Cannot find anything in the scripts that might cause this. Cannot reproduce either. Added by hand?

          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

          Wayne WorkmanW 3 Replies Last reply Reply Quote 1
          • Wayne WorkmanW
            Wayne Workman @Sebastian Roth
            last edited by

            @Sebastian-Roth said:

            Beside that I wonder why you had the full isc-dhcp config string in your .fogsettings file. Cannot find anything in the scripts that might cause this. Cannot reproduce either. Added by hand?

            Did not edit by hand. This was installed back when FOG Trunk was still in the 2xxx SVN numbers. The installer used to put the string in the .fogsettings file like that, a long time ago.

            We updated that site from SVN 2xxx to the latest on Friday.

            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!
            Daily Clean Installation Results:
            https://fogtesting.fogproject.us/
            FOG Reporting:
            https://fog-external-reporting-results.fogproject.us/

            1 Reply Last reply Reply Quote 1
            • Wayne WorkmanW
              Wayne Workman @Sebastian Roth
              last edited by

              @Sebastian-Roth said:

              [[ $(validip $routeraddress) -eq 0 ]] && echo "    option routers $routeraddress;" >> "$dhcptouse" || echo "    option routers-seams-to-not-be-a-valid-ip $routeraddress;" >> "$dhcptouse"
              [[ $(validip $dnsaddress) -eq 0 ]] && echo "    option domain-name-servers $dnsaddress;" >> "$dhcptouse" || echo "    option domain-name-servers-seams-to-not-be-a-valid-ip $dnsaddress;" >> "$dhcptouse"
              

              This would cause the DHCP server to fail on start I’d say!

              I am in support of Sebastian’s idea, for the record.

              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!
              Daily Clean Installation Results:
              https://fogtesting.fogproject.us/
              FOG Reporting:
              https://fog-external-reporting-results.fogproject.us/

              1 Reply Last reply Reply Quote 0
              • Wayne WorkmanW
                Wayne Workman @Sebastian Roth
                last edited by

                @Sebastian-Roth https://github.com/FOGProject/fogproject/pull/91

                Created a pull request for these changes.

                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!
                Daily Clean Installation Results:
                https://fogtesting.fogproject.us/
                FOG Reporting:
                https://fog-external-reporting-results.fogproject.us/

                1 Reply Last reply Reply Quote 1
                • Tom ElliottT
                  Tom Elliott
                  last edited by

                  I don’t know that either of those two items are “crucial”. What about the cases where people don’t want to specify a router’s option (e.g. proxyDHCP setup – I’m pretty sure ISC-DHCP is also capable in a proxy dhcp configuration mode) or a DNS address?

                  The way this was handled in the past, neither of those existed to begin with if the admin who’s doing the install didn’t want them. It changed the element from:

                  routeraddress="         option routers      10.13.15.254;";
                  dnsaddress="    option domain-name-servers      10.51.1.7; ";
                  

                  To:

                  routeraddress="         #option routers      x.x.x.x;";
                  dnsaddress="    #option domain-name-servers      x.x.x.x; ";
                  

                  So the lines where “there” but they were commented and unused.

                  I am fixing the updater portion to remove all of the match and replacing it with the valid IP in hopes to correct for the .fogsettings file. I’m also going to fix it in an attempt to read the IP out of the line to test it more appropriately.

                  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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                  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

                  Tom ElliottT 1 Reply Last reply Reply Quote 0
                  • Tom ElliottT
                    Tom Elliott @Tom Elliott
                    last edited by

                    Potential fix pushed.

                    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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                    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
                    • Tom ElliottT
                      Tom Elliott
                      last edited by

                      Any word on this?

                      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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                      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

                      Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                      • Wayne WorkmanW
                        Wayne Workman @Tom Elliott
                        last edited by

                        @Tom-Elliott The guy is in another country, he’s probably enjoying his Friday night right now. 🙂 I’m sure we’ll hear from him on Monday.

                        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!
                        Daily Clean Installation Results:
                        https://fogtesting.fogproject.us/
                        FOG Reporting:
                        https://fog-external-reporting-results.fogproject.us/

                        Tom ElliottT 1 Reply Last reply Reply Quote 0
                        • Tom ElliottT
                          Tom Elliott @Wayne Workman
                          last edited by

                          @Wayne-Workman This was completely your thread lol.

                          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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                          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

                          Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                          • Wayne WorkmanW
                            Wayne Workman @Tom Elliott
                            last edited by

                            @Tom-Elliott oh damn.

                            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!
                            Daily Clean Installation Results:
                            https://fogtesting.fogproject.us/
                            FOG Reporting:
                            https://fog-external-reporting-results.fogproject.us/

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

                            200

                            Online

                            12.1k

                            Users

                            17.3k

                            Topics

                            155.4k

                            Posts
                            Copyright © 2012-2024 FOG Project