Bug 1931980

Summary: [gss][ceph-iscsigw] While enabling additional logging for ceph-iscsigw, getting the error "-bash: echo: write error: Invalid argument"
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Geo Jose <gjose>
Component: DocumentationAssignee: Amrita <asakthiv>
Status: CLOSED CURRENTRELEASE QA Contact: Gopi <gpatta>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.1CC: agunn, asakthiv, asriram, ceph-eng-bugs, ceph-qe-bugs, gpatta, hmunjulu, kdreyer, lithomas, mmurthy, sostapov, sy00454302, vereddy
Target Milestone: ---Flags: gpatta: needinfo+
Target Release: 4.2z2   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-16 11:20:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1966533    

Description Geo Jose 2021-02-23 17:19:29 UTC
Description of problem:
 While enabling additional logging for ceph-iscsigw, getting the error "-bash: echo: write error: Invalid argument"

Version-Release number of selected component (if applicable):
 RHCS4

Steps to Reproduce:
1. Install RHCS 4 on RHEL 7/8.
2. Enable additional logging as per [a].

Reference
[a]. https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/4/html-single/troubleshooting_guide/index#checking-iscsi-login-failures-because-data-was-not-sent_diag

Actual results:
 Getting the error "-bash: echo: write error: Invalid argument"

Expected results:
 While following the documentation, it should enable additional debug.

Comment 1 Geo Jose 2021-02-23 17:24:45 UTC
Test result
===========

## Environment 
* RHCS 4
* Red Hat Enterprise Linux Server release 7.9 (Maipo) / Red Hat Enterprise Linux release 8.2 (Ootpa)
* kernel-3.10.0-1127.el7.x86_64 / kernel-4.18.0-193.el8.x86_64



## Issue/Error
[root@ansible ~]# echo "iscsi_target_mod +p" > /sys/kernel/debug/dynamic_debug/control
-bash: echo: write error: Invalid argument
[root@ansible ~]# echo "target_core_mod +p" > /sys/kernel/debug/dynamic_debug/control
-bash: echo: write error: Invalid argument
[root@ansible ~]# echo "iscsi_target_mod -p" > /sys/kernel/debug/dynamic_debug/control
-bash: echo: write error: Invalid argument
[root@ansible ~]# echo "target_core_mod -p" > /sys/kernel/debug/dynamic_debug/control
-bash: echo: write error: Invalid argument
[root@ansible ~]#


## Documentation Reference 
https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/4/html-single/troubleshooting_guide/index#checking-iscsi-login-failures-because-data-was-not-sent_diag
Section: "7.3. Checking iSCSI login failures because data was not sent"


## Workaround 
[root@ansible ~]# echo "module iscsi_target_mod +p" > /sys/kernel/debug/dynamic_debug/control
[root@ansible ~]# echo "module target_core_mod +p" > /sys/kernel/debug/dynamic_debug/control
[root@ansible ~]# echo "module target_core_mod -p" > /sys/kernel/debug/dynamic_debug/control
[root@ansible ~]# echo "module iscsi_target_mod -p" > /sys/kernel/debug/dynamic_debug/control
[root@ansible ~]#
The above command is working fine for me.

Comment 6 Gopi 2021-06-07 03:57:30 UTC
Hi Anjana,

I have tested as per comment#1 and the workaround part is working fine.

As per doc:
-----------
[root@ceph-gopi-1622725159152-node2-osd-mon-mgr ]# echo "iscsi_target_mod +p" > /sys/kernel/debug/dynamic_debug/control
bash: echo: write error: Invalid argument
[root@ceph-gopi-1622725159152-node2-osd-mon-mgr ]# echo "target_core_mod +p" > /sys/kernel/debug/dynamic_debug/control
bash: echo: write error: Invalid argument
[root@ceph-gopi-1622725159152-node2-osd-mon-mgr ]# echo "iscsi_target_mod -p" > /sys/kernel/debug/dynamic_debug/control
bash: echo: write error: Invalid argument
[root@ceph-gopi-1622725159152-node2-osd-mon-mgr ]# echo "target_core_mod -p" > /sys/kernel/debug/dynamic_debug/control
bash: echo: write error: Invalid argument


As per workaround:
------------------
[root@ceph-gopi-1622725159152-node2-osd-mon-mgr ]# echo "module iscsi_target_mod +p" > /sys/kernel/debug/dynamic_debug/control 
[root@ceph-gopi-1622725159152-node2-osd-mon-mgr ]# echo "module target_core_mod +p" > /sys/kernel/debug/dynamic_debug/control
[root@ceph-gopi-1622725159152-node2-osd-mon-mgr ]# echo "module target_core_mod -p" > /sys/kernel/debug/dynamic_debug/control
[root@ceph-gopi-1622725159152-node2-osd-mon-mgr ]# echo "module iscsi_target_mod -p" > /sys/kernel/debug/dynamic_debug/control


So, document needs to be changed as per workaround.

Comment 7 Gopi 2021-06-07 03:59:58 UTC
@asriram

Comment 9 Gopi 2021-06-07 10:55:32 UTC
Changes are there in document. Moving this bug to verified state.