• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    When do assigned snapins run relative to binding?

    Scheduled Pinned Locked Moved
    General
    2
    7
    521
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      astrugatch
      last edited by

      Hi,
      I have a snaping (batch script) that I want to run on my machines right after imaging, but it needs to run after the machine is bound to AD. What is the order of operations with regard to namechange, binding, and snapins? Also there are Group Policies running on the machine after the first boot from binding, how does that play in with snapins?

      1 Reply Last reply Reply Quote 0
      • S
        Sebastian Roth Moderator
        last edited by

        @astrugatch I think the only way you can make absolutely sure this is working reliably in your environment is to add a check to your snapin batch file!

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 0
        • A
          astrugatch
          last edited by astrugatch

          @Sebastian-Roth
          By check do you mean to check for binding? The issue then is that it’s not going to try to run again if it wasn’t bound at the time; as the snapin will have technically exited fine having run it’s check and done nothing. Unless there is a way for a batch file to exit and re-arm the snapin to be executed at a later time. If I can determine the order I can work out the timing of when each thing lands.

          1 Reply Last reply Reply Quote 0
          • S
            Sebastian Roth Moderator
            last edited by Sebastian Roth

            @astrugatch I have to say that I am not the one who developed the fog-client software in the first place and so I am still working my way through this and don’t know it all top to bottom.

            What is the order of operations with regard to namechange, binding, and snapins?

            First comes the module called HostnameChanger which checks to see if the hostname equals the one given within the FOG host settings and if the host is joined to the domain. If one or the other is not ok it renames and/or joins and schedules a reboot for the computer.

            Now with the snapin module being executed next it might happen that the snapin is trying to execute while Windows is in the process of handling the system reboot. This was discussed here before: https://forums.fogproject.org/topic/7550/fog-client-snapins-run-after-computer-rename-domain-join

            While I have not found a commit on github that addresses this issue directly I see a couple of commits around that date working on the timing of reboot stuff in the code. So I suppose he tried to get this right. Have you actually tried running snapins right after a deploy? Do they fail? Please provide a full fog.log from that client and I’ll look into it then!

            Just one note to myself for later debugging. This might be related and could turn out helpful: https://github.com/FOGProject/zazzles/commit/3643e7c9592662ed7061c6096a73948f7cba1a40

            This forum topic seems to be related as well.

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            1 Reply Last reply Reply Quote 0
            • S
              Sebastian Roth Moderator
              last edited by

              @astrugatch While debugging another fog-client issue on host rename I found this in my log file:

              ------------------------------------------------------------------------------
              --------------------------------HostnameChanger-------------------------------
              ------------------------------------------------------------------------------
               8/27/2019 3:07 AM Client-Info Client Version: 0.11.16
               8/27/2019 3:07 AM Client-Info Client OS:      Windows
               8/27/2019 3:07 AM Client-Info Server Version: 1.5.7
               8/27/2019 3:07 AM Middleware::Response Success
               8/27/2019 3:07 AM HostnameChanger Checking Hostname
               8/27/2019 3:07 AM HostnameChanger Renaming host to Newhostname
               8/27/2019 3:07 AM HostnameChanger Renaming host inside existing domain binding
               8/27/2019 3:07 AM HostnameChanger Success, code =  0
               8/27/2019 3:07 AM Power Creating shutdown command in 60 seconds
               8/27/2019 3:07 AM Bus Emmiting message on channel: Power
              ------------------------------------------------------------------------------
              
              
              ------------------------------------------------------------------------------
              ---------------------------------SnapinClient---------------------------------
              ------------------------------------------------------------------------------
               8/27/2019 3:07 AM Client-Info Client Version: 0.11.16
               8/27/2019 3:07 AM Client-Info Client OS:      Windows
               8/27/2019 3:07 AM Client-Info Server Version: 1.5.7
               8/27/2019 3:07 AM Middleware::Response Success
               8/27/2019 3:07 AM SnapinClient A power operation is pending, aborting module
              ------------------------------------------------------------------------------
              

              So from my point of view it shouldn’t try to run snapins while a reboot from the HostnameChanger (or any other) module is scheduled.

              Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

              Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

              A 1 Reply Last reply Reply Quote 0
              • A
                astrugatch @Sebastian Roth
                last edited by

                @Sebastian-Roth

                I finally got to test this today. It appears to be

                Hostname/bind
                Reboot
                Waits for a complete reboot (this is good for be because this is where my GPO installs happens) then after the boot process completes the snapin runs. In this case running a script to install AutoCAD.

                1 Reply Last reply Reply Quote 1
                • S
                  Sebastian Roth Moderator
                  last edited by

                  @astrugatch Good to hear! Thanks.

                  Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                  Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post

                  148

                  Online

                  12.0k

                  Users

                  17.3k

                  Topics

                  155.2k

                  Posts
                  Copyright © 2012-2024 FOG Project