Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-57951

Incorrect data files archived by hook_test_archival.py

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.0.2, 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • v5.0
    • STM 2021-07-12
    • 2

      I ran a patch that failed with the expectation that the correct data files were archived, but looking at the task logs, this is what was archived:

      [2021/06/17 19:49:10.810] [executor:js_test:job0] 19:49:10.810Z Archiving data files for test jstests/slow1/terminate_during_shutdown_checkpoint.js from /data/db/job0/resmoke
      [2021/06/17 19:49:13.089] [executor:js_test:job0] 19:49:13.089Z Archive succeeded for jstests/slow1/terminate_during_shutdown_checkpoint.js: Tar/gzip Data files jstests/slow1/terminate_during_shutdown_checkpoint.js - Execution 0 Repetition 0 files: ['/data/db/job0/resmoke']
      

      However, looking at the test logs, a different dbpath was used for the fixture (mongorunner/, not resmoke/):

      [js_test:terminate_during_shutdown_checkpoint] ReplSetTest Starting....
      [js_test:terminate_during_shutdown_checkpoint] Resetting db path '/data/db/job0/mongorunner/terminate_during_shutdown_checkpoint-0'
      ...
      [js_test:terminate_during_shutdown_checkpoint] d20020| 2021-06-17T19:39:10.372+00:00 I  CONTROL  4615611 [initandlisten] "MongoDB starting","attr":{"pid":6176,"port":20020,"dbPath":"/data/db/job0/mongorunner/terminate_during_shutdown_checkpoint-0","architecture":"64-bit","host":"ip-10-122-89-72.ec2.internal"}
      

      I had to apply the following change for this test to archive the correct data files:

      diff --git a/buildscripts/resmokelib/testing/hook_test_archival.py b/buildscripts/resmokelib/testing/hook_test_archival.py
      index fd0388be15..bae0051ada 100644
      --- a/buildscripts/resmokelib/testing/hook_test_archival.py
      +++ b/buildscripts/resmokelib/testing/hook_test_archival.py
      @@ -93,7 +93,7 @@ class HookTestArchival(object):
                                                               config.EVERGREEN_EXECUTION,
                                                               self._tests_repeat[test_name])
               # Retrieve root directory for all dbPaths from fixture.
      -        input_files = test.fixture.get_dbpath_prefix()
      +        input_files = '/data/db/job0'
               s3_bucket = config.ARCHIVE_BUCKET
               s3_path = "{}/{}/{}/datafiles/{}".format(config.EVERGREEN_PROJECT_NAME,
                                                        config.EVERGREEN_VARIANT_NAME,
      

      Not sure if this matters, but this test is in the slow1 suite.

            Assignee:
            robert.guo@mongodb.com Robert Guo (Inactive)
            Reporter:
            gregory.wlodarek@mongodb.com Gregory Wlodarek
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: