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

network: routing policy rule cleanups #16881

Merged
merged 7 commits into from
Sep 4, 2020

Conversation

yuwata
Copy link
Member

@yuwata yuwata commented Aug 28, 2020

No description provided.

@yuwata yuwata added the network label Aug 28, 2020
@keszybz
Copy link
Member

keszybz commented Aug 28, 2020

CI no like:

276/809 test-routing-policy-rule                FAIL     0.17 s (killed by signal 6 SIGABRT)

--- command ---
SYSTEMD_LANGUAGE_FALLBACK_MAP='/tmp/autopkgtest.1plWPg/build.E7G/systemd/src/locale/language-fallback-map' PATH='/tmp/autopkgtest.1plWPg/build.E7G/systemd/build-deb:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin' SYSTEMD_KBD_MODEL_MAP='/tmp/autopkgtest.1plWPg/build.E7G/systemd/src/locale/kbd-model-map' /tmp/autopkgtest.1plWPg/build.E7G/systemd/build-deb/test-routing-policy-rule
--- stdout ---
--- /tmp/systemd-test-routing-policy-rule.6vDyct	2020-08-28 05:30:46.060289127 +0000
+++ /tmp/systemd-test-routing-policy-rule.kny7Qm	2020-08-28 05:30:46.060289127 +0000
@@ -1 +1 @@
-RULE=from=1.2.3.4/32 to=2.3.4.5/32 family=AF_INET tos=5 priority=0 fwmark=1/2 table=10
+RULE=family=AF_INETfrom=1.2.3.4/32 to=2.3.4.5/32 tos=5 fwmark=1/2 invert_rule=no table=10
--- stderr ---
Failed to read $container of PID 1, ignoring: Permission denied
Found container virtualization none.
========== basic parsing ==========
put:
RULE=from=1.2.3.4/32 to=2.3.4.5/32 family=AF_INET tos=5 priority=0 fwmark=1/2 table=10
Unknown RPDB rule, ignoring: family
got:
RULE=family=AF_INETfrom=1.2.3.4/32 to=2.3.4.5/32 tos=5 fwmark=1/2 invert_rule=no table=10
$ diff -u /tmp/systemd-test-routing-policy-rule.6vDyct /tmp/systemd-test-routing-policy-rule.kny7Qm
Assertion 'system(cmd) == 0' failed at src/network/test-routing-policy-rule.c:54, function test_rule_serialization(). Aborting.
-------

@keszybz keszybz added the ci-fails/needs-rework 🔥 Please rework this, the CI noticed an issue with the PR label Aug 28, 2020
@yuwata yuwata force-pushed the network-routing-policy-rule-cleanups branch from 5c98529 to 7e6e160 Compare August 28, 2020 09:39
@yuwata yuwata removed the ci-fails/needs-rework 🔥 Please rework this, the CI noticed an issue with the PR label Aug 28, 2020
@yuwata
Copy link
Member Author

yuwata commented Aug 28, 2020

@keszybz Test is updated.

@keszybz
Copy link
Member

keszybz commented Aug 28, 2020

LGTM.

@keszybz keszybz added the good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed label Aug 28, 2020
Copy link
Member

@poettering poettering left a comment

Choose a reason for hiding this comment

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

minor nitpick about the log levels, but i guess this is pre-existing

} else if (streq(a, "invert_rule")) {
r = parse_boolean(b);
if (r < 0) {
log_error_errno(r, "Failed to parse RPDB rule invert_rule, ignoring: %s", b);
Copy link
Member

Choose a reason for hiding this comment

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

should be downgraded to warning i guess (and the other cases like this too).

(i.e. if a log message says "ignoring" it's usually a good indication it should be warning, and not error)

if (STR_IN_SET(a, "from", "to")) {
if (streq(a, "family")) {
r = af_from_name(b);
if (r < 0) {
Copy link
Member

Choose a reason for hiding this comment

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

as above

continue;
}
if (rule->family != AF_UNSPEC && rule->family != r) {
log_error("RPDB rule family is already specified, ignoring assignment: %s", b);
Copy link
Member

Choose a reason for hiding this comment

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

here too, and everywhere else

@poettering poettering added good-to-merge/with-minor-suggestions and removed good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed labels Aug 28, 2020
@yuwata yuwata force-pushed the network-routing-policy-rule-cleanups branch from 7e6e160 to 5c72a6d Compare September 3, 2020 23:48
@yuwata
Copy link
Member Author

yuwata commented Sep 3, 2020

@poettering Thank you for the review, and sorry for late response. Now log level is downgraded. Setting the green label.

@yuwata yuwata added good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed and removed good-to-merge/with-minor-suggestions labels Sep 3, 2020
@poettering
Copy link
Member

lgtm, thanks!

@keszybz
Copy link
Member

keszybz commented Sep 4, 2020

Bad semaphore: collect2: fatal error: ld terminated with signal 11 [Segmentation fault]

@keszybz
Copy link
Member

keszybz commented Sep 4, 2020

bionic-i386 timed out.

@keszybz keszybz added ci-failure-appears-unrelated and removed good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed labels Sep 4, 2020
@keszybz keszybz merged commit 459c41b into systemd:master Sep 4, 2020
@yuwata yuwata deleted the network-routing-policy-rule-cleanups branch September 4, 2020 11:09
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.

None yet

3 participants