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

DLPX-93498 LTS 24.04: Warning generated due to missing header declaring struct iscsi_conn #103

Conversation

palash-gandhi
Copy link

@palash-gandhi palash-gandhi commented Feb 26, 2025

Problem

estat and stbtrace Blackbox tests fail because warnings are written to stderr
and Blackbox treats those as errors:

09:27:48  dlpx-os-upgrade-qar-164571-766f97e2.dcol2.delphix.com: sudo -- timeout --preserve-status --signal=SIGINT 30 estat iscsi 15
09:28:11  02/26/25 - 17:27:53 UTC
09:28:11  
09:28:11   Tracing enabled... Hit Ctrl-C to end.
09:28:11  Caught error while executing command: sudo -- timeout --preserve-status --signal=SIGINT 30 estat iscsi 15
09:28:11  /virtual/main.c:99:48: warning: declaration of 'struct iscsi_conn' will not be visible outside of this function [-Wvisibility]
09:28:11     99 | iscsi_target_start(struct pt_regs *ctx, struct iscsi_conn *conn,
09:28:11        |                                                ^
09:28:11  /virtual/main.c:127:51: warning: declaration of 'struct iscsi_conn' will not be visible outside of this function [-Wvisibility]
09:28:11    127 | iscsi_target_response(struct pt_regs *ctx, struct iscsi_conn *conn, struct iscsit_cmd *cmd, int state)
09:28:11        |                                                   ^
09:28:11  2 warnings generated.
...
...
09:32:51  blackbox.exceptions.BlackboxAssertionError: The following estat subcommands failed to execute successfully: ['iscsi']: Expected ['iscsi'] to be empty

The struct is defined in scsi/libiscsi.h

Solution

Include it.

Testing Done

Modified the script on a 24.04 engine and verified that the warnings are no longer present:

delphix@localhost:~$ cat /usr/share/performance-diagnostics/bpf/estat/iscsi.c | grep libiscsi
#include <scsi/libiscsi.h>

delphix@localhost:~$ sudo estat iscsi 15
02/26/25 - 18:13:07 UTC

 Tracing enabled... Hit Ctrl-C to end.
delphix@localhost:~$

@palash-gandhi palash-gandhi force-pushed the dlpx/pr/palash-gandhi/0ba31ee3-501f-4995-9701-2c0eb7fe379f branch from 0ae9d24 to 6da7068 Compare February 26, 2025 18:12
@palash-gandhi palash-gandhi force-pushed the dlpx/pr/palash-gandhi/0ba31ee3-501f-4995-9701-2c0eb7fe379f branch from 6da7068 to a9a2593 Compare February 26, 2025 18:12
@palash-gandhi palash-gandhi marked this pull request as ready for review February 26, 2025 18:15
@palash-gandhi palash-gandhi merged commit 6e2a3db into os-upgrade Feb 26, 2025
6 of 7 checks passed
@palash-gandhi palash-gandhi deleted the dlpx/pr/palash-gandhi/0ba31ee3-501f-4995-9701-2c0eb7fe379f branch February 26, 2025 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants