Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task aborted with ERROR: Nothing was extracted from archive #249

Open
XiyangDong opened this issue Dec 7, 2021 · 7 comments
Open

Task aborted with ERROR: Nothing was extracted from archive #249

XiyangDong opened this issue Dec 7, 2021 · 7 comments

Comments

@XiyangDong
Copy link

** Fetching task: 3 [/mnt/tests/gitlab.cee.redhat.com/identity-management/ipa-tests/-/archive/RHEL9.0/ipa-tests-RHEL9.0.tar.gz/beaker/ipa-server/acceptance/ipa-user-cli/moduser]
** Fetching task: Retries 1
** Fetching task: Retries 2
** Fetching task: Retries 3
** ERROR: Nothing was extracted from archive
** Completed Task : 3

We are hitting this issue from time to time, tried to raise max number of retries by specifying '-c 10' in restraint command but didn't help. '-vvv' didn't output more information than above.

@StykMartin
Copy link
Contributor

Can you share the XML payload for this execution? At least bits for this task? Feel free to mask hostnames.

@XiyangDong
Copy link
Author

XiyangDong commented Dec 8, 2021

Hello @StykMartin , job.xml for this execution:

<?xml version="1.0"?>
<job>
  <recipeSet>
    <recipe id="1" status="Aborted" result="PASS" checkpoint_file="checkpoint_351347.conf" role="MASTER">
      <task name="/ipa-server/master/shared" keepchanges="" id="1" status="Completed" result="PASS" start_time="2021-12-07T19:31:17+0000" end_time="2021-12-07T19:31:25+0000" duration="08">
        <logs>
          <log path="recipes/1/tasks/1/logs/harness.log" filename="harness.log"/>
          <log path="recipes/1/tasks/1/logs/taskout.log" filename="taskout.log"/>
          <log path="recipes/1/tasks/1/logs/journal.xml" filename="journal.xml"/>
        </logs>
        <fetch ssl_verify="off" url="https://gitlab.cee.redhat.com/identity-management/ipa-tests/-/archive/RHEL9.0/ipa-tests-RHEL9.0.tar.gz#beaker/ipa-server/shared"/>
        <params>
          <param name="RELM" value="xxx"/>
          <param name="DOMAIN" value="xxx"/>
          <param name="RSTRNT_DISABLED" value="01_dmesg_check"/>
          <param name="MASTER" value="xxx"/>
          <param name="JOB_MEMBERS" value="xxx"/>
          <param name="RECIPE_MEMBERS" value="xxx"/>
        </params>
        <results>
          <result id="1638905475" path="list-files-in-opt-rhqa-ipa" result="PASS" score="0">
            <logs>
              <log path="recipes/1/tasks/1/results/1638905475/logs/avc.log" filename="avc.log"/>
              <log path="recipes/1/tasks/1/results/1638905475/logs/resultoutputfile.log" filename="resultoutputfile.log"/>
            </logs>
          </result>
          <result id="1638905476" path="process-job-parameters-store-them-in-env-sh" result="PASS" score="0">
            <logs>
              <log path="recipes/1/tasks/1/results/1638905476/logs/avc.log" filename="avc.log"/>
              <log path="recipes/1/tasks/1/results/1638905476/logs/resultoutputfile.log" filename="resultoutputfile.log"/>
            </logs>
          </result>
          <result id="1638905477" path="shared-setup-check" result="PASS" score="0">
            <logs>
              <log path="recipes/1/tasks/1/results/1638905477/logs/avc.log" filename="avc.log"/>
              <log path="recipes/1/tasks/1/results/1638905477/logs/resultoutputfile.log" filename="resultoutputfile.log"/>
            </logs>
          </result>
          <result id="1638905478" path="Creating-mh-cfg-yml" result="PASS" score="0">
            <logs>
              <log path="recipes/1/tasks/1/results/1638905478/logs/avc.log" filename="avc.log"/>
              <log path="recipes/1/tasks/1/results/1638905478/logs/resultoutputfile.log" filename="resultoutputfile.log"/>
            </logs>
          </result>
          <result id="1638905479" path="Setup-Python-Coverage" result="PASS" score="0">
            <logs>
              <log path="recipes/1/tasks/1/results/1638905479/logs/avc.log" filename="avc.log"/>
              <log path="recipes/1/tasks/1/results/1638905479/logs/resultoutputfile.log" filename="resultoutputfile.log"/>
            </logs>
          </result>
        </results>
      </task>
      <task name="/ipa-server/master/quickinstall" keepchanges="" id="2" status="Completed" result="PASS" start_time="2021-12-07T19:32:20+0000" end_time="2021-12-07T19:41:22+0000" duration="542">
        <logs>
          <log path="recipes/1/tasks/2/logs/harness.log" filename="harness.log"/>
          <log path="recipes/1/tasks/2/logs/taskout.log" filename="taskout.log"/>
          <log path="recipes/1/tasks/2/logs/journal.xml" filename="journal.xml"/>
        </logs>
        <fetch ssl_verify="off" url="https://gitlab.cee.redhat.com/identity-management/ipa-tests/-/archive/RHEL9.0/ipa-tests-RHEL9.0.tar.gz#beaker/ipa-server/acceptance/quickinstall"/>
        <params>
          <param name="RSTRNT_DISABLED" value="01_dmesg_check"/>
          <param name="MASTER" value="xxx"/>
          <param name="JOB_MEMBERS" value="xxx"/>
          <param name="RECIPE_MEMBERS" value="xxx"/>
        </params>
        <results>
          <result id="1638905483" path="Setup-Extended-quickinstall-startup-check-for-ipa-server-package" result="PASS" score="0">
            <logs>
              <log path="recipes/1/tasks/2/results/1638905483/logs/avc.log" filename="avc.log"/>
              <log path="recipes/1/tasks/2/results/1638905483/logs/resultoutputfile.log" filename="resultoutputfile.log"/>
            </logs>
          </result>
          <result id="1638905484" path="ipa-install-topo-default-envsetup-Set-some-base-variables" result="PASS" score="0">
            <logs>
              <log path="recipes/1/tasks/2/results/1638905484/logs/avc.log" filename="avc.log"/>
              <log path="recipes/1/tasks/2/results/1638905484/logs/resultoutputfile.log" filename="resultoutputfile.log"/>
            </logs>
          </result>
          <result id="1638905485" path="ipa-install-topo-default-master-install-Master-in-Default-Topology" result="PASS" score="0">
            <logs>
              <log path="recipes/1/tasks/2/results/1638905485/logs/avc.log" filename="avc.log"/>
              <log path="recipes/1/tasks/2/results/1638905485/logs/resultoutputfile.log" filename="resultoutputfile.log"/>
            </logs>
          </result>
          <result id="1638905486" path="ipa-install-envs-Install-IPA-in-all-defined-Environments-sequentially" result="PASS" score="0">
            <logs>
              <log path="recipes/1/tasks/2/results/1638905486/logs/avc.log" filename="avc.log"/>
              <log path="recipes/1/tasks/2/results/1638905486/logs/resultoutputfile.log" filename="resultoutputfile.log"/>
            </logs>
          </result>
          <result id="1638905487" path="ipa-bugcheck-bz905064-ipa-install-error-Unable-to-find-preop-pin" result="PASS" score="0">
            <logs>
              <log path="recipes/1/tasks/2/results/1638905487/logs/avc.log" filename="avc.log"/>
              <log path="recipes/1/tasks/2/results/1638905487/logs/resultoutputfile.log" filename="resultoutputfile.log"/>
            </logs>
          </result>
          <result id="1638905488" path="ipa-bugcheck-bz918628-ipactl-11921-No-module-named-dns" result="PASS" score="0">
            <logs>
              <log path="recipes/1/tasks/2/results/1638905488/logs/avc.log" filename="avc.log"/>
              <log path="recipes/1/tasks/2/results/1638905488/logs/resultoutputfile.log" filename="resultoutputfile.log"/>
            </logs>
          </result>
          <result id="1638905489" path="ipa-bugcheck-bz986848-ipa-client-rpm-should-require-keyutils" result="PASS" score="0">
            <logs>
              <log path="recipes/1/tasks/2/results/1638905489/logs/avc.log" filename="avc.log"/>
              <log path="recipes/1/tasks/2/results/1638905489/logs/resultoutputfile.log" filename="resultoutputfile.log"/>
            </logs>
          </result>
          <result id="1638905490" path="DUA-profile-not-available-anonymously-bz1184149" result="PASS" score="0">
            <logs>
              <log path="recipes/1/tasks/2/results/1638905490/logs/avc.log" filename="avc.log"/>
              <log path="recipes/1/tasks/2/results/1638905490/logs/resultoutputfile.log" filename="resultoutputfile.log"/>
            </logs>
          </result>
          <result id="1638905491" path="DS-returns-limited-RootDSE-bz1138795" result="PASS" score="0">
            <logs>
              <log path="recipes/1/tasks/2/results/1638905491/logs/avc.log" filename="avc.log"/>
              <log path="recipes/1/tasks/2/results/1638905491/logs/resultoutputfile.log" filename="resultoutputfile.log"/>
            </logs>
          </result>
          <result id="1638905492" path="check-nsslapd-sasl-maxbuffersize-is-as-least-2mb-bz1044193-bz1136882" result="PASS" score="0">
            <logs>
              <log path="recipes/1/tasks/2/results/1638905492/logs/avc.log" filename="avc.log"/>
              <log path="recipes/1/tasks/2/results/1638905492/logs/resultoutputfile.log" filename="resultoutputfile.log"/>
            </logs>
          </result>
          <result id="1638905493" path="Cleanup-Extended-quickinstall" result="PASS" score="0">
            <logs>
              <log path="recipes/1/tasks/2/results/1638905493/logs/avc.log" filename="avc.log"/>
              <log path="recipes/1/tasks/2/results/1638905493/logs/resultoutputfile.log" filename="resultoutputfile.log"/>
            </logs>
          </result>
        </results>
      </task>
      <task name="/ipa-server/RHEL9.0/ipa-user-cli/moduser" keepchanges="" id="3" status="Aborted" result="None" end_time="2021-12-07T19:41:56+0000">
        <logs>
          <log path="recipes/1/tasks/3/logs/harness.log" filename="harness.log"/>
        </logs>
        <fetch ssl_verify="off" url="https://gitlab.cee.redhat.com/identity-management/ipa-tests/-/archive/RHEL9.0/ipa-tests-RHEL9.0.tar.gz#beaker/ipa-server/acceptance/ipa-user-cli/moduser"/>
        <params>
          <param name="RELM" value="xxx"/>
          <param name="DOMAIN" value="xxx"/>
          <param name="RSTRNT_DISABLED" value="01_dmesg_check"/>
          <param name="MASTER" value="xxx"/>
          <param name="JOB_MEMBERS" value="xxx"/>
          <param name="RECIPE_MEMBERS" value="xxx"/>
        </params>
      </task>
    </recipe>
  </recipeSet>
</job>

There was no journal.xml generated for this specific task as it got aborted.
Let me know if you need anything else, thanks

@spetrovi
Copy link

Hey we're also running into this from time to time, is there no further comment from restraint team?
Thanks,
Sam

@idorax
Copy link

idorax commented Jan 12, 2023

Looks restraint should not exit quietly after failure, the error reason should be throw out. Then user can fix it accordingly.

@idorax
Copy link

idorax commented Jan 12, 2023

Error message Nothing was extracted from archive is from src/fetch_uri.c#205,

   192	static gboolean
   193	http_archive_read_callback (gpointer user_data)
   194	{
   195	    FetchData *fetch_data = (FetchData *) user_data;
   196	
   197	    gint r;
   198	    struct archive_entry *entry;
   199	    gchar *newPath = NULL;
   200	
   201	    r = archive_read_next_header(fetch_data->a, &entry);
   202	    if (r == ARCHIVE_EOF) {
   203	        if (fetch_data->match_cnt == 0) {
   204	            g_set_error(&fetch_data->error, RESTRAINT_FETCH_LIBARCHIVE_ERROR, ARCHIVE_WARN,
   205	                    "Nothing was extracted from archive");
   206	        }
   207	        g_idle_add (archive_finish_callback, fetch_data);
   208	        return FALSE;
   209	    }

What we need to do next is to get the error from archive_read_next_header(fetch_data->a, &entry). And struct archive_entry is defined in libarchive/archive_entry_private.h

    82	struct archive_entry {
    83		struct archive *archive;
    ...

To get the error, let's look into struct archive which is defined in libarchive/archive_private.h .

    96	struct archive {
    97		/*
    98		 * The magic/state values are used to sanity-check the
    99		 * client's usage.  If an API function is called at a
   100		 * ridiculous time, or the client passes us an invalid
   101		 * pointer, these values allow me to catch that.
   102		 */
   103		unsigned int	magic;
   104		unsigned int	state;
   105	
   106		/*
   107		 * Some public API functions depend on the "real" type of the
   108		 * archive object.
   109		 */
   110		const struct archive_vtable *vtable;
   111	
   112		int		  archive_format;
   113		const char	 *archive_format_name;
   114	
   115		/* Number of file entries processed. */
   116		int		  file_count;
   117	
   118		int		  archive_error_number;
   119		const char	 *error;
   120		struct archive_string	error_string;
   121	
   122		char *current_code;
   123		unsigned current_codepage; /* Current ACP(ANSI CodePage). */
   124		unsigned current_oemcp; /* Current OEMCP(OEM CodePage). */
   125		struct archive_string_conv *sconv;
   126	
   127		/*
   128		 * Used by archive_read_data() to track blocks and copy
   129		 * data to client buffers, filling gaps with zero bytes.
   130		 */
   131		const char	 *read_data_block;
   132		int64_t		  read_data_offset;
   133		int64_t		  read_data_output_offset;
   134		size_t		  read_data_remaining;
   135	
   136		/*
   137		 * Used by formats/filters to determine the amount of data
   138		 * requested from a call to archive_read_data(). This is only
   139		 * useful when the format/filter has seek support.
   140		 */
   141		char		  read_data_is_posix_read;
   142		size_t		  read_data_requested;
   143	};

Looks these two fields in the following can be used to address the error reason.

   119		const char	 *error;
   120		struct archive_string	error_string;

@p3ck
Copy link
Contributor

p3ck commented Sep 11, 2024

@dzickusrh just ran into this and it was curl didn't trust the self signed certs. Once he installed the trusted certs package it worked fine.

So we need to also check the error from the https connection..

@p3ck
Copy link
Contributor

p3ck commented Sep 11, 2024

I see now that the above job had ssl_verify=off. But the issue remains the same.. We aren't reporting the real error back..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants