Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-3270

if_elapsed argument of 99999999999 is cast to 1215752191

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: (None)
    • Resolution: Unresolved
    • Affects Version/s: 3.10.5
    • Fix Version/s: None
    • Component/s: cf-agent
    • Labels:
      None
    • Platform:
      Ubuntu

      Description

      When setting action => if_elapsed to 99999999999 it is cast to 1215752191.
      Intention of using that big number is to make promise to never run twice.

      Example of how to reproduce:

      bundle agent test_big_int
      {
      methods:
        "" usebundle => some_bundle,
          handle => "test_big_int",
          action => if_elapsed(99999999999),
          classes => if_ok("test_big_int_ran");
      
      reports:
        "info: Test bundle ran."
          ifvarclass => "test_big_int_ran";
      }
      
      root@host:/# sudo cf-agent -I -b test_big_int
          info: Using command line specified bundlesequence
      

      Verbose output:

       verbose: ----------------------------------------------------------------
       verbose:  Begin policy/promise evaluation 
       verbose: ----------------------------------------------------------------
          info: Using command line specified bundlesequence
       verbose: Using bundlesequence =>  {"test_big_int"}
       verbose: B: *****************************************************************
       verbose: B: BEGIN bundle test_big_int
       verbose: B: *****************************************************************
       verbose: Nothing promised here [last.test_big_int] (0/1215752191 minutes elapsed)
       ...
       verbose: A: Bundle Accounting Summary for 'test_big_int' in namespace default
       verbose: A: Zero promises executed for bundle 'test_big_int'
       verbose: A: ...................................................
       verbose: B: *****************************************************************
       verbose: B: END bundle test_big_int
       verbose: B: *****************************************************************
      ...
       verbose: Logging total compliance, total 'Outcome of version CFEngine Promises.cf 3.10.5 (agent-0): Promises observed to be kept 100.00%, Promises repaired 0.00%, Promises not repaired 0.00%'
      

      1215752191 is reported to have elapsed, not 99999999999 as I would expect.

      Moreover, such bundle does not seem to execute at all from cf-execd, but it is when run with "cf-agent -IKb" parameters.

      System version:

      Linux node 4.4.0-173-generic #203-Ubuntu SMP Wed Jan 15 02:55:01 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
      

        Attachments

          Activity

            People

            • Assignee:
              olehermanse Ole Herman Schumacher Elgesem
              Reporter:
              vsobol@maven.co Victor
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Summary Panel