• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. rado
    3. Posts
    R
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 49
    • Best 0
    • Controversial 0
    • Groups 0

    Posts made by rado

    • RE: Support for multiple nics / subnets

      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.
      posted in Feature Request
      R
      rado
    • RE: Latest FOG 0.33b

      Moved to: [URL=‘http://fogproject.org/forum/threads/support-for-multiple-nics-subnets.675/#post-22319’][URL=“http://fogproject.org/forum/threads/support-for-multiple-nics-subnets.675/#post-22319”]Support for multiple nics / subnets[/URL][/URL]

      posted in General
      R
      rado
    • RE: Latest FOG 0.33b

      Hi, I created (very) simple UML diagram of FOG 0.33. Just classes (that I found in /var/www/fog/lib/fog/) and their associations (no functions and variables of classes) and for now, doesn’t look nice, but it’s start. It’s been created in UMLet. I was not able to upload source (it has .uxf extension), so just .pdf. Is it possible to allow .uxf?

      [url=“/_imported_xf_attachments/0/512_fog_0.33_v01.pdf?:”]fog_0.33_v01.pdf[/url]

      posted in General
      R
      rado
    • RE: Latest FOG 0.33b

      It probably would need to be changed, because argument $groupName would not work in 0.33. As I saw, when you create multicast task in Tasks Management, the task gets not the same name as group (as did in 0.32).

      posted in General
      R
      rado
    • RE: Latest FOG 0.33b

      [quote=“Tom Elliott, post: 21780, member: 7271”]I think, ultimately, you would need to assign an interface to a group. The interface would have to be on the physical fog server (eth0, eth1, eth2, etc…)
      [/quote]

      Ok, this I have done.

      [quote=“Tom Elliott, post: 21780, member: 7271”]
      Basically this would require adding a field to the group table on the fog database (pretty simple ultimate.)
      [/quote]

      This too. Basically the same as I did in 0.32.

      [quote=“Tom Elliott, post: 21780, member: 7271”]
      Then on the GroupManagementPage, add a selector to choose the interface (based on the interfaces available to that StorageNode) (Not as simple.)
      [/quote]

      For now, I think, I may skip this. When the basic functionality will work, I can look at this. I just added groups’ interface manually to db.

      [quote=“Tom Elliott, post: 21780, member: 7271”]
      Then we’d have to get the group id of the task (not simple again).
      [/quote]

      By this, you mean groupID from groups table?

      [quote=“Tom Elliott, post: 21780, member: 7271”]
      Then we’d have to change that particular line:
      [php]‘interface’ => $StorageNode->get(‘interface’),[/php]

      To something that gets that groupid->interface association.
      [/quote]

      In 0.32 I created this function in /var/www/fog/commons/functions.include.php:
      [PHP]function getGroupsInterface( $conn, $groupName )
      {
      if ( $conn != null && $groupName != null )
      {
      $sql = “select groupInterface from groups where groupName='”. $groupName .“'”;
      $res = mysql_query( $sql, $conn ) or criticalError( mysql_error(), _(“FOG :: Database error!”) );
      $ar = mysql_fetch_array( $res );
      //echo “funkcia: '”. $ar[“groupInterface”] . “'”;

                  return $ar["groupInterface"];
          }
      

      }
      [/PHP]

      Would it be possible to use it somehow here?

      [quote=“Tom Elliott, post: 21780, member: 7271”]
      I have to think of the logic behind what’s actually needed to do this. I will say, however, it may take a while, but it is possble.[/quote]

      OK.

      posted in General
      R
      rado
    • RE: Latest FOG 0.33b

      I’m trying to understand multicast code in 0.33. Is it true, that when creating multicast task, the code from /var/www/fog/management/includes/tasks.confirm.include.php, concretely function createMulticastJob is not used? I now found out, that there is now used code from /var/www/fog/lib/fog/Host.class.php and interface is pulled from storage node (see code below), am I right? Is it this, you were talking about in the other topic (Support for multiple nics)? Your quote:

      [QUOTE]The only issue I foresee is the storage of the “2nd” interface would have to be either group and/or host related.[/QUOTE]

      You also said there, that:

      [QUOTE]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. [/QUOTE]

      Can you please tell me how? I have only a small picture of FOG’s 0.33 code and digging the code takes much time, so if you have any idea, it would be much appreciated and I would be able to move faster. I just need small intro which parts (functions, classes, or even scripts would perhaps help) are mainly involved.

      My thought now is to change /var/www/fog/lib/fog/Host.class.php, concretely this line (719):
      [CODE]‘interface’ => $StorageNode->get(‘interface’),[/CODE]
      somehow, as to not pull interface from storage node, but from group. Would it break something?

      Or is it possible to run multiple storage nodes on the same physical (virtual) server each running on different interface?

      Thanks.

      posted in General
      R
      rado
    • RE: Latest FOG 0.33b

      If it is possible, maybe try to kill all tasks in FOG manager, then truncate multicastSession and multicastSession db tables (maybe even tasks table) - see command somewhere above, kill all udp-sender processes, delete pxe configs for hosts, or maybe restart FOGMulticastManager. To be sure everything is clean (thouh, I’m not sure, if this is enough). And then start it again.

      posted in General
      R
      rado
    • RE: Latest FOG 0.33b

      hi, it’s output from ps? I have the first one in /var/log/syslog (debian), it’s run every half an hour from cron (maybe messed up cron?), but not the second one.

      posted in General
      R
      rado
    • RE: Latest FOG 0.33b

      OK, seems to work. Thanks. Bye

      posted in General
      R
      rado
    • RE: Latest FOG 0.33b

      Yes, it does. But now it associates only one individual task with multicast task:

      [CODE]mysql> select * from multicastSessionsAssoc;
      ±------±-----±----+
      | msaID | msID | tID |
      ±------±-----±----+
      | 6 | 6 | 93 |
      ±------±-----±----+
      1 row in set (0.00 sec)
      [/CODE]

      Are you going to work on it now? If yes, I could test, will be here until 22:00 or so.

      posted in General
      R
      rado
    • RE: Latest FOG 0.33b

      I tried to debug that port issue, but don’t know php enough - how to write value of variable to file? I tried firstly echo $port; to show it in fog (this worked in 0.32), but in 0.33 it probably get’s to fast refreshed, so I don’t see anything. Then I found file_put_contents() function but it doesn’t seem to work - I use it like this: file_put_contents(“port_debug_rado”, $port); but can’t find file port_debug_rado. Or is there any other way?

      posted in General
      R
      rado
    • RE: Latest FOG 0.33b

      I am creating one task to multiple hosts, from Task Management -> List All Groups -> Deploy Multicast. No other tasks or even processes are running when I start task - every time I kill udp-sender (if there is some hanging), check tasks in Active Tasks and Active Multicast Tasks, and now even sessionMulticast and sessionMulticastAssoc tables. So there shouldn’t be any collision, if you have this on mind in your 4th sentence.

      posted in General
      R
      rado
    • RE: Latest FOG 0.33b

      I’m not sure if I understand you now 🙂 but, when you create multicast tasks, it should create pxe file per client (MAC) and 1st my client got now multicast base port 45084 and 2nd got now 9964, which is, as I in the meantime found out that it’s some default port (I see it in globalSettings db table). But it was not every time this one, it looked like this client (and it seems that every time it’s the same client) gets port from previous multicast session (and perhaps now, as I started this multicast task after truncating those session tables, it gets some default value).

      I guess, creating pxe config file is based on hostID, which correlates, this is how my hosts table for those hosts looks like:

      [CODE]mysql> select * from hosts;
      ±-------±---------±------------------------------------------------±-------±----------±-------------±--------------------±-------------±------------------±----------±-------------±---------±-----------±-----------±-----------------±---------------±-----------±-----------+
      | hostID | hostName | hostDesc | hostIP | hostImage | hostBuilding | hostCreateDate | hostCreateBy | hostMAC | hostUseAD | hostADDomain | hostADOU | hostADUser | hostADPass | hostPrinterLevel | hostKernelArgs | hostKernel | hostDevice |
      ±-------±---------±------------------------------------------------±-------±----------±-------------±--------------------±-------------±------------------±----------±-------------±---------±-----------±-----------±-----------------±---------------±-----------±-----------+
      | 1 | 772 | Created by FOG Reg on January 20, 2014, 3:13 pm | | 6 | 0 | 2014-01-20 15:13:34 | FOGREG | d4:3d:7e:0c:8c:6f | | | | | | | | | |
      | 2 | 768 | Created by FOG Reg on January 20, 2014, 3:15 pm | | 6 | 0 | 2014-01-20 15:15:48 | FOGREG | d4:3d:7e:0c:90:ed | | | | | | | | | |
      [/CODE]

      edit: and host 772 gets wrong port

      posted in General
      R
      rado
    • RE: Latest FOG 0.33b

      You are welcome, Tom. Now multicast seems to work, but there is stil the issue with different ports assigned to hosts. I’m going to look at it.

      posted in General
      R
      rado
    • RE: Latest FOG 0.33b

      OK, I was going to reinstall FOG and thought I should backup db first. So I did and found in sql dump file a table (multicastSessionAssoc) with lot of entries, so now I understand why it didn’t work as I deleted only entries in multicastSession and not here 🙂

      Now everything seems to work, even multicast task starts (not only individual tasks), but 2 issues:
      [LIST=1]
      []one host gets proper pxe config file with good porbase (say 58720) but second host gets 224 (it seems lik 1. octet of multicast address), so I have to change it manualy to start multicasting
      [
      ]but then it complains it’s not partclone image (I created it yesterday with 0.33 fog, so it should be partclone image); Is this what you are talking above? This is how it looks like in both versions:
      [LIST=1]
      []0.32 is gunzip -c “/images/test/d1p1.img” | /usr/local/sbin/udp-sender … (I have a screenshot)
      [
      ]0.33 is gunzip -c “/images/cpu/”|/usr/local/sbin/udp-sender …
      [/LIST]
      [/LIST]

      posted in General
      R
      rado
    • RE: Latest FOG 0.33b

      Do you have any other tip (if the restart was for me)? If not, I’m going to reinstall it.

      posted in General
      R
      rado
    • RE: Latest FOG 0.33b

      if the restart was to me - it didn’t help.
      but thanks

      posted in General
      R
      rado
    • RE: Latest FOG 0.33b

      [quote=“Tom Elliott, post: 21684, member: 7271”]If you downloaded the svn to do the install, from the trunk directory (or whatever you named it) perform:
      [code]svn update[/code]

      Then re-run the installer:
      [code]cd bin
      ./installfog.sh[/code][/quote]

      thanks, worked.

      But is multicast working? I tried to create multicast task in latest (1124) revision. Got the same blank screen as previously (see post #504), so changed [I]$MulticasetSessionAssoc->save();[/I] and blank screen was solved. But there was no multicast task in Active Multicast Tasks (only individual tasks in Active Tasks) - this happend even in 1118. And creating task took too long (few minutes)[I] - [/I]I found out, that mysql daemon is causing high load. Then I looked at [I]multicastSessions[/I] table and found circa 60000 tasks with random base ports and -1 msState. So I deleted them manually and now I’m getting another blank screen and in apache error log there is:

      [I][CODE]PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 16 bytes) in /var/www/fog/lib/fog/FOGManagerController.class.php on line 124, referer: http://localhost:8081/fog/management/index.php?node=tasks&sub=listgroups[/CODE][/I]

      So, perhaps I deleted too much or what. I tried to figure out what’s wrong.

      Rev. 1125 didn’t help.[I][/I]

      posted in General
      R
      rado
    • RE: Latest FOG 0.33b

      Hi guys, I don’t wanna disturb you, but just small question 🙂 how to update between revisions? Just download from svn and then bin/installfog.sh? I would try it myself, but don’t wanna mess my current installation. Thanks

      posted in General
      R
      rado
    • RE: Latest FOG 0.33b

      Hi, I’m not sure if you know about it (search didn’t found anything), but probably found bug in /var/www/fog/lib/fog/Host.class.php, line 850

      There is a typo in [I]$MulticasetSessionAssoc->save();[/I] - should be without “e” in Multicaset, as after the change creating multicast task works - before I was getting blank screen.

      Btw, can you say, how far is 0.33 from final release? (I asked you this in the other topic, but you probably missed it). Thanks

      edit: I’m still using 1118, so perhaps it’s already fixed…
      How is it possible to update between revisions? Just download from svn and bin/installfog.sh? Thanks

      posted in General
      R
      rado
    • 1
    • 2
    • 3
    • 2 / 3