Skip to content

Conversation

dongsupark
Copy link
Member

@dongsupark dongsupark commented Aug 10, 2023

Since #950 was merged, tarball files flatcar-{packages,sdk}-*.tar.zst have been created with mode 0600 instead of 0644.
As a result, the files with mode 0600 were uploaded to bincache, but afterwards copy-to-origin.sh that in turn runs rsync from bincache to the origin server could not read the tarballs.

To fix that, it is necessary to chmod from 0600 to 0644 to make it readable by rsync during the release process.

All of that happens because zstd sets the mode of the output file to 0600 in case of temporary files to avoid race condition.

See also facebook/zstd#1644, facebook/zstd#3432.

/update-sdk

Testing done

CI: http://jenkins.infra.kinvolk.io:8080/job/container/job/sdk/985/cldsv/

  • Changelog entries added in the respective changelog/ directory (user-facing change, bug fix, security fix, update) (not needed)
  • Inspected CI output for image differences: /boot and /usr size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.

@dongsupark dongsupark added the bug Something isn't working label Aug 10, 2023
@dongsupark dongsupark temporarily deployed to development August 10, 2023 10:57 — with GitHub Actions Inactive
@dongsupark dongsupark force-pushed the dongsu/zstd-file-perm branch from a6db9f3 to 77309a6 Compare August 10, 2023 11:01
@dongsupark dongsupark temporarily deployed to development August 10, 2023 11:01 — with GitHub Actions Inactive
@github-actions
Copy link

github-actions bot commented Aug 10, 2023

@dongsupark dongsupark marked this pull request as ready for review August 11, 2023 09:29
@dongsupark
Copy link
Member Author

CI passed, and tarballs on bincache are created with mode 0644 as expected.

core@bld-bincache ~ $ ls -l /srv/bincache/containers/9999.9.9-zstd-file-perm/flatcar-*zst
-rw-r--r--. 1 bincache bincache 5937378040 Aug 10 18:08 /srv/bincache/containers/9999.9.9-zstd-file-perm/flatcar-packages-amd64-9999.9.9-zstd-file-perm.tar.zst
-rw-r--r--. 1 bincache bincache 5571396108 Aug 10 18:09 /srv/bincache/containers/9999.9.9-zstd-file-perm/flatcar-packages-arm64-9999.9.9-zstd-file-perm.tar.zst
-rw-r--r--. 1 bincache bincache 3811543781 Aug 10 16:06 /srv/bincache/containers/9999.9.9-zstd-file-perm/flatcar-sdk-all-9999.9.9-zstd-file-perm.tar.zst
-rw-r--r--. 1 bincache bincache 2533495262 Aug 10 16:07 /srv/bincache/containers/9999.9.9-zstd-file-perm/flatcar-sdk-amd64-9999.9.9-zstd-file-perm.tar.zst
-rw-r--r--. 1 bincache bincache 2489058577 Aug 10 16:09 /srv/bincache/containers/9999.9.9-zstd-file-perm/flatcar-sdk-arm64-9999.9.9-zstd-file-perm.tar.zst

@dongsupark dongsupark requested a review from a team August 11, 2023 09:30
Since #950 was merged,
tarball files `flatcar-{packages,sdk}-*.tar.zst` have been created
with mode 0600 instead of 0644. As a result, the files with mode 0600
were uploaded to bincache, but afterwards `copy-to-origin.sh` that in
turn runs rsync from bincache to the origin server could not read the
tarballs.

To fix that, it is necessary to chmod from 0600 to 0644 to make it
readable by rsync during the release process.

All of that happens because zstd sets the mode of the output file to
0600 in case of temporary files to avoid race condition.

See also facebook/zstd#1644,
facebook/zstd#3432.
@dongsupark
Copy link
Member Author

Updated commit message, description.

@dongsupark dongsupark merged commit ab0e58d into main Aug 11, 2023
@dongsupark dongsupark deleted the dongsu/zstd-file-perm branch August 11, 2023 13:39
@dongsupark
Copy link
Member Author

cherry-picked to flatcar-3689

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alpha bug Something isn't working main
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants