Possible bug with CentOS 7, MariaDB and FOG services.



  • May have found a possible bug with CentOS 7, with MariaDB and FOG build 4375…

    Rebooting CentOS 7, checking Systemctl, seeing the following:

    FOGImageReplicator.service loaded inactive dead FOGImageReplicator
    FOGMulticastManager.service loaded inactive dead FOGMulticastManager
    FOGScheduler.service loaded inactive dead FOGScheduler
    FOGSnapinReplicator.service loaded inactive dead FOGSnapinReplicator

    Doing a systemctl status on one of the services…

    FOGScheduler.service - FOGScheduler
    Loaded: loaded (/usr/lib/systemd/system/FOGScheduler.service; enabled)
    Active: inactive (dead) since Wed 2015-08-12 13:09:50 PDT; 3min 32s ago
    Process: 878 ExecStart=/opt/fog/service/FOGTaskScheduler/FOGTaskScheduler & (code=exited, status=0/SUCCESS)
    Main PID: 878 (code=exited, status=0/SUCCESS)
    CGroup: /system.slice/FOGScheduler.service

    Aug 12 13:09:43 control systemd[1]: Started FOGScheduler.
    Aug 12 13:09:50 control FOGTaskScheduler[878]: PHP Warning: mysqli::mysqli(): (HY000/2002): Connection refused in /var/www/html/fog/lib/db/MySQL.class.php on line 37
    Aug 12 13:09:50 control FOGTaskScheduler[878]: PHP Warning: mysqli::mysqli(): (HY000/2002): Connection refused in /var/www/html/fog/lib/db/MySQL.class.php on line 39
    Aug 12 13:09:50 control FOGTaskScheduler[878]: PHP Warning: mysqli::query(): Couldn’t fetch mysqli in /var/www/html/fog/lib/db/MySQL.class.php on line 63

    However, when you try and restart it, works fine. So this could be a timing issue with MariaDB and/or CentOS 7…


  • Senior Developer

    I’m still working on it but current trunk should have a better mechanism to handle all of this. Hopefully.


  • Moderator

    @SKasai There’s a similar issue with Fedora. Here is my fix that Tom helped me with this past spring. I’ve simply beautified the steps here lol. https://wiki.fogproject.org/wiki/index.php/Fedora_21_Server#Set_the_FOG_services_to_start_30_seconds_after_boot



  • Ok… Then basically for now, just have a hack shellscript to do…

    #!/bin/sh
    /usr/bin/systemctl restart FOGImageReplicator.service
    /usr/bin/systemctl restart FOGMulticastManager.service
    /usr/bin/systemctl restart FOGScheduler.service
    /usr/bin/systemctl restart FOGSnapinReplicator.service

    Got it. :) (Yes, I know it can be manually started, but easier just to do this for ‘deadhead’ purposes).


  • Senior Developer

    This is a known issue but not a known and nice method of actually fixing it. Particularly for centos 7, it’s fairly simple to just require mariadb service, but this is not necessarily the right approach as other systemd setups may not require mariadb.


Log in to reply
 

395
Online

39.3k
Users

11.0k
Topics

104.6k
Posts

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