Skip to content

Conversation

HuijingHei
Copy link
Member

Move the continuous writing to service instead of systemd-run.
Fixes openshift/os#1751

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the ostree.sync test to use a dedicated systemd service for continuous file writing, instead of systemd-run. This is a good improvement for robustness and clarity. The associated path changes from /var/tmp to /var/mnt are applied consistently. My review includes a suggestion to simplify the writer script by removing redundant sudo calls, as the script is already executed with root privileges by the systemd service.

@HuijingHei
Copy link
Member Author

HuijingHei commented Sep 19, 2025

Run ostree.sync manually on c10s/rhcos10, the result is passed.

[coreos-assembler]$ ./bin/kola run -p qemu -b rhcos --qemu-image /srv/data/scos-10.0.20250918-0-qemu.x86_64.qcow2 ostree.sync --multiply 5
=== RUN   ostree.sync0
=== RUN   ostree.sync1
=== RUN   ostree.sync2
=== RUN   ostree.sync3
=== RUN   ostree.sync4
--- PASS: ostree.sync0 (258.91s)
        sync.go:221: Got NFS mount.
        sync.go:265: Found test=1 in kernel argument after rebooted.
--- PASS: ostree.sync3 (258.19s)
        sync.go:221: Got NFS mount.
        sync.go:265: Found test=1 in kernel argument after rebooted.
--- PASS: ostree.sync4 (257.61s)
        sync.go:221: Got NFS mount.
        sync.go:265: Found test=1 in kernel argument after rebooted.
--- PASS: ostree.sync2 (258.52s)
        sync.go:221: Got NFS mount.
        sync.go:265: Found test=1 in kernel argument after rebooted.
--- PASS: ostree.sync1 (258.35s)
        sync.go:221: Got NFS mount.
        sync.go:265: Found test=1 in kernel argument after rebooted.
PASS, output in tmp/kola/qemu-2025-09-19-0338-7444

[coreos-assembler]$ ../coreos-assembler/bin/kola run -p qemu -b rhcos --qemu-image /srv/data/rhcos-10.1.20250911-0-qemu.x86_64.qcow2 ostree.sync --multiply 5
=== RUN   ostree.sync2
=== RUN   ostree.sync3
=== RUN   ostree.sync4
=== RUN   ostree.sync0
=== RUN   ostree.sync1
--- PASS: ostree.sync2 (258.38s)
        sync.go:221: Got NFS mount.
        sync.go:265: Found test=1 in kernel argument after rebooted.
--- PASS: ostree.sync0 (258.06s)
        sync.go:221: Got NFS mount.
        sync.go:265: Found test=1 in kernel argument after rebooted.
--- PASS: ostree.sync1 (260.50s)
        sync.go:221: Got NFS mount.
        sync.go:265: Found test=1 in kernel argument after rebooted.
--- PASS: ostree.sync4 (260.28s)
        sync.go:221: Got NFS mount.
        sync.go:265: Found test=1 in kernel argument after rebooted.
--- PASS: ostree.sync3 (263.38s)
        sync.go:221: Got NFS mount.
        sync.go:265: Found test=1 in kernel argument after rebooted.
PASS, output in tmp/kola/qemu-2025-09-19-0522-8047

@HuijingHei HuijingHei changed the title tests: fix ostree.sync test on c10s/rhcos10.1 tests: fix failed ostree.sync on c10s/rhcos10.1 Sep 19, 2025
@HuijingHei HuijingHei force-pushed the fix-sync-rhel10 branch 2 times, most recently from bd975fd to b975df9 Compare September 19, 2025 08:30
jbtrystram
jbtrystram previously approved these changes Sep 19, 2025
Copy link
Member

@jbtrystram jbtrystram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. minor suggestion

if err != nil {
c.Fatalf("failed to run nfs-random-write: %v", err)
}
_, err := c.SSH(client, "sudo systemctl start nfs-random-write@{1..4}.service")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add --no-block to start all 4 at the same time ?

@HuijingHei
Copy link
Member Author

/hold
Do more testing and check that this is not stable.

Move the continuous writing to service instead of systemd-run.
Fixes openshift/os#1751
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[scos10] ostree.sync kola test failed
2 participants