Bulk editing hosts



  • FOG Version 1.5.4 on Debian 8

    I’m trying to manipulate all the hosts in our FOG server to turn HostnameChanger off. I’d like to run this SQL against the database:

    UPDATE ‘moduleStatusByHost’ SET ‘msState’ = ‘0’ WHERE ‘msModuleID’ = ‘9’;

    On a test case where I did just one host ID, the value in the database changed as expected, but the change isn’t reflected in the WebUI. What additional steps need I take to make this change work correctly?



  • @george1421 said in Bulk editing hosts:

    If you are going to mass update the database like this, stop apache and php-fpm first, then run your update, and finally restart php-fpm and then apache. Both php-fpm and apache cache database values for faster access. You are changing the underlying database but its not seen in the UI because of the cache.

    #wiki worthy.



  • @george1421 Awesome! Thanks for the help! I’ll give that a test and see what comes of it.


  • Moderator

    If you are going to mass update the database like this, stop apache and php-fpm first, then run your update, and finally restart php-fpm and then apache. Both php-fpm and apache cache database values for faster access. You are changing the underlying database but its not seen in the UI because of the cache.


 

489
Online

5.4k
Users

12.6k
Topics

118.7k
Posts