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

    Multcasting - Hosts Do Not Contain the Same Image Assignments

    Scheduled Pinned Locked Moved Solved
    Bug Reports
    6
    25
    7.3k
    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.
    • J
      Jon23
      last edited by

      Hey Everyone,

      Has anybody run into the issue where they are unable to start a multicast session because of an error that says ‘Hosts Do Not Contain the Same Image Assignments’?

      Unicasting works great and I have verified that multicasting is enabled on our network gear. We’ve also tried debug mode and all of the tests we ran passed.

      In addition, I have created a group with 2 hosts assigned and confirmed that they have both been assigned the same image. We are using a single disk resizable windows 7 image.

      If anybody has any ideas please assist! Been troubleshooting for hours!!!

      0_1453842319585_2016_01_26_16_03_39_Group_Management_Group_Management_FOG_Open_Source_Computer_Cloning_Solutio.png

      Tom ElliottT ThiagoT 2 Replies Last reply Reply Quote 0
      • Tom ElliottT
        Tom Elliott @Jon23
        last edited by

        @Jon23 what version of fog?

        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

        J H 2 Replies Last reply Reply Quote 0
        • J
          Jon23
          last edited by

          Version: 6116

          bzImage Version: 4.4.0
          bzImage32 Version: 4.4.0

          1 Reply Last reply Reply Quote 0
          • ThiagoT
            Thiago @Jon23
            last edited by

            @Jon23
            The same here, using 6120.
            This happens to me since (not tested before) 6090, but i was a little busy and i don’t informed developers.
            Doing it now.

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

              Moved to bug reports.

              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/

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

                @Tom-Elliott

                This was on a CentOS 7 Hyper-V installation using 6120. The issue still persists in 6124, but appears to be a minor issue with the PHP from the 6018 revision of the doMembersHaveUniformImages function within group.class.php:

                0_1453960644380_issue.jpg

                After changing it back to the previous version (5527) of the function:

                0_1453960913163_2016-01-28 01_00_29-Group Management _ Group Management _ FOG _ Open Source Computer Cloning Solutio.png

                I haven’t had a chance to test it out, but my guess is that multicast is going to work now. I’ll update in the AM.

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

                  @jgurka Hey that’s great work, awesome.

                  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
                  • J
                    jgurka @Wayne Workman
                    last edited by

                    @Wayne-Workman & @Tom-Elliott

                    I had a chance to test out my configuration yesterday and it seemed to be working AOK. Now I’m just working on getting all of the FOG services to play nice with systemd and the nfs services at boot up.

                    I saw Tom changed “array_sum” to “array_count_values” in one of his commits yesterday, but unfortunately that does not resolve the issue. I’m by no means a dev, but from the logic I see it’s always going to return a false value due to the second half of the validation:

                    ... && $images[0] == $this->getHostCount());
                    

                    $images should be counting and outputting the number of hosts in the group (let’s say $images=2). The $images[0] would be # hosts + 1 (so 2+1=3) resulting in there always being an output of one value greater than the number of hosts being pulled from GetHostCount().

                    Since you can’t use a decrementing operator on an array, I’d assume you need to create another array to then subtract from $images.

                    Maybe there is another way for you to validate number of hosts counted in $images and getHostCount() that would be easier. As a temporary fix, I’ve just been removing the second half of the validation so it’ll return true and allow me to create the task.

                    Hope that helps!

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

                      @jgurka
                      I don’t know what you mean.

                      If i count the values returned, the value should be the same as the count of hosts within the group.

                      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

                      J 1 Reply Last reply Reply Quote 0
                      • H
                        Hanz @Tom Elliott
                        last edited by

                        @Tom-Elliott I just messaged you that SVN 6138 is still throwing this error

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

                          @Tom-Elliott

                          I’m not well-versed at all in OOP, but from what I understand, the way you had it setup was that it was taking the highest key in the output array and then adding one onto the value. Apparently that’s how PHP interprets it.

                          Your latest code, as noted by Hanz, is still broken. I was able to alter your previous version of group.class.php (6128) to get both pieces of the validation working properly (at least it appears):

                              public function doMembersHaveUniformImages() {
                                  $images = array_count_values($this->getSubObjectIDs('Host',array('id'=>$this->get('hosts')),'imageID'));
                                  return (count($images) == 1 && count($images['Host'] == $this->getHostCount()));
                          

                          -JG

                          Tom ElliottT Wayne WorkmanW 3 Replies Last reply Reply Quote 1
                          • Tom ElliottT
                            Tom Elliott @jgurka
                            last edited by

                            @jgurka I’m not understanding at all.

                            I can take a look more definitively about the code, but the lines you reference are comparison’s not add/remove/etc…

                            So:

                            ... && $images[0] == $this->getHostCount());
                            

                            From before is compariing if the value in array [0] of variable $images is equal to the value returned by $this->getHostCount().

                            Theres no adding 1 to it or anything.

                            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

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

                              @jgurka Can you please pull down the latest via GIT and make your changes to the source, and then do a commit and push and then a pull requesT?

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

                                @jgurka In regards to this:

                                $images[‘Host’] doesn’t exist.

                                return (count($images) ==1) works, but the problem with this is it isn’t counting the values and matching it to all the hosts in the group.

                                Why?

                                Because count($images) == 1 will return true if only a single host in the group has an image where all the others do not.

                                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

                                  My revised code: explained if you need to understand a bit more.

                                      public function doMembersHaveUniformImages() {
                                          $imageID = $this->getSubObjectIDs('Host',array('id'=>$this->get('hosts')),'imageID','','', '','','array_count_values');
                                          return (count($imageID) == 1 && $imageID[0] == $this->getHostCount());
                                      }
                                  

                                  First, we get all the counts of the values returned. This return will store in an array, not an associative array. Meaning values in this will be:

                                  imageID[0]
                                  imageID[1]
                                  imageID[2]

                                  etc…

                                  the return will count the total number of items in the array,

                                  if it’s 0, or greater than 1, we know they aren’t uniform.

                                  If it is one, the count should match that of the number of hosts in the group.

                                  If that doesn’t match, we know they aren’t uniform.

                                  If both tests pass, we know they are uniform.

                                  Does this help?

                                  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
                                  • J
                                    jgurka @Tom Elliott
                                    last edited by jgurka

                                    @Tom-Elliott

                                    This is how I understand it:

                                    $images = array_count_values…

                                    • Outputs an array of the counts for each item listed.
                                      • E.g., Host = 2, imageID = 1

                                    $images[0]

                                    • References the output array and will take the maximum of existing integer indices as the value.
                                      • If Host = 2 and imageID = 1, PHP would be taking a value of 2.
                                    • [0] specifies the key value. Since PHP starts counting at 0 for integers, the value 0 is actually equal to “maximum of existing integer + 1.”
                                    • So, if $images pulled value of 2 and we add [0], it’s actually doing “2+1=3.”
                                    Tom ElliottT 1 Reply Last reply Reply Quote 0
                                    • Tom ElliottT
                                      Tom Elliott @jgurka
                                      last edited by

                                      @jgurka What you’re saying is wrong. I coded it, I know what it’s doing. I’m trying to help.

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

                                        Further,

                                        Array count values, doesn’t matter how it gets the informatin, it’s only counting the values.

                                        for example:

                                        this[0] = 1
                                        this[1] = 1
                                        this[2] = 2

                                        Array count values on it will return:

                                        this[1] => 2
                                        this[2] => 1

                                        So i do have an error: but the error is not the way you’re seeing it.

                                        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

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

                                          Hopefully this one works:

                                              public function doMembersHaveUniformImages() {
                                                  $imageID = $this->getSubObjectIDs('Host',array('id'=>$this->get('hosts')),'imageID','','', '','','array_count_values');
                                                  $imageID = count($imageID) == 1 ? array_shift($imageID) : 0;
                                                  return $imageID == $this->getHostCount();
                                              }
                                          

                                          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
                                          • J
                                            jgurka @Tom Elliott
                                            last edited by

                                            @Tom-Elliott

                                            ‘Host’ is defined in the output array for $images?

                                            PHP.net reference on array_count_values

                                            • array_count_values() returns an array using the values of array as keys and their frequency in array as values.

                                            This shows an example output at bottom of page for array_count_values

                                            Btw, I’m not trying to attack you at all. 🙂

                                            Tom ElliottT 1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post

                                            162

                                            Online

                                            12.0k

                                            Users

                                            17.3k

                                            Topics

                                            155.2k

                                            Posts
                                            Copyright © 2012-2024 FOG Project