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

Lagoon Drush sql-dump task sometimes truncates the DB dump file #2751

Closed
smlx opened this issue Jul 5, 2021 · 2 comments · Fixed by #2753
Closed

Lagoon Drush sql-dump task sometimes truncates the DB dump file #2751

smlx opened this issue Jul 5, 2021 · 2 comments · Fixed by #2753
Assignees
Labels
1-api-auth API & Authentication subsystem

Comments

@smlx
Copy link
Member

smlx commented Jul 5, 2021

Describe the bug

Lagoon Drush sql-dump task sometimes truncates the DB dump file.

To Reproduce

Steps to reproduce the behavior:

  1. Run a drush sql-dump task.
  2. See it complete successfully.
  3. Download the file.
  4. See gzip report that the file is truncated:
$ zcat example-master-2021-07-05T08\ 16\ 35+00\ 00.sql.gz | tail -c 128

gzip: example-master-2021-07-05T08 16 35+00 00.sql.gz: unexpected end of file
-XXXXXXXXXXX-xxxxxxxxxxxxxxxxx','i:1555555555;',2111111111),('honeypot_time_restriction','XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Downloading the file multiple times results in the same truncated file with the same sha256sum.

Expected behavior

I expected the file not to be truncated.

Screenshots

n/a

Additional context

Here are the logs of the task pod:

[pod/lagoon-task-12345-mnopqr/cli] 2021-07-05T08:17:47.982553919Z  [success] Database dump saved to /tmp/example-master-2021-07-05T08:16:35+00:00.sql.gz
[pod/lagoon-task-12345-mnopqr/cli] 2021-07-05T08:17:48.186664335Z Pseudo-terminal will not be allocated because stdin is not a terminal.
[pod/lagoon-task-12345-mnopqr/cli] 2021-07-05T08:17:48.255605119Z Warning: Permanently added '[ssh.lagoon.amazeeio.cloud]:32222,[34.65.70.251]:32222' (ECDSA) to the list of known hosts.
[pod/lagoon-task-12345-mnopqr/cli] 2021-07-05T08:17:52.222333598Z {"data":{"uploadFilesForTask":{"id":12345,"files":[{"filename":"example-master-2021-07-05T08:16:35+00:00.sql.gz"}]}}}

The dump is successful, and then the Lagoon API returns a successful response payload.

So either:

  • drush sql-dump is truncating the file, and the truncated file is being uploaded.
  • Lagoon API is truncating the file during uploadFilesForTask and storing the file truncated.
@smlx smlx added the 1-api-auth API & Authentication subsystem label Jul 5, 2021
@smlx
Copy link
Member Author

smlx commented Jul 5, 2021

Is this issue just #2746?

@rocketeerbkw rocketeerbkw self-assigned this Jul 5, 2021
@rocketeerbkw
Copy link
Member

I can verify locally that with some file sizes, the API is truncating the file, so it's probably not a problem with drush. It seems likely to be related to #2746

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-api-auth API & Authentication subsystem
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants