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

    Fog 1.6 Multiple Sites, Location not working as intended

    Scheduled Pinned Locked Moved Unsolved FOG Problems
    7 Posts 2 Posters 60 Views
    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.
    • F
      FlareImp
      last edited by

      Fog 1.6.0.14
      OS: Ubuntu 24.04
      Hardware: VMs

      I have several locations that I am currently testing the latest release of Fog 1.6.0.14. I have the location plugin on, and by sites setup with corresponding Storage Groups and Storage Nodes. The Main Fog Server with DB is at Site A, A storage node is set to master at Site B. Everything is replicated but when deploying an Image at site B, it will always pull from Site A, unless the Image has its “Image Primary Storage Group” changed to Site B from Site A. After making this change if I deploy at site A then the Image will pull from site B instead of Site A. The images needed to be accessible from all sites at all times but pull from the specific location rather than across our uplink.

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

        @FlareImp I tested this on 1.6.0.14’s code with the location plugin. A host in a location whose storage group is not the image’s primary group gets that location’s group and node, at task creation and at boot. So the plugin does pick the local node when the host has a location.

        In 1.6, “Site” and “Location” are two separate things. A Site (Sites menu) only controls which users can see and manage which hosts. It has no effect on where an image comes from. A Location (location plugin) is what picks the storage group and node.

        Please check these for one Site B host:

        • Open the host, go to its Location tab. Is it set to the Site B location?
        • Open that location. Which storage group and which storage node does it show?
        • Is the image listed in the Site B storage group (Image > Storage Groups tab)?

        If the host has no location, it uses the image’s primary group, which is what you see.

        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

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

          @Tom-Elliott My Apologies, when I say site, I’m referring to the location where my fog VMs are at, not what is within the Fog WebGUI.

          Open the host, go to its Location tab. Is it set to the Site B location?
          All 31 Computers are set to “Site B”

          Open that location. Which storage group and which storage node does it show?
          The Storage Group is “SiteB” and the Storage Node is “SiteB-Test”

          Is the image listed in the Site B storage group (Image > Storage Groups tab)?
          The Image is associated with “Site A” and “Site B”

          F 1 Reply Last reply Reply Quote 0
          • F
            FlareImp @FlareImp
            last edited by FlareImp

            When I deploy the image it will show the correct storage node under tasks up until the point of actual deployment, then it switches back to the default location of the Main Fog Server.

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

              @FlareImp Thank you, that detail found it. This is a bug in the 1.6 installer, not your setup.

              What happens: a storage node install does not download the plugins, so your Site B node has no location plugin in its web root. Your Site B clients PXE boot from that node, so its boot.php answers them. Without the plugin, it falls back to the image’s primary storage group and changes the task to that node. That is the switch you see when the deploy starts.

              The fix: https://github.com/FOGProject/fogproject/pull/2050. It is on dev-branch now and reaches stable in the next stable release.

              You have two ways to get going before then.

              Option 1: copy the plugins to the node (stays on 1.6.0.14). Run this on the Site B node as root:

              rsync -a root@<main-server-ip>:/var/www/html/fog/lib/plugins/ /var/www/html/fog/lib/plugins/
              

              Then deploy again. A reinstall of the storage node removes the copy, so repeat it after each storage node install until you are on the fixed release.

              Option 2: move to dev-branch (tests the real fix). Update the main server FIRST, then the storage node. Do not update only the storage node: dev-branch has a newer database schema than 1.6.0.14, and a storage node never updates the schema. Until the main server updates it, the node sends every PXE boot to the schema update page instead of the boot menu.

              On the main server, then on the Site B node, from your fogproject checkout:

              cd /path/to/fogproject/bin
              sudo ./updatefog.sh --branch dev-branch
              

              On the main server, answer Y when the installer asks to update the database schema. Finish the main server before you start the node. --branch is a one-off: the next plain updatefog.sh run goes back to the stable channel.

              Either way, please let me know if the Site B deploy now pulls from SiteB-Test.

              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

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

                @Tom-Elliott Option 1 and doing a reboot of the site B node has taken care of the issue. Thanks for your awesomness!

                I have come across another problem though. Would you like a new thread started or just add it here?

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

                  @FlareImp What’s the issue?

                  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
                  • 1 / 1
                  • First post
                    Last post

                  70

                  Online

                  12.8k

                  Users

                  17.7k

                  Topics

                  157.3k

                  Posts
                  Copyright © 2012-2026 FOG Project