Support for multiple nics / subnets



  • A way to setup fog with the IP addresses of all the nics.

    Maybe add an extra layer / check to see which subnet the client is from and amend fog’s IP to the correct subnet accordingly. This would make this immensely more efficient.

    As it stands a fog server has to be built for each and every subnet.

    If there’s a way to hack around this I’m all ears :)



  • OK, so here is what’s needed to switch FOG 1.2.0 between networks (interfaces):

    • FOG System Settings -> FOG Configuration:
      * General Settings: FOG_WOL_HOST (change ip); FOG_WOL_INTERFACE (change iface)
      * Multicast Settings: FOG_UDPCAST_INTERFACE (change iface)
      * NFS Server: FOG_NFS_ETH_MONITOR (change iface)
      * TFTP Server: FOG_TFTP_HOST (change ip)
      * Web Server: FOG_WEB_HOST (change ip)
    • Storage Management -> DefaultMember:
      * IP Address (change ip)
      * Interface: (no changes)
    • /tftpboot/default.ipxe: change ip in last line
    • change default gateway using ip command (to make wake on lan work - it uses default gw for broadcasts):
      * ip r del default - delete current
      * ip r add default via <gw for second network>


  • It seem to work - svn 2014 - creates udp-sender processes with right interface no matter what’s in /var/www/fog/lib/fog/Config.class.php. Didn’t test deploying.


  • Senior Developer

    Dynamics, I am only guessing here that it works in this way now that we’re pulling from db. You wouldn’t have to restart the FOGMulticastManager service to change which interface you’re attempting to use.



  • So, if I upgrade to SVN 2004, it should no longer use config and there will by only database (via FOG Configuration web interface) as configuration storage?

    And what’s “dynamics”?

    Thanks.


  • Senior Developer

    SVN 2004 now uses the FOG_UDPCAST_INTERFACE rather than the defined interface in Config.class.php.


  • Senior Developer

    I think UDPCAST_INTERFACE is the intentional item to be used for dynamics. I can take a look on the SVN side of the house and get the interface from there.



  • Hi, thanks. I tried this already, but tried it once again and the same result. Then I realized, that maybe it needs /etc/init.d/FOGMulticastManager restart and yes, now the interface is changed :)

    Few questions however - what is that setting - FOG_UDPCAST_INTERFACE - in FOG Configuration for? And why are there 2 configuration places - database and config file? Is it for some legacy reasons, or?


  • Senior Developer

    the interface for udp-sender is stored in /var/www/fog/lib/fog/Config.class.php under svc_setting method. I believe it’s defined value is:
    MULTICASTINTERFACE



  • So, finally I’ve time to look at this again. I decided that I at first try to tinker with interface settings. But I can’t find right setting which affects udp-sender’s interface - I tried settings in FOG Configuration (FOG_WOL_INTERFACE, FOG_UDPCAST_INTERFACE, FOG_NFS_ETH_MONITOR), in Storage Management and in /var/www/fog/lib/fog/Config.class.php, and some combinations of these, but nothing works.

    What’s the right way to change it? Is there some other setting I missed?

    Thanks.



  • Ok, thanks.


  • Senior Developer

    Yeah,

    The classes are all separated into their own parts.

    First Part: (These files handle the sessions generated.)
    MulticastSessions.class.php
    MulticastSessionsManager.class.php

    Second Part: (These files associate the Task to the Session based on the Image)
    MulticastSessionsAssociation.class.php
    MulticastSessionsAssociationManager.class.php

    Third Part: (These files deal with Task Creation and Command Creation:
    Host.class.php (The function createImagePackage generates the taskings.)
    MulticastTask.class.php (This file creates the command line and handles the stuff on the server.)



  • Thanks much Tom. I will look at it when time permits (I suppose in few weeks).

    [quote=“Tom Elliott, post: 22323, member: 7271”]The multicast works based on three areas.
    The first part: (The actual classes)
    [/quote]

    What’s the second part, is there any? Thanks.


  • Senior Developer

    The multicast works based on three areas.

    The first part: (The actual classes)
    MulticastSessions.class.php (Just to create the actual session for use. Multiple or individual system.)
    MulticastSessionsManager.class.php (Just the manager for finding/obtaining the sessions.)
    MulticastSessionsAssociation.class.php (Used for the host/task relationship, Number of pc’s in tasking are counted through this. Associates the Session with the Tasks and Hosts.)
    MulticastSessionsAssociationManager.class.php (Just to help find which tasks are part of a specific session.)
    MulticastTask.class.php (Used to actually generate the command, kill the task when complete, update relevant fields as necessary.)
    Host.class.php (The function createImagePackage() actually generates the package so hosts can operate as with any other tasking generated, but has separated methods to deal with multicast vs. unicast.)

    That’s pretty much it. It looks like a lot, but it really isn’t. The main files you’ll need to work with are:
    MulticastSessions.class.php (To generate the session based on interface)
    MulticastSessionsAssociation.class.php (So you can assign hosts/groups with a specific interface, this links the session with the tasking.)
    MulticastTask.class.php (Really just to make sure the interface setting is where you need it.)



  • Originally mistakenly posted to “Latest FOG 0.33b” topic.

    Hi. So I decided not to work on multiinterface patch - because of time and because there is too much change on 0.33 now and haven't time to figure out which code is involved. So I will postpone it for now.
     
    If you would have time, Tom (or anybody who has some idea about it), to write down the internals of multicasting in FOG 0.33 - which parts of code are involved (I think it should be enough which classes and scripts (just file names) - I think I would be able to understand the logic when I have an idea where to start from. If not, I will ask :) ), it would be really good - I will look here occasionally.


  • So, I have FOG 0.33 running. Now I’m uploading image (because I accidentally deleted previous one). Tomorrow will test multicast - should I test something concrete regarding multicast?

    [quote=“Tom Elliott, post: 21567, member: 7271”]The only issue I foresee is [B]the storage[/B] of the “2nd” interface would have to be either group and/or host related. This is because in 0.33, you can create individual multicast jobs to a host. I haven’t, yet, figured out how to kill a previously generated task and recreate a new one (while also changing the task and pxe files) to reflect the new change. The port would still work as the original task would have been used.[/QUOTE]

    Are you talking about storage node? Or?

    [quote=“Tom Elliott, post: 21567, member: 7271”]
    I believe the issue you were initially running into was because the ports were all the same. It wouldn’t matter, as far as I can tell, if two interfaces were using the same port, which is why you had to create different ports. The same port was causing your issue, not the interface.

    I Imagine that you’d only need two interfaces, or more, if you’re trying to separate different segments of the network for testing or some real major need. However, it’d be easier (and you could use the same ports, though it may confuse systems trying to communicate on that/those ports) to setup two separate server rather than trying to make your server perform all the work.
    [/quote]

    What do you mean by this issue? I don’t have problems with ports, just wanted to get fog running on 2 or more ifaces.


  • Senior Developer

    svn.mastacontrola.com/svn/freeghost, (That was when I first created my svn server.) (DO NOT USE THIS ONE.)
    svn.mastacontrola.com/p/freeghost/code/trunk (Syncs every hour, and I just released r1118, so it may not have synced yet.) You can use it, but I would use:

    svn.code.sf.net/p/freeghost/code/trunk (DING DING DING DING, Use this one for the most accurate.)



  • Hi Tom, yes, I can. I have no special reason to change 0.32 code, just had it installed and didn’t know how usable is 0.33. So, I try it. I’m not sure with some of your sentences, but maybe I should first take look at the changes and then I ask.
    How far are you from proper release of 0.33 (I don’t know the right name, is it beta?, but hope you understand)?

    Can you pleas tell me which svn link should I use? I found these 3:
    [url]https://svn.mastacontrola.com/svn/freeghost[/url]/ but it says it’s revision 1
    [url]https://svn.mastacontrola.com/p/freeghost/code/trunk/[/url] says revision 1117
    [url]https://svn.code.sf.net/p/freeghost/code/trunk[/url] says 1118


  • Senior Developer

    rado,
    Unless there’s a particular reason, can you test out 0.33b code? I got multicast tasks working. I can create multiple tasks, though I haven’t played too much with interfaces. I imagine, however, with my new understanding, it’s relatively easy to setup. The only issue I foresee is the storage of the “2nd” interface would have to be either group and/or host related. This is because in 0.33, you can create individual multicast jobs to a host. I haven’t, yet, figured out how to kill a previously generated task and recreate a new one (while also changing the task and pxe files) to reflect the new change. The port would still work as the original task would have been used.

    I believe the issue you were initially running into was because the ports were all the same. It wouldn’t matter, as far as I can tell, if two interfaces were using the same port, which is why you had to create different ports. The same port was causing your issue, not the interface.

    I Imagine that you’d only need two interfaces, or more, if you’re trying to separate different segments of the network for testing or some real major need. However, it’d be easier (and you could use the same ports, though it may confuse systems trying to communicate on that/those ports) to setup two separate server rather than trying to make your server perform all the work.



  • So, small progress. I was able to change FOG to create 2 simultaneous multicast tasks with different interfaces and base ports (but didn’t test it yet). I changed FOGMulticastManager to query interface from db (added column groupInterface to groups table and updated my groups with interface) instead of from /opt/fog/service/etc/config.php. And changed /var/www/fog/commons/functions.include.php (added function getGroupsInterface( $conn, $taskName )) and /var/www/fog/management/includes/tasks.confirm.include.php (lines for getting groups interface and adding this interface to function createMulticastJob).

    Just wanted to know if my initial idea would work. If somebody is interested, feel free to comment. No time today, will continue next week.


Log in to reply
 

405
Online

38955
Users

10706
Topics

101576
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.