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

Using SysctlConfig class instead of Sysctl class #1041

Merged
merged 6 commits into from Feb 26, 2020
Merged

Conversation

schubi2
Copy link
Member

@schubi2 schubi2 commented Feb 25, 2020

Problem
Sysctl entries are stored in different files in different directories:
/run/sysctl.d,
/etc/sysctl.d
/usr/local/lib/sysctl.d
/usr/lib/sysctl.d
/lib/sysctl.d
/etc/sysctl.conf

General solution for it:
yast/yast-yast2#1021

Solution
Using SysctlConfig class.

Testing
Tested manually

@coveralls
Copy link

coveralls commented Feb 25, 2020

Coverage Status

Coverage decreased (-0.03%) to 69.487% when pulling dd44b5e on master-bsc-1151649 into c375617 on master.

@schubi2 schubi2 changed the title Using SysctlConfig class: Handle sysctl entries in different director… Using SysctlConfig class instead of Sysctl class Feb 25, 2020
@teclator
Copy link
Contributor

Using SysctlConfig class: Handle sysctl entries in different directories and files.

Using SysctlConfig class: Handle sysctl entries in different directories and files.

Would be nice to have a link to the trello card as well as links to related pull requests, like for example the one yast/yast-yast2#1021 which added SysctlConfig class and the reason of the dependency version update.

Using the storage-ng PR template is recommended:

https://github.com/yast/yast-storage-ng/blob/master/.github/pull_request_template.md

sysctl_config.forward_ipv6 = routing.forward_ipv6
sysctl_config.save unless sysctl_config.conflict?

update_ip_forwarding((sysctl_config.forward_ipv4 ? "1" : "0"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Why were modified the calls to raw_forward_ methods ? are them not valid anymore?

Copy link
Member Author

Choose a reason for hiding this comment

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

Imo has wished to remove them in the new class. :-)

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, then next time we touch the class we should also get rid of of this documentation that is out of date or never implemented for this new class 😜

https://github.com/yast/yast-yast2/pull/1021/files#diff-4216cbac8e98ed10343a00513e10e917R47

Copy link
Contributor

@teclator teclator left a comment

Choose a reason for hiding this comment

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

LGTM

@schubi2 schubi2 merged commit f33346c into master Feb 26, 2020
@schubi2 schubi2 deleted the master-bsc-1151649 branch February 26, 2020 09:44
@yast-bot
Copy link
Contributor

❌ Public Jenkins job #133 failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants