Auto registration for unregistered hosts with Quick registration and invetory



  • I want to ask if there is a simple way to not continue booting but select Quick registration and invetory from menu automatically for unregistered hosts only and if possible shutdown after this. Advanced menu? How? I know there is an option for importing csv file, but its just room for errors with obtaining and saving mac address…

    We will be installing 150 new computers and I want use fog, and have them all registered for future use. My idea was connect few of them at one time, register them and after registration assign to “upload” group and upload prepared image. I found some options in fog settings for auto naming and image assigning, which is great, but I would like to make this more automatic.



  • [quote=“Tom Elliott, post: 45876, member: 7271”]Can you try 3279?[/quote]
    I installed 3279 and at least the error didn’t reappeared. Can’t tell if it fixed it as I fixed it with enabling mcrypt odule as I wrote before…



  • OK it seems for some reason mcrypt php module was installed but not enabled.
    Fix:
    php5enmod mcrypt
    service apache2 restart


  • Senior Developer

    Can you try 3279? The reason mcrypt_get_iv_size is failing, in my guesstimation is that my trying to keep errors from downloading the client files was what screwed this up for you. It should work better now, with any luck.



  • Version: 3278
    And there was no log in apache error log file, only in access. I tried turn on PHP errors displaying and there is one fatal error:

    [B]Fatal error[/B]: Call to undefined function mcrypt_get_iv_size() in [B]/var/www/fog/lib/fog/FOGBase.class.php[/B] on line [B]301[/B]


  • Senior Developer

    What revision and do you have Apache error logs when the white screen occurs?



  • Often when I update to the newest trunk I cannot change Fog Settings from web page (end in blank page, setting not changed, I must edit it directly in DB). Is there something I can do to fix this, or just wait to another trunk which address this?



  • OK, I’ll try update to latest trunk.


  • Testers

    I think this was addressed in a later SVN.



  • Just had third case - notice message “Host is not valid.” instead of “Done, with imaging”. Again delete from database, and host regiter succefully through automatic Quick registration.



  • Have som problems with Fog - some computers don’t register correctly and when I checked the database, the host is registered with hostID 0 - related MAC address is in the table hostMAC (with hostID 0) but host is not showing in hosts list, and is not recognised as registered. Using older trunk version 3153.

    When I manualy delete these two records from database, host register correctly. I have only two PC with thos problem and dont know why these two.


  • Testers

    It should be possible to customize your fog to allow for this but its not settable in fog you would have to see how the web gui does it when you manually deploy an image and check the shutdown after task box.



  • Is it possible to shutdown computer after auto populating with given image instead of restarting (and booting from HD)?


  • Senior Developer

    In as simple terms as possible, yes!



  • So, the solution could be install the trunk version?



  • Ahh, OK. I probably didn’t look hard/long enough. I am really good at missing information that’s right in front of me. I just got started with FOG last week and I must say I’m thoroughly impressed with it.


  • Senior Developer

    This already exists for dev fog.



  • Sorry for the wall in advance. I actually was looking for this feature myself, looked at the Quick Registration Auto Population but found it didnt auto reg if something wasnt registered. I eventually figured it out and made the modification myself. If someone could provide some feedback on this, that would be great. Basically what I did was use the Host Is Valid check to make an if statement to choose between to variable = “” statements. This was all done in the BootMenu.class.php file right at line 138, might be different for you, I have FOG 1.2.0. This does require Auto Population to be turned on and configured to your specifications so as to properly fill out the sequential naming.

    Attached is a screenshot of what it looks like for me. I’m sure this could be more appropriately coded, but I’m not the best at php.

    TOM, If this isn’t already included, maybe we could add this and give it an on/off button in the webui?

    Note: “DESTRUCTIVE: This will forcefully register and image ANY computer that is booted via PXE and isn’t already registered. I do not recommend this at all for a production network. Use with caution in a secure deployment network.”

    [PHP]
    ####Add this
    if ($this->Host && $this->Host->isValid()){
    $defchoice2 = “choose --default fog.local --timeout $timeout target && goto ${target}\n”;
    }ELSE{
    $defchoice2 = “choose --default fog.reg --timeout $timeout target && goto ${target}\n”;
    }
    ####Don’t touch this

                if ($Advanced)
                        $this->pxemenu['fog.advanced'] = 'Advanced Menu';
                $this->memdisk = "kernel $memdisk";
                $this->memtest = "initrd $memtest";
                $this->kernel = "kernel $bzImage root=/dev/ram0 rw ramdisk_size=$ramsize ip=dhcp dns=$dns keymap=$keymap web=${webserver}${webroot} consoleblank=0 ";
                $this->initrd = "imgfetch $imagefile\n";
    

    ####Modify this
    $this->defaultChoice = “$defchoice2”;
    ####[/PHP]

    [url="/_imported_xf_attachments/1/1788_Screenshot 2015-03-15 14.17.35.png?:"]Screenshot 2015-03-15 14.17.35.png[/url]



  • I don’t only read this information, but I also tried it. Not sure how it should work, but with Quick Registration configured, result was, when I booted targeted computer, FOG boot menu showed, and after few seconds computer booted back to OS on harddrive. When I manually choosed Quick registration and inventory from menu, host was registered with proper name given by settings, image was associated etc… But my interaction was needed. That is why I asked about possibility to choose Quick registration automaticaly from menu. This is for FOG 1.2.0 (I tried install trunk version also, but was not able to access FOG configuration page, so I did go back to 1.2.0) Am I missing something?


  • Developer

    [quote=“mrzo, post: 43743, member: 28859”]I count on it. But as I understood, quick registration only helps with naming, assigning image to registering hostsetc… But you must register host normaly (choose one of registration option from FOG boot menu, manualy register it on web page, etc…) Or am I mistaken?[/quote]

    from the pop up description on this setting [CODE]Enable FOG Quick Registration auto population feature (0 = disabled, 1=enabled). If this feature is enabled, FOG will auto populate the host settings and automatically image the computer without any user intervention.[/CODE]


Log in to reply
 

423
Online

39184
Users

10832
Topics

103133
Posts

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