1 (edited by tabad 2011-09-09 09:23:10)

Topic: A new task scheduler/management bug

Hello to all,

   My FusionInventory for GLPI v.2.4x test environment is as following:

      .- The server
         .- Ubuntu Server 10.04.3 LTS (Lucid Lynx) - Architecture AMD64
         .- OCS Inventory NG Management Server v2.0
         .- GLPI v0.80.2
            .- GLPI v0.80.2 Agents
               .- FusionInventory for GLPI v2.4.0 (NightBuild 20110908-0905)
                  .- FusionInventory v2.4.0
                  .- FusionInventory INVENTORY v2.4.0
                  .- FusionInventory SNMP v2.4.0
               .- Shell Commands v1.4.0
               .- Bays Management v1.2.0

      .- The agents
         .- FusionInventory-Agent v2.1.10 (for Windows)
         .- FusionInventory-Agent v2.1.9-3 (for Windows)
         .- FusionInventory-Agent v2.1.9-3 (for GNU/Linux)


   Before to start, the /etc/cron.d/glpi content:

   

#
# GLPI
#
*/5 * * * * root /usr/bin/php5 /usr/share/glpi/front/cron.php &> /dev/null


   *!* Bug 1: Job execution no scheduled.

       Better with an example.

       Task definition:

         Name: Network Infraestructure
         Active: Yes
         Communication type: Server contacts the agent (push)
         Permanent: No
         Scheduled date: 2011-09-09 at 01:05h
         Periodicity: 15 minutes
         Job 1:
            Name: Discovery
            Time between task...: 0 minutes
            Number of trials: 0
            Time between 2 trials (in minutes): 0
            Time between task start and start this action: 0 minutes
            Module: Devices discovery
            Definition: IP Ranges -> Network Infraestructure Network
            Action: Agent -> agentest1.sociedad.imaginaria.es-yyyy-mm-dd-hh-mm-ss
         Job 2:
            Name: Inventory
            Time between task...: 0 minutes
            Number of trials: 0
            Time between 2 trials (in minutes): 0
            Time between task start and and start this action: 5 minutes
            Module: Network Inventory (SNMP)
            Definition: IP Ranges -> Network Infraestructure Network
            Action: Agent -> agentest2.sociedad.imaginaria.es-yyyy-mm-dd-hh-mm-ss

       Time line:
          2011-09-09 01:05 > Start Job 1
          2011-09-09 01:07 > End Job 1
          2011-09-09 01:10 > Start Job 1    <--------- Error. It mustn't execute.
          2011-09-09 01:10 > Start Job 2
          2011-09-09 01:12 > End Job 2
          2011-09-09 01:12 > End Job 1
          ...
          2011-09-09 01:20 > Start Job 1
          2011-09-09 01:22 > End Job 1
          2011-09-09 01:25 > Start Job 1    <--------- Error. It mustn't execute.
          2011-09-09 01:25 > Start Job 2
          2011-09-09 01:27 > End Job 2
          2011-09-09 01:28 > End Job 1
          ...
          and so on 'ad infinitum'.

       Seems job n launchs job n-1, job n-1 launchs job n-2 and so on.

Tomás Abad

Re: A new task scheduler/management bug

Try with last version of develement version, I have made some fixes yesterday

Co-leader, official developper
DCS official PARTNER: dcs.glpi@dcsit-group.com

Re: A new task scheduler/management bug

Hello David,

      FusionInventory for GLPI updated to v2.4.0 (NightBuild 20110910-1505).

      Task definition:

         Name: Network Infraestructure
         Active: Yes
         Communication type: Server contacts the agent (push)
         Permanent: No
         Scheduled date: 2011-09-10 at 15:55h
         ...


       Time line:
          2011-09-10 15:55 > Start Job 1
          2011-09-10 15:57 > End Job 1
          2011-09-10 16:00 > Start Job 1    <--------- Error. It mustn't execute.
          2011-09-10 16:00 > Start Job 2
          2011-09-10 16:02 > End Job 2
          2011-09-10 16:03 > End Job 1
          ...
          2011-09-10 16:10 > Start Job 1
          2011-09-10 16:12 > End Job 1
          2011-09-10 16:15 > Start Job 1    <--------- Error. It mustn't execute.
          2011-09-10 16:15 > Start Job 2
          2011-09-10 16:17 > End Job 2
          2011-09-10 16:18 > End Job 1
          ...
          and so on 'ad infinitum' too.


   This version has the same behavior as FusionInventory for GLPI v2.4.0 (NightBuild 20110908-0905).

Tomás Abad

Re: A new task scheduler/management bug

Hello David,

   FusionInventory for GLPI updated to v2.4.0 (NightBuild 20110914-0005).

   This version has the same behavior as FusionInventory for GLPI v2.4.0 (NightBuild 20110908-0905) and FusionInventory for GLPI updated to v2.4.0 (NightBuild 20110910-1505).

Tomás Abad

Re: A new task scheduler/management bug

I can't have same problem sad

Co-leader, official developper
DCS official PARTNER: dcs.glpi@dcsit-group.com

Re: A new task scheduler/management bug

Hello David,

   I suppose you can't to reproduce the same problem. Are you sure you have exactly defined the task as I did it?

   With FusionInventory for GLPI updated to v2.4.0 (NightBuild 20110914-0005), as I said to you, I repeated the test again and this has been the behavior.

         Task definition:

         Name: Network Infraestructure
         Active: Yes
         Communication type: Server contacts the agent (push)
         Permanent: No
         Scheduled date: 2011-09-14 at 08:55h
         ...

         Time line:

         2011-09-14 08:55 > Start Job 1
         2011-09-14 08:57 > End Job 1
         2011-09-14 09:00 > Start Job 1    <--------- Error. It mustn't execute.
         2011-09-14 09:00 > Start Job 2
         2011-09-14 09:02 > End Job 2
         2011-09-14 09:03 > End Job 1
         ...
         2011-09-14 09:10 > Start Job 1
         2011-09-14 09:12 > End Job 1
         2011-09-14 09:15 > Start Job 1    <--------- Error. It mustn't execute.
         2011-09-14 09:15 > Start Job 2
         2011-09-14 09:17 > End Job 2
         2011-09-14 09:18 > End Job 1
         ...
         and so on 'ad infinitum' too.

   The behavior has been the same; always is the same. If you want, I can send to you a picture.

Tomás Abad

Re: A new task scheduler/management bug

Hello David,

   I have found another bug related with task scheduler when I was testing this task example.

   Note: FusionInventory for GLPI version v2.4.0 (NightBuild 20110914-0005).

   I have changed task definition as follow:

         Task definition:

         Name: Network Infraestructure
         Active: Yes
         Communication type: Server contacts the agent (push)
         Permanent: No
         Scheduled date: 2011-09-14 at 15:00h
         ...

   Scheduled date is in future.

   When it's 2011-09-14 11:20 I launch the task, doing click in 'force running' button. That's happend...

         Time line:

         2011-09-14 11:20 > Start Job 1
         2011-09-14 11:20 > Start Job 2    <--------- Error. It must be execute five minutes later.
         2011-09-14 11:22 > End Job 2
         2011-09-14 11:23 > End Job 1

   Conclusion. When forced to run a task that has delayed work, these are not respected and all jobs are executed at the same time.

Tomás Abad

Re: A new task scheduler/management bug

Humm perhaps because you use "force running" button tongue

Co-leader, official developper
DCS official PARTNER: dcs.glpi@dcsit-group.com

9 (edited by tabad 2011-09-14 12:35:50)

Re: A new task scheduler/management bug

Hello David,

    Perhaps...  no!. I'm sure!. I didn't know than "Force running" button was so mystical and esoteric in this version.  tongue

    Now in serious; can you take a look, please?

    I believe that the execution of a task must be done in the same way regardless of whether it's launched by schedule or  by hand. If i'm not wrong, "Force running" doesn't mean "Run all jobs of task now", means "Run task now", isn't it?

Tomás Abad

Re: A new task scheduler/management bug

Yes you're right, I will see it tomorow morning, I will be better than now tired tongue

Co-leader, official developper
DCS official PARTNER: dcs.glpi@dcsit-group.com

11 (edited by tabad 2011-09-15 16:02:16)

Re: A new task scheduler/management bug

Hello David,

  Note: FusionInventory for GLPI version v2.4.0 (NightBuild 20110915-0805).

  I have repeated the test with some changes in the task definition. Now there are three jobs, all of them are the same type and the only difference between them are in the 'Time between task start and start this action' field only.

       Task definition:

         Name: Network Infraestructure
         Active: Yes
         Communication type: Server contacts the agent (push)
         Permanent: No
         Scheduled date: 2011-09-15 at 13:40h
         Periodicity: 1 hours
         Job 1:
            Name: Discovery
            Time between task...: 0 minutes
            Number of trials: 0
            Time between 2 trials (in minutes): 0
            Time between task start and start this action: 0 minutes
            Module: Devices discovery
            Definition: IP Ranges -> Network Infraestructure Network
            Action: Agent -> agentest1.sociedad.imaginaria.es-yyyy-mm-dd-hh-mm-ss
         Job 2:
            Name: Discovery
            Time between task...: 0 minutes
            Number of trials: 0
            Time between 2 trials (in minutes): 0
            Time between task start and and start this action: 5 minutes
            Module: Devices discovery
            Definition: IP Ranges -> Network Infraestructure Network
            Action: Agent -> agentest2.sociedad.imaginaria.es-yyyy-mm-dd-hh-mm-ss
         Job 3:
            Name: Discovery
            Time between task...: 0 minutes
            Number of trials: 0
            Time between 2 trials (in minutes): 0
            Time between task start and and start this action: 10 minutes
            Module: Devices discovery
            Definition: IP Ranges -> Network Infraestructure Network
            Action: Agent -> agentest3.sociedad.imaginaria.es-yyyy-mm-dd-hh-mm-ss

       Time line:

          2011-09-15 13:40 > Start Job 1
          2011-09-15 13:42 > End Job 1
          2011-09-15 13:45 > Start Job 1    <--------- Error. It mustn't execute.
          2011-09-15 13:45 > Start Job 2
          2011-09-15 13:48 > End Job 2
          2011-09-15 13:48 > End Job 1
          2011-09-15 13:50 > Start Job 1    <--------- Error. It mustn't execute.
          2011-09-15 13:50 > Start Job 2    <--------- Error. It mustn't execute.
          2011-09-15 13:50 > Start Job 3
          2011-09-15 13:53 > End Job 1
          2011-09-15 13:53 > End Job 3
          2011-09-15 13:54 > End Job 2
          ...
          2011-09-15 14:40 > Start Job 1
          2011-09-15 14:43 > End Job 1
          2011-09-15 14:45 > Start Job 1    <--------- Error. It mustn't execute.
          2011-09-15 14:45 > Start Job 2
          2011-09-15 14:48 > End Job 1
          2011-09-15 14:49 > End Job 2
          2011-09-15 14:50 > Start Job 1    <--------- Error. It mustn't execute.
          2011-09-15 14:50 > Start Job 2    <--------- Error. It mustn't execute.
          2011-09-15 14:50 > Start Job 3
          2011-09-15 14:53 > End Job 1
          2011-09-15 14:53 > End Job 2
          2011-09-15 14:53 > End Job 3
          ...

   Confirmed: When Job n is launched then is launched Job n-1, Job n-2, ... and Job 1 too.

Tomás Abad

Re: A new task scheduler/management bug

Hello David,

   Due to errors detected in the Nightly Build System, this time I updated the test environment with the development version to 2011-09-17 11:56h UTC, synchronized with Git repository through the Bash script I created for this purpose. (See Topic "A Bash script to synchronize with Git repositories...")

   My test environment is now as follow:

      .- The server
         .- Ubuntu Server 10.04.3 LTS (Lucid Lynx) - Architecture AMD64
         .- OCS Inventory NG Management Server v2.0
         .- GLPI v0.80.2
            .- GLPI v0.80.2 Agents
               .- FusionInventory for GLPI v2.4.0 (Synchronized with Git repository at 20110917-1156 UTC)
                  .- FusionInventory v2.4.0
                  .- FusionInventory INVENTORY v2.4.0
                  .- FusionInventory SNMP v2.4.0
               .- Shell Commands v1.4.0
               .- Bays Management v1.2.0

      .- The agents
         .- FusionInventory-Agent v2.1.11-1 (for Windows)
         .- FusionInventory-Agent v2.1.10-1 (for Windows)
         .- FusionInventory-Agent v2.1.9-3 (for Windows)
         .- FusionInventory-Agent v2.1.10-1 (for GNU/Linux)
         .- FusionInventory-Agent v2.1.9-3 (for GNU/Linux)


   I have repeated my previous test with a new definition of task. Again, before to start, the /etc/cron.d/glpi content:

   

#
# GLPI
#
*/5 * * * * root /usr/bin/php5 /usr/share/glpi/front/cron.php &> /dev/null

   And now the task definition:

   

Task definition:

         Name: Network Infraestructure
         Active: Yes
         Communication type: Server contacts the agent (push)
         Permanent: No
         Scheduled date: 2011-09-17 at 19:00h
         Periodicity: 1 hours
         Job 1:
            Name: Discovery
            Time between task...: 0 minutes
            Number of trials: 0
            Time between 2 trials (in minutes): 0
            Time between task start and start this action: 0 minutes
            Module: Devices discovery
            Definition: IP Ranges -> Network Infraestructure Network
            Action: Agent -> agentest1.sociedad.imaginaria.es-yyyy-mm-dd-hh-mm-ss
         Job 2:
            Name: Inventory
            Time between task...: 0 minutes
            Number of trials: 0
            Time between 2 trials (in minutes): 0
            Time between task start and and start this action: 15 minutes
            Module: Network inventory (SNMP)
            Definition: IP Ranges -> Network Infraestructure Network
            Action: Agent -> agentest2.sociedad.imaginaria.es-yyyy-mm-dd-hh-mm-ss
         Job 3:
            Name: Discovery
            Time between task...: 0 minutes
            Number of trials: 0
            Time between 2 trials (in minutes): 0
            Time between task start and and start this action: 30 minutes
            Module: Devices discovery
            Definition: IP Ranges -> Network Infraestructure Network
            Action: Agent -> agentest3.sociedad.imaginaria.es-yyyy-mm-dd-hh-mm-ss

   This is the mystical and esoteric time line:

   

Time line:

         2011-09-17 19:00 > Start Job 1  Ok
         2011-09-17 19:02 >   End Job 1  Ok
         2011-09-17 19:05 > Start Job 1  <--1------ Error. It mustn't execute.
         2011-09-17 19:07 >   End Job 1  <--1--
         2011-09-17 19:10 > Start Job 1  <--2------ Error. It mustn't execute.
         2011-09-17 19:12 >   End Job 1  <--2--
         2011-09-17 19:15 > Start Job 1  <--3------ Error. It mustn't execute.
         2011-09-17 19:15 > Start Job 2  Ok
         2011-09-17 19:17 >   End Job 2  Ok
         2011-09-17 19:18 >   End Job 1  <--3--
         2011-09-17 19:20 > Start Job 1  <--4------ Error. It mustn't execute.
         2011-09-17 19:20 > Start Job 2  <--5------ Error. It mustn't execute.
         2011-09-17 19:22 >   End Job 1  <--4--
         2011-09-17 19:22 >   End Job 2  <--5--
         2011-09-17 19:25 > Start Job 1  <--6------ Error. It mustn't execute.
         2011-09-17 19:25 > Start Job 2  <--7------ Error. It mustn't execute.
         2011-09-17 19:27 >   End Job 1  <--6--
         2011-09-17 19:27 >   End Job 2  <--7--
         2011-09-17 19:30 > Start Job 1  <--8------ Error. It mustn't execute.
         2011-09-17 19:30 > Start Job 2  <--9------ Error. It mustn't execute.
         2011-09-17 19:30 > Start Job 3  Ok
         2011-09-17 19:32 >   End Job 2  <--9--
         2011-09-17 19:33 >   End Job 1  <--8--
         2011-09-17 19:33 >   End Job 3  Ok
         2011-09-17 19:35 > -----------  OK. No jobs begin.
         2011-09-17 19:40 > -----------  OK. No jobs begin.
         2011-09-17 19:45 > -----------  OK. No jobs begin.
         2011-09-17 19:50 > -----------  OK. No jobs begin.
         2011-09-17 19:55 > -----------  OK. No jobs begin.
         ... and the cycle begins again...
         2011-09-17 20:00 > Start Job 1  Ok
         2011-09-17 20:02 >   End Job 1  Ok
         2011-09-17 20:05 > Start Job 1  <--1------ Error. It mustn't execute.
         2011-09-17 20:07 >   End Job 1  <--1--
         2011-09-17 20:10 > Start Job 1  <--2------ Error. It mustn't execute.
         2011-09-17 20:12 >   End Job 1  <--2--
         ... and so on.

   I hope that with this will be more easy to fix this problem.

   One question David. While task is in its second cicle, I change 'Active' to 'No' and then appears the "Reset" button.

      a) What is its function?

   About task management there is another problem, that related with "Force running". (See post #9)

   I have change the previos task as follow:

   

Task definition:

         Name: Network Infraestructure
         Active: Yes
         Communication type: Server contacts the agent (push)
         Permanent: No
         Scheduled date: 2011-09-18 at 00:00h
         Periodicity: 1 hours
         ...

and have launch it doing click in "Force running".

   This is the time line:

   

Time line:

         2011-09-17 20:22 > Start Job 1  Ok
         2011-09-17 20:22 > Start Job 2  <--1------ Error. It must be execute fifteen minutes later.
         2011-09-17 20:22 > Start Job 3  <--2------ Error. It must be execute thirty minutes later.
         2011-09-17 20:24 >   End Job 2  <--1--
         2011-09-17 20:25 > Start Job 1  <--3------ Error. It mustn't execute. (*** match with cron.php time ***)
         2011-09-17 20:25 > Start Job 2  <--4------ Error. It mustn't execute. (*** match with cron.php time ***)
         2011-09-17 20:25 >   End Job 1  Ok
         2011-09-17 20:25 >   End Job 3  <--2--
         2011-09-17 20:27 >   End Job 2  <--4--
         2011-09-17 20:28 >   End Job 1  <--3--

   This problem also persists.

Tomás Abad