Project

General

Profile

Actions

Bug #9794

closed

Malformed .gz inventory breaks upload process

Added by Janos Mattyasovszky over 7 years ago. Updated about 7 years ago.

Status:
Released
Priority:
N/A
Assignee:
-
Category:
Techniques
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

When you have a malformed .ocs.gz inventory, the send-clean.sh script fails:

the decompression fails but the error is not handled:

+ /bin/gzip --force --quiet --decompress /var/rudder/inventories/incoming/badserver-2016-09-20-10-49-31.ocs.gz

gzip: /var/rudder/inventories/incoming/badserver-2016-09-20-10-49-31.ocs.gz: unexpected end of file

Then the curl invocation fails, because the expected uncompressed file is not present, that is supposed to be uploaded:

++ /usr/bin/curl --proxy '' -f -F file=@/var/rudder/inventories/incoming/badserver-2016-09-20-10-49-31.ocs -o /dev/null -w '%{http_code}' http://localhost:8080/endpoint/upload/
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (26) failed creating formpost data

# ls /var/rudder/inventories/incoming/badserver-2016-09-20-10-49-31.ocs
ls: cannot access /var/rudder/inventories/incoming/badserver-2016-09-20-10-49-31.ocs: No such file or directory

Actions

Also available in: Atom PDF