Skip to content

systemd: enable zstd support in journald#6494

Merged
ddstreetmicrosoft merged 1 commit into
mainfrom
ddstreet/6424
Oct 23, 2023
Merged

systemd: enable zstd support in journald#6494
ddstreetmicrosoft merged 1 commit into
mainfrom
ddstreet/6424

Conversation

@ddstreetmicrosoft

@ddstreetmicrosoft ddstreetmicrosoft commented Oct 19, 2023

Copy link
Copy Markdown

Also for mariner 2, force journald to not use zstd compression, to retain backwards compatibility.

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./SPECS/LICENSES-AND-NOTICES/data/licenses.json, ./SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md, ./SPECS/LICENSES-AND-NOTICES/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • Ready to merge

Summary

What does the PR accomplish, why was it needed?
allows journalctl to read zstd compressed journal files

Change Log
  • Change
  • Change
  • Change
    build systemd with zstd support
    disable journald from defaulting to zstd-compressed journal file creation, to retain backwards compatibility for mariner 2
Does this affect the toolchain?

**/NO

Associated issues
Test Methodology

@ddstreetmicrosoft ddstreetmicrosoft requested a review from a team as a code owner October 19, 2023 20:49
@microsoft-github-policy-service microsoft-github-policy-service Bot added the main PR Destined for main label Oct 19, 2023
@ddstreetmicrosoft

Copy link
Copy Markdown
Author

@dmcilvaney @PawelWMS @nicogbg I have no idea why the pipeline build is failing, I need to pass investigation of the pipeline off to you all

@christopherco

Copy link
Copy Markdown
Collaborator

Changes LGTM but I too am concerned about the pipeline build issue. Error are some odd file conflicts between systemd-rpm-macros and rpm-build

Also for mariner 2, force journald to not use zstd compression, to
retain backwards compatibility.

Fixes: #6424
@ddstreetmicrosoft ddstreetmicrosoft merged commit 89a5954 into main Oct 23, 2023
@ddstreetmicrosoft ddstreetmicrosoft deleted the ddstreet/6424 branch October 23, 2023 18:57
@dmcilvaney dmcilvaney restored the ddstreet/6424 branch October 23, 2023 20:30
christopherco added a commit to christopherco/CBL-Mariner that referenced this pull request Nov 3, 2023
After enabling zstd support in systemd build, one can encounter an error
where libzstd.so.1 is missing in /sbin/init.

[    0.593882] Run /sbin/init as init process

/sbin/init: error while loading shared libraries: libzstd.so.1: cannot open shared object file: No such file or directory
[    0.647950] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00
[    0.648635] CPU: 0 PID: 1 Comm: init Not tainted 6.1.0.mshv11 #1
[    0.649059] Call Trace:

[    0.649251]  <TASK>
[    0.649529]  dump_stack_lvl+0x3b/0x59
[    0.649881]  panic+0xfb/0x264
[    0.650240]  do_exit.cold+0x15/0x15

[    0.650639]  do_group_exit+0x28/0x80
[    0.651034]  __x64_sys_exit_group+0xf/0x10
[    0.651436]  do_syscall_64+0x43/0x90
[    0.651842]  entry_SYSCALL_64_after_hwframe+0x63/0xcd

[    0.652283] RIP: 0033:0x7f92ce4c6151

[    0.653296] Code: 1f 84 00 00 00 00 00 66 90 f3 0f 1e fa be e7 00 00 00 ba 3c 00 00 00 eb 0d 89 d0 0f 05 48 3d 00 f0 ff ff 77 1c f4 89 f0 0f 05 <48> 3d 00 f0 ff ff 76 e7 f7 d8 89 05 ff 40 01 00 eb dd 0f 1f 44 00
[    0.654484] RSP: 002b:00007fffb0a5e4d8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7

[    0.655344] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f92ce4c6151
[    0.656023] RDX: 000000000000003c RSI: 00000000000000e7 RDI: 000000000000007f
[    0.656712] RBP: 00007fffb0a5f110 R08: 0000000000000001 R09: 0000000000000000
[    0.657410] R10: 00000000ffffffff R11: 0000000000000246 R12: 00007f92ce4d0668
[    0.658092] R13: 00007f92ce32e9ff R14: 00007f92ce32ea10 R15: 0000000000000000
[    0.658577]  </TASK>
[    0.658987] Kernel Offset: disabled

[    0.659359] Rebooting in 1 seconds..

Add missing Requires on the zstd-libs package so the missing shared
object will always be installed at runtime with the systemd package.

Fixes: microsoft#6494

Signed-off-by: Chris Co <chrco@microsoft.com>
@ddstreetmicrosoft ddstreetmicrosoft deleted the ddstreet/6424 branch December 4, 2023 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

main PR Destined for main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants