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

Drop dependency on Net::Interface #217

Merged
merged 2 commits into from
Oct 27, 2021

Conversation

mattias-p
Copy link
Member

Results in a less helpful error message in a rare situation - i.e. when
--sourceaddr is specified with an unreasonable value.

Purpose

Makes installation easier/possible on CentOS and Alpine.

Context

This makes it easier to implement #216.

Changes

This PR removes some code to display a more helpful error message in an edge case. To compensate the documentation is improved for the involved CLI parameter.

The dependency on Net::Interface is removed.

How to test this PR

Make sure the usage documentation for the --sourceaddr option clarifies that you need to specify an IP address that is configured on a network interface:

zonemaster-cli --help

Make sure we don't depend on Net::Interface:

grep Net::Interface Makefile.PL

Makes installation easier/possible on CentOS and Alpine.
Results in a less helpful error message in a rare situation - i.e. when
--sourceaddr is specified with an unreasonable value.
@mattias-p mattias-p added this to the v2021.2 milestone Oct 12, 2021
@mattias-p mattias-p requested review from matsduf, vlevigneron, hannaeko and a user October 12, 2021 08:47
Copy link
Contributor

@matsduf matsduf left a comment

Choose a reason for hiding this comment

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

There is also POD documentation in script/zonemaster-cli which is used to create the man page. The option is not even mentioned there. Should it be added with the correct instruction?

documentation => __( 'Local IP address that the test engine should try to send its requests from.' ),
documentation => __(
'Source IP address used to send queries. '
. 'Setting an IP address not correctly configured on a local network interface causes cryptic error messages.'
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest adding "This option is rarely needed."

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't see when that would be useful. But I'll add sourceaddr to the POD.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see when that would be useful.

The proposed text is to further prevent users from using the option. It is really for special cases.

Copy link
Member Author

Choose a reason for hiding this comment

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

I expect that the people who use this option are exactly the ones who need it. Even without such an assertion.

Copy link
Contributor

Choose a reason for hiding this comment

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

I cannot see the problem of adding extra comment.

Copy link
Contributor

@matsduf matsduf left a comment

Choose a reason for hiding this comment

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

I still do have a comment where I ask for additional comment in the user documentation, but I do not want to block.

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.

2 participants