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

fix ncat sctp test and update CI image #978

Merged
merged 3 commits into from
May 8, 2024

Conversation

Luap99
Copy link
Member

@Luap99 Luap99 commented May 3, 2024

see commits

@Luap99
Copy link
Member Author

Luap99 commented May 3, 2024

@edsantiago I hope this unblock us hopefully

@mheon
Copy link
Member

mheon commented May 3, 2024

LGTM once it passes CI

Luap99 added 3 commits May 7, 2024 11:39
nmap-ncat seem to have weird bugs in that the received data is only
printed on stdout when there is a no data on stdin, not stdin because
the returns EOF when it gets read and if there is any data then ncat
fails as well as it cannot write it to the remote[1]...

So just try to emulate like how it works in a terminal by creating an
anonymous pipe that contains no data so ncat is happy and prints our
test string as expected.

[1] nmap/nmap#2829

Signed-off-by: Paul Holzinger <[email protected]>
Contains a new ncat with udp bugs fixes, we still need the sctp
workaround though.

from containers/automation_images#349

Signed-off-by: Paul Holzinger <[email protected]>
Remove some unused ipva code fromt he dhcp proxy, I don't see us needing
this anythime soon and we can always add it back later.

Signed-off-by: Paul Holzinger <[email protected]>
@Luap99 Luap99 marked this pull request as ready for review May 7, 2024 10:02
@Luap99
Copy link
Member Author

Luap99 commented May 8, 2024

@edsantiago @mheon PTAL again

Copy link
Member

@edsantiago edsantiago left a comment

Choose a reason for hiding this comment

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

Very weird behavior, see inline.

And your third commit (clippy) doesn't say what the clippy warnings actually are, and I'm assuming that "ipva" is a typo for "ipv6" maybe? Not a blocker from my perspective but I mention it for you to decide whether a future maintainer will care about that or not.

@@ -644,7 +645,7 @@ function run_nc_test() {
fi

nsenter -n -t "${CONTAINER_NS_PIDS[$container_ns]}" timeout --foreground -v --kill=10 5 \
nc $nc_common_args -l -p $container_port &>"$NETAVARK_TMPDIR/nc-out" <$stdin &
nc $nc_common_args -l -p $container_port &>"$NETAVARK_TMPDIR/nc-out" <&$stdin &
Copy link
Member

Choose a reason for hiding this comment

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

Although CI is passing, it's not for the reasons described in your commit: $stdin is, at this point, undefined. I expected bash to treat this as an error, but it doesn't, and I'm completely lost as to what exactly is happening.

I think the answer here is to remove <&$stdin entirely, given that you've set up the exec, but I'm sorry I can't approve this as it is.

Copy link
Member Author

Choose a reason for hiding this comment

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

sorry I don't follow why do you think $stdin is undefined?

Copy link
Member Author

@Luap99 Luap99 May 8, 2024

Choose a reason for hiding this comment

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

I will try to remove it, if that makes it work I happily do that as it makes the test code simpler

Copy link
Member Author

Choose a reason for hiding this comment

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

$ cat <&
bash: syntax error near unexpected token `newline'

so I don't see why this would pass if it was actually undefined

Copy link
Member

Choose a reason for hiding this comment

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

no wait hold on; I'm refreshing my memory on {varname}

Copy link
Contributor

openshift-ci bot commented May 8, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: edsantiago, Luap99

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

@edsantiago
Copy link
Member

My bad.

/lgtm

@openshift-ci openshift-ci bot added the lgtm label May 8, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 395ace5 into containers:main May 8, 2024
14 checks passed
@Luap99 Luap99 deleted the sctp-test branch May 8, 2024 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants