Fog 1.5.4: "wake" feature doesn't send Magic Packet when "deploy" feature does



  • Hello,

    I use FOG 1.5.4 on Debian 8.

    In the web interface, if I do “Hosts” -> I select my device -> “Basic Tasks” -> “Deploy”, my device boot (thanks to wake on lan) and deployement begin then finish. All is fine.

    If I do “Hosts” -> I select the same device -> “Basic Tasks” -> “Advanced” -> “Wake”, my device doesn’t boot. tcpdump on my fog server see no udp packet port 7|9. I see no errors in the apache errors log.

    I read the code (a little bit) and I think my problem is in fogbase.class.php, function “wakeUp(…)”. When I use “wake” feature, I never return from “list($gHost) = self::getSubObjectIDs(…)”. How do I know that? I write “exec(‘touch /tmp/fog.debug’)” after “self::getSubObjectIDs(…)”. When I use “wake” feature, /tmp/fog.debug is not created, when I use “deploy” feature, it is created.

    I’m unable to understand the code of the “getSubObjectIDs(…)” function in fogbase.class.php so my investigation stops here.

    Somebody have the same problem?



  • Just for notice,
    I’m using Fog 1.5.4 normally with ubuntu 16.04 and this function is working fine. Both this option you mentioned and the option to go in the option “power management” work the same.

    Best regards, Igor.



  • @sebastian-roth One of my colleagues suggested me to use echo / var_dump / die() instead of exec(‘touch’).

    So, yes, fogbase.class.php:wakeUp(…) is used when I schedule a wake task and when I deploy an image.

    I compared the value of the following variables in the wakeUp function:

    These variables have these values in both cases: schedule a wake task or deploy an image. So, I was wrong in my first message: my problem isn’t in the wake() function and I’m not stuck on the getSubObjectIDs() function.

    I have tried to echo/var_dump/die() the functions called by the wakeup() function but I didn’t understand. I’m still stuck.


  • Developer

    @glucas I am wondering if the wakeUp function is even called when you schedule a wake task?? Have you tried adding several exec touch commands to that function? Start with one right at the beginning of that function and work your way further down.

    I cannot see why getSubObjectIDs would not return. This is a simple database object query which is performed many times within the web UI. So if there’d be a general issue you’d see it.


 

509
Online

41.8k
Users

12.3k
Topics

116.0k
Posts