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

Add basic XFS powerfailure tests #707

Merged
merged 1 commit into from
Mar 13, 2024
Merged

Add basic XFS powerfailure tests #707

merged 1 commit into from
Mar 13, 2024

Conversation

tjungblu
Copy link
Contributor

@tjungblu tjungblu commented Mar 7, 2024

This also introduces mkfs options, in case we need to accomodate for non-default parameters here in the future.

@fuweid fuweid self-requested a review March 11, 2024 03:11
func TestRestartFromPowerFailureXFS(t *testing.T) {
for _, tc := range []struct {
name string
du time.Duration
Copy link
Member

Choose a reason for hiding this comment

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

Its value is always 5s.

Suggested change
du time.Duration

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

Comment on lines 132 to 130
mkfsOpt: "-m bigtime=1,finobt=1,rmapbt=0,reflink=1 -i sparse=1 -l lazy-count=1",
// openshift also supplies seclabel,relatime,prjquota on RHEL, but that's not supported on our CI
// prjquota is only unsupported on our ARM runners.
fsMountOpt: "rw,attr2,inode64,logbufs=8,logbsize=32k",
Copy link
Member

Choose a reason for hiding this comment

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

Please provide a link to the guide of XFS, including detailed explanation to all the parameters.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've left a mention of the man commands, not sure it makes sense to link documentation to an online manual.

mkfsOpt: "-m bigtime=1,finobt=1,rmapbt=0,reflink=1 -i sparse=1 -l lazy-count=1",
// openshift also supplies seclabel,relatime,prjquota on RHEL, but that's not supported on our CI
// prjquota is only unsupported on our ARM runners.
// You can find more information in either the man page with `man xfs` or `man mkfs.xfs`.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// You can find more information in either the man page with `man xfs` or `man mkfs.xfs`.
// You can find more information in either the man page with `man xfs` or `man mkfs.xfs`.
// Also refer to https://man7.org/linux/man-pages/man8/mkfs.xfs.8.html.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

whatever you prefer, I personally would avoid it due to link rot....

Copy link
Member

Choose a reason for hiding this comment

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

Some parameters (e.g. -m bigtime=1) used in this PR are not supported by old version of mkfs.xfs. Probably my linux VM is too old (3.10).

Providing a link should be better.

  • The link should be relatively stable.
  • When you google it, you will find lots of links, not all links are correct (e.g. https://linux.die.net/man/8/mkfs.xfs doesn't include all parameters/flags). So providing a referenced link should be better. Even it rots, it also provides a reference on which link returned by google is correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added your link

Copy link
Member

@ahrtr ahrtr left a comment

Choose a reason for hiding this comment

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

lgtm with a minor comment

Thank you

Copy link
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

LGTM

thanks!

@tjungblu
Copy link
Contributor Author

thanks folks, I'll update the PR throughout my morning today

@tjungblu
Copy link
Contributor Author

done, PTAL again.

This also introduces mkfs options, in case we need to accomodate for
non-default parameters here in the future.

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
@ahrtr ahrtr merged commit c57b353 into etcd-io:main Mar 13, 2024
17 checks passed
@tjungblu tjungblu deleted the xfs branch March 14, 2024 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants