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

FOGPingHosts Different Subnets (Location Plugin)

Scheduled Pinned Locked Moved Unsolved
Bug Reports
4
24
2.6k
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.
  • M
    markbam
    last edited by Sep 30, 2019, 2:13 PM

    Unfortunately neither I nor any of my coworkers know PHP. I mainly write in PERL and, while a bit similar to PHP, my code is by no means production quality but I can try to help however I can.

    I’ve looked at the FOGPingHosts.service and a quickly thought of trying to create persistence based on time by adding a field into the SQL database that records that last successful ping time.

    Touching the database seems a bit overreaching but maybe a field like this already exists. I haven’t had the chance to dump it yet.

    Pseudo Code: FogPingHosts.service
    
    foreach(Host)
    {
        getCurrentTime=CurrentTime;
        timestampFromSQL= read_sql(timestampSQLField);
        timeSinceLastSuccessfulPing=getCurrentTime - timestampFromSQL;
    
        if(timeSinceLastSuccessfulPing >  180 Seconds)
        {
            if(PingHost == successful)
            {
               write_sql(timestampSQLField, getCurrentTime);
            }
        }
    }
    
    Q 1 Reply Last reply Sep 30, 2019, 2:40 PM Reply Quote 0
    • Q
      Quazz Moderator @markbam
      last edited by Sep 30, 2019, 2:40 PM

      @markbam I’m unsure about how this would resolve the problem as it currently exists.

      As I understand it, the problem is that nodes overwrite the status constantly.

      While a time check would reduce server stress somewhat, it won’t prevent a certain subnet from ‘getting there’ first and setting an incorrect value. (presuming subnets can’t ping to other subnets, you’d only see what one specific subnet sees, in other words)

      So the bug is that storage nodes try and ping all hosts rather than only their own, if I’m getting it right.

      T 1 Reply Last reply Sep 30, 2019, 3:39 PM Reply Quote 0
      • T
        Tom Elliott @Quazz
        last edited by Sep 30, 2019, 3:39 PM

        @Quazz I don’t know that it’s a bug. Yes, i understand this is unexpected behaviour. But Remember the location plugin is a plugin. It’s not a default element of the core of fog. The Core elements attempt to ping all hosts each iteration. (So this is the expected behavior).

        That’s not to say we shouldn’t have this in bug reports and we’ll need to add things to the location plugin to distribute the PING Hosts to enable location specific pinging.

        This is not currently coded for or thought of so I imagine this will take a while to work out.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        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 Oct 26, 2019, 2:22 PM

          @markbam I started to implement that but need to push this further down the list. We need to focus on bugs of the core FOG code before that.

          Note to myself: I have saved a diff of the current work in my workspace.

          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
          • 2
          • 2 / 2
          • First post
            Last post

          222

          Online

          12.0k

          Users

          17.3k

          Topics

          155.2k

          Posts
          Copyright © 2012-2024 FOG Project