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

    Multicast udpcast options

    Scheduled Pinned Locked Moved
    Feature Request
    4
    8
    913
    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.
    • S
      Sebastian Roth Moderator
      last edited by

      Creating a new topic on this to move the request form another forum post here.

      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
      • L
        lwafflard
        last edited by

        We use FOG 1.5.5, Multicast over different VLAN and set --mcast-rdv-address configuration setting.

        By default with this setting, udp-receiver (on each client) and a ttl set to 1 can’t reach server.

        One workaround is to wait all client reach the partclone screen and then restart the FOGMulticastManager service.

        Another one is to ask udp-sender to rebroadcasts the HELLO packet with the --rexmit-hello-interval parameter. With this setting, all receivers are able to find the Fog Server without restarting any service.

        Would it be possible to add a field in the multicast settings of the Web UI for extra-options ? (--max-bitrate is useful too )

        Actually to add these options we edit fog/lib/service/multicasttask.class.php (line 495)

                  $buildcmd = array_values(array_filter($buildcmd));
        // Add our options
        $buildcmd[]=' --rexmit-hello-interval 5000'; //every 5 seconds
        $buildcmd[]=' --max-bitrate 600m';           // max bandwith, no stress for others computers
        // End extra options
                  switch ($this->getImageType()) {
        
        
        Tom ElliottT 1 Reply Last reply Reply Quote 0
        • Tom ElliottT
          Tom Elliott @lwafflard
          last edited by Tom Elliott

          @lwafflard

          It would not be too difficult to add the --rexmit-hello-interval

          I’m pretty sure the --max-bitrate can already be defined by setting the bitrate element of the storage node that will be handling the Multicast stream.

          https://github.com/FOGProject/fogproject/blob/dev-branch/packages/web/lib/service/multicasttask.class.php#L460

          Adding addition commands would be useful is think, though we need a common mechanism in order to break out the extra commands. (E.G. comma separated list to break out into an array of additional commands)

          Should these commands be per Master Storage Node, or global?

          Again, not hard to add, but need to know the best approach. For that I consult with @Sebastian-Roth and @Quazz (or anybody else who uses Multicast).

          I’m leaning more towards per master storage node so each node can be configured independently (which is why we did the same thing for bitrate as bitrates would seem – to me – to be per node’s network capabilities.)

          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 1
          • S
            Sebastian Roth Moderator
            last edited by

            @Tom-Elliott I am with you here. Would make it per Master Storage Node instead of global. Though I have to say that I won’t get to implement this as there are too many other things on my list.

            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
            • F
              Fernando Gietz Developer
              last edited by Fernando Gietz

              Hi @Sebastian-Roth,

              The new code in the multicasttask.class.php from L418 to L494 is

                  public function getCMD()
                  {
                      unset(
                          $filelist,
                          $buildcmd,
                          $cmd
                      );
                      list(
                          $address,
                          $duplex,
                          $multicastrdv,
                          $maxwait,
                          $maxbitrate,
                          $rexmithello
                      ) = self::getSubObjectIDs(
                          'Service',
                          array(
                              'name' => array(
                                  'FOG_MULTICAST_ADDRESS',
                                  'FOG_MULTICAST_DUPLEX',
                                  'FOG_MULTICAST_RENDEZVOUS',
                                  'FOG_UDPCAST_MAXWAIT',
                                  'FOG_MULTICAST_BITRATE',
                                  'FOG_MULTICAST_HELLO'
              
                              )
                          ),
                          'value',
                          false,
                          'AND',
                          'name',
                          false,
                          ''
                      );
                      if ($address) {
                          $address = long2ip(
                              ip2long($address) + (
                                  (
                                      $this->getPortBase() / 2 + 1
                                  ) % self::getSetting('FOG_MULTICAST_MAX_SESSIONS')
                              )
                          );
                      }
                      $buildcmd = array(
                          UDPSENDERPATH,
                          (
                              $this->getBitrate() ?
                              sprintf(' --max-bitrate %s', $this->getBitrate()) :
                              null
                          ),
                          (
                              $this->getInterface() ?
                              sprintf(' --interface %s', $this->getInterface()) :
                              null
                          ),
                          sprintf(
                              ' --min-receivers %d',
                              (
                                  $this->getClientCount() ?
                                  $this->getClientCount():
                                  self::getClass('HostManager')->count()
                              )
                          ),
                          sprintf(' --max-wait %s', '%d'),
                          (
                              $address ?
                              sprintf(' --mcast-data-address %s', $address) :
                              null
                          ),
                          (
                              $multicastrdv ?
                              sprintf(' --mcast-rdv-address %s', $multicastrdv) :
                              null
                          ),
                          sprintf(' --portbase %s', $this->getPortBase()),
                          sprintf(' %s', $duplex),
                          (
                              $maxbitrate ?
                              sprintf(' --max-bitrate %s', $maxbitrate) :
                              null
                          ),
                          (
                              $rexmithello ?
                              sprintf(' --rexmit-hello-interval %s', $rexmithello) :
                              null
                          ),
                          ' --ttl 32',
                          ' --nokbd',
                          ' --nopointopoint',
                      );
                      $buildcmd = array_values(array_filter($buildcmd));
              

              I added the $maxbitrate, $rexmithello variables and the options in the $buildcmd and two new global variables: ‘FOG_MULTICAST_BITRATE’ and ‘FOG_MULTICAST_HELLO’.

              (
                              $maxbitrate ?
                              sprintf(' --max-bitrate %s', $maxbitrate) :
                              null
                          ),
                          (
                              $rexmithello ?
                              sprintf(' --rexmit-hello-interval %s', $rexmithello) :
                              null
                          ),
              

              Is necessary change the schema.php to add the two new global variables: ‘FOG_MULTICAST_BITRATE’, ‘FOG_MULTICAST_HELLO’. This variables are strings.

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

                @Fernando-Gietz Would you mind matching up working-1.6 schema.php and the working/dev-branch schema.php?

                From what I can tell, the changes between 1.5.x and 1.6 schema won’t impact the 1.5.x much from what 1.6 is adding/changing. The only part I see a little concern is the FOG_USER_VALIDPASSCHARS as in 1.6 its switching to a regex pattern vs implicit keys.

                Then make this db changes from 1.5 to 1.6 at least be common.

                Also, the recommendation for the max-bitrate issue is it already exists and is based on the Master Storage Node’s bitrate setting. The rexmit-hello-interval should also be added based on the Master storage node (as opposed to global values.)

                This is simply because the global value means EVERYTHING that does multicast will use the same rexmit and bitrate settings. Having it per master storage node makes this much more dynamic and site specific.

                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
                  Fernando Gietz Developer @Tom Elliott
                  last edited by Fernando Gietz

                  @Tom-Elliott said in Multicast udpcast options:

                  Also, the recommendation for the max-bitrate issue is it already exists and is based on the Master Storage Node’s bitrate setting. The rexmit-hello-interval should also be added based on the Master storage node (as opposed to global values.)
                  This is simply because the global value means EVERYTHING that does multicast will use the same rexmit and bitrate settings. Having it per master storage node makes this much more dynamic and site specific.

                  You are right. Is better have a configuration per node than a global one.

                  I have done:

                  #git diff working-1.6…working – schema.php

                  And return me a lot of changes 😞 The new line in schema.php will be like this:

                  // 264
                  $this->schema[] = array(
                      "ALTER TABLE `nfsGroupMembers` ADD COLUMN `ngmHelloInterval` "
                      . "VARCHAR(8) AFTER `ngmMaxBitrate`",
                  );
                  

                  I define the ngmHelloInterval like string and not like integer.

                  1 Reply Last reply Reply Quote 0
                  • L
                    lwafflard
                    last edited by

                    Sorry for the late answer …

                    We’ve just upgraded to 1.5.9 and update Bitrate and Remit Hello Interval on «Storage Node» settings page.

                    The generated command was conform and everythings works great !

                    Thanks a lot

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

                    248

                    Online

                    12.0k

                    Users

                    17.3k

                    Topics

                    155.2k

                    Posts
                    Copyright © 2012-2024 FOG Project