Multicast udpcast options
-
Creating a new topic on this to move the request form another forum post here.
-
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()) {
-
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.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.)
-
@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.
-
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.
-
@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.
-
@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.
-
Sorry for the late answer …
We’ve just upgraded to 1.5.9 and update
Bitrate
andRemit Hello Interval
on «Storage Node» settings page.The generated command was conform and everythings works great !
Thanks a lot