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

fixed #1453 : invalid syntax of /etc/sysctl.conf after executing init os script #1454

Merged
merged 1 commit into from
Aug 22, 2022

Conversation

hzhhong
Copy link
Contributor

@hzhhong hzhhong commented Aug 19, 2022

What type of PR is this?

/kind bug

What this PR does / why we need it:

Fixed invalid syntax of /etc/sysctl.conf after executing init os script.

log output:
sysctl: /etc/sysctl.conf(103): invalid syntax, continuing...

When using "awk print" to write to a file and read the same file at the same time, and the file size exceeds 4Kbytes, it will cause the file content to be truncated.
awk ' !x[$0]++{print > "/etc/sysctl.conf"}' /etc/sysctl.conf

Which issue(s) this PR fixes:

Fixes #1453

Special notes for reviewers:

Does this PR introduced a user-facing change?


Additional documentation, usage docs, etc.:


@ks-ci-bot ks-ci-bot added kind/bug Categorizes issue or PR as related to a bug. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 19, 2022
@pixiake
Copy link
Collaborator

pixiake commented Aug 22, 2022

Thanks for this contribution !

@pixiake
Copy link
Collaborator

pixiake commented Aug 22, 2022

/lgtm
/approve

@ks-ci-bot ks-ci-bot added the lgtm Indicates that a PR is ready to be merged. label Aug 22, 2022
@ks-ci-bot
Copy link
Collaborator

LGTM label has been added.

Git tree hash: 415297ba6ea011a68a3d6d0e63bea0fdda35017c

@ks-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hzhhong, pixiake

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ks-ci-bot ks-ci-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 22, 2022
@ks-ci-bot ks-ci-bot merged commit 25fb631 into kubesphere:master Aug 22, 2022
@pixiake
Copy link
Collaborator

pixiake commented Aug 22, 2022

@all-contributors please add @hzhhong for code

@allcontributors
Copy link
Contributor

@pixiake

I've put up a pull request to add @hzhhong! 🎉

@hzhhong hzhhong deleted the invalid_sysctl branch August 23, 2022 01:40
@hzhhong hzhhong restored the invalid_sysctl branch August 23, 2022 01:41
@hzhhong hzhhong deleted the invalid_sysctl branch August 23, 2022 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

invalid syntax of /etc/sysctl.conf after executing init os script
3 participants