Persistent Group - Snapins



  • Hello,

    I’m using fog for several months but i’m setting it up on a bigger scale.

    I’m actually setting up FOG Project using the location plugin to manage multiple sites.

    I’m also using the “persistent group” plugin so i can deploy computers in different Active Directory’s by group and assign the snapins i want.

    When i register a new computer and i make it member of a group, it will get all options from the assigned group. (image, location, active directory, snapins…) Once the computer registered I deploy the image directely from the PXE menu.
    Everything works well except the snapins (in the fog interface the host is member of the snapin), in the snapin history the task is present without the name but it says Queued Snapin task not completed…

    When i set the deploy task from the fog server it seems to be working well… The name of the snapin is showed in the snaping history

    Is there any work around?

    It’s quite important for me people can set the deploy task directly after the host registration.

    Have a nice day and thank you



  • @vanopstp15d try

    mysqlcheck -r fog
    


  • @george1421
    Thank you very much for your help!

    For information, i ran the next command succesfully:

    DELETE FROM `hosts` WHERE `hostID` = '0';
    DELETE FROM `hostMAC` WHERE hmID = '0' OR `hmHostID` = '0';
    DELETE FROM `groupMembers` WHERE `gmID` = '0' OR `gmHostID` = '0' OR `gmGroupID` = '0';
    DELETE FROM `snapinGroupAssoc` WHERE `sgaID` = '0' OR `sgaSnapinID` = '0' OR `sgaStorageGroupID` = '0';
    DELETE from `snapinAssoc` WHERE `saID` = '0' OR `saHostID` = '0' OR `saSnapinID` = '0';
    DELETE FROM `hosts` WHERE `hostID` NOT IN (SELECT `hmHostID` FROM `hostMAC` WHERE `hmPrimary` = '1');
    DELETE FROM `hosts` WHERE `hostID` NOT IN (SELECT `hmHostID` FROM `hostMAC`);
    DELETE FROM `hostMAC` WHERE `hmhostID` NOT IN (SELECT `hostID` FROM `hosts`);
    DELETE FROM `snapinAssoc` WHERE `saHostID` NOT IN (SELECT `hostID` FROM `hosts`);
    DELETE FROM `groupMembers` WHERE `gmHostID` NOT IN (SELECT `hostID` FROM `hosts`);
    DELETE FROM `tasks` WHERE `taskStateID` IN ("1","2","3");
    DELETE FROM `snapinTasks` WHERE `stState` in ("1","2","3");
    TRUNCATE TABLE multicastSessions; 
    TRUNCATE TABLE multicastSessionsAssoc; 
    DELETE FROM tasks WHERE taskTypeId=8;
    

    But the problem remains…


  • Moderator

    @vanopstp15d I was setting up persistent groups in my test environment to see if I can duplicate your findings. I’ve been drawn away from testing by my day job. Hopefully I can have this debugged yet today.



  • @EduardoTSeoane
    I really appreciate your help, it’s reassuring to hear you use it without any problems. i’ll give a database repair a try!

    Thanks ;)



  • @vanopstp15d
    Restart service is for that question you do on the last post, maybe i missunderstood the question…
    Is there any posibility to force the snapins with command line from the client (Windows)?

    About the question:

    I use persistent groups & location too but not Active Directory… and I haven’t that problem…

    so… What about a database repair procedure?

    [https://wiki.fogproject.org/wiki/index.php?title=Troubleshoot_MySQL](link url)



  • @EduardoTSeoane Thank you for your awnser, but restarting the service won’t resolve my problem :/

    I think to problem comes from how the snapin task is set when you want to deploy directly after full registration. The snapin task won’t get the snapin ID, may be because the complete deploy task is set before the persisten group code excecutes. But i don’t know how i can check this.

    For information: if you register the computer and set the task from fog’s web interface the snapins will be applied because the task is set correctly.

    Have I nice day ;)



  • @vanopstp15d
    Fog service is an iteration of services, you can restart it and force to be executed with only stop/start the service. Take care, the services has an execution order, example if you put a task and a snapin, always be executed the task first. The order is by service list, not by launching time.

    You can do it from the powershell console, locally or remotelly if you have remote powershell configured.

    If you restart the fogservice you lost the useragent until you execute it again or restart the computer.



  • @george1421 I tried again today because I found out the Host-Template was member from the Group… But no differences, still the same problem.

    Can it have to do with the Snapin Timeout?

    I really need to figure ou this problem. Has anyone run into the same problem?

    Is there any posibility to force the snapins with command line from the client (Windows)?

    Thank you!


  • Moderator

    @vanopstp15d I guess I need to setup a snapin and deploy it this way to see if I can duplicate the issue. If I can, then I might be able to work out a path forward. There is some link that is missing here.



  • @george1421
    I created a new snapin pack from a new zip file
    I created à new group called test-snapin, a new host with the same name
    I managed Active directory, snapin membership, Image etc in the group and checked if the settings where available on the host, everything was applied.

    I setup a new VM, booted into PXE
    Named the computer
    ignored master
    setup group and choosed test-snapin
    ignored domain (because set in group)
    ignored snapins (because set in group)
    Choose deploy now
    Reboot into PXE

    The deploy task starts and finish well, but i get the same problem with the snapin… the name is not showing in the snapin history and nothing will apply…

    Is it possible because it is a snapin PACK…?

    Thank you!

    alt text



  • @george1421 May be…
    But the snapin withouth a name in the snapin history is the same as the one below…
    I’ll create a new snapin, associate it to the group (persistent) create à new VM register it and just make it member of the group.

    I’ll let you know the result.

    Thank you very much for your help.

    Have à nice day ;)


  • Moderator

    @vanopstp15d Is it possible that you deleted a snapin or changed its target system association? I can’t find any way this is possible unless the snapin has either been deleted from the system after the task was assigned, or something happened to the snapin.


  • Moderator

    @vanopstp15d ok let me take a look at it.



  • Here you go, thank you for your quick awnser.

    fog problem snapin


  • Moderator

    @vanopstp15d said in Persistent Group - Snapins:

    Everything works well except the snapins (in the fog interface the host is member of the snapin), in the snapin history the task is present without the name but it says Queued Snapin task not completed…

    I created the persistent groups “hack” a while ago then one of the developers converted it into a true plugin. I don’t use snapins, so its possible that recent changes to the FOG database has caused this plugin to work not as expected.

    Can you show a screen shot of what is not working.

    ref:

            INSERT INTO `snapinAssoc` (`saHostID`,`saSnapinID`)
                SELECT @myHostID as `saHostID`,`saSnapinID`
                FROM `snapinAssoc` WHERE `saHostID`=@myTemplateID;
    
    

Log in to reply
 

425
Online

6.2k
Users

13.5k
Topics

127.5k
Posts