Bug 2102058

Summary: module 'inspect' has no attribute 'getargspec'
Product: [Fedora] Fedora Reporter: Martin Hoyer <mhoyer>
Component: targetcliAssignee: Maurizio Lombardi <mlombard>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 37CC: andy, gbcox, matt, mlombard, mmarusak, mpitt
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard: CockpitTest
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-10-24 10:51:37 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:

Description Martin Hoyer 2022-06-29 08:45:47 UTC
Description of problem:
targetcli is not working on the current rawhide 

Version-Release number of selected component (if applicable):
kernel-5.19.0-0.rc2.21.fc37.x86_64
python3.11-3.11.0~b3-6.fc37

targetcli                         noarch       2.1.54-5.fc37
libb2                             x86_64       0.98.1-6.fc37
python3-configshell               noarch       1:1.1.29-5.fc37
python3-kmod                      x86_64       0.9-34.fc37
python3-pyparsing                 noarch       2.4.7-12.fc37
python3-pyudev                    noarch       0.23.2-2.fc37
python3-rtslib                    noarch       2.1.75-2.fc37
python3-urwid                     x86_64       2.1.2-6.fc37
target-restore                    noarch       2.1.75-2.fc37

How reproducible:
100%

Steps to Reproduce:
1. install targetcli
2. run saveconfig command

Actual results:

/> saveconfig
Traceback (most recent call last):
  File "/usr/bin/targetcli", line 329, in <module>
    main()
    ^^^^^^
  File "/usr/bin/targetcli", line 317, in main
    shell.run_interactive()
    ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/configshell_fb/shell.py", line 900, in run_interactive
    self._cli_loop()
    ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/configshell_fb/shell.py", line 729, in _cli_loop
    self.run_cmdline(cmdline)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/configshell_fb/shell.py", line 843, in run_cmdline
    self._execute_command(path, command, pparams, kparams)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/configshell_fb/shell.py", line 818, in _execute_command
    result = target.execute_command(command, pparams, kparams)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/configshell_fb/node.py", line 1405, in execute_command
    self.assert_params(method, pparams, kparams)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/configshell_fb/node.py", line 1420, in assert_params
    spec = inspect.getargspec(method)
           ^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?


Expected results:
targetcli commands working

Additional info:
Tracebacks only available when running commands in targetcli shell

Comment 1 Maurizio Lombardi 2022-07-04 07:42:10 UTC
Patch submitted to upstream: https://github.com/open-iscsi/configshell-fb/pull/64

Comment 2 Ben Cotton 2022-08-09 13:39:53 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 37 development cycle.
Changing version to 37.

Comment 3 Maurizio Lombardi 2022-08-09 14:18:50 UTC
Should be fixed in F37/rawhide.
Martin, please verify this when you can then we can close the BZ

Comment 4 Martin Hoyer 2022-08-10 08:56:23 UTC
(In reply to Maurizio Lombardi from comment #3)
> Should be fixed in F37/rawhide.
> Martin, please verify this when you can then we can close the BZ

Can confirm targetcli works as expected on latest Rawhide.

Comment 5 Gerald Cox 2022-10-22 15:26:53 UTC
I just upgraded to F37 and am getting the following error when trying to start tautulli:

tautulli.service - Tautulli - Stats for Plex Media Server usage
     Loaded: loaded (/usr/lib/systemd/system/tautulli.service; enabled; preset: disabled)
     Active: failed (Result: exit-code) since Sat 2022-10-22 08:17:47 PDT; 2min 34s ago
   Duration: 1.451s
    Process: 18238 ExecStart=/usr/share/tautulli/Tautulli.py --quiet --nolaunch --config /etc/tautulli/config.ini --datadir /var/lib/tautulli (code=exited, status=1/FAILURE)
   Main PID: 18238 (code=exited, status=1/FAILURE)
        CPU: 1.421s

Oct 22 08:17:47 charon Tautulli.py[18238]:     import cherrypy
Oct 22 08:17:47 charon Tautulli.py[18238]:   File "/usr/share/tautulli/lib/cherrypy/__init__.py", line 71, in <module>
Oct 22 08:17:47 charon Tautulli.py[18238]:     from . import _cpdispatch as dispatch
Oct 22 08:17:47 charon Tautulli.py[18238]:   File "/usr/share/tautulli/lib/cherrypy/_cpdispatch.py", line 209, in <module>
Oct 22 08:17:47 charon Tautulli.py[18238]:     getargspec = inspect.getargspec
Oct 22 08:17:47 charon Tautulli.py[18238]:                  ^^^^^^^^^^^^^^^^^^
Oct 22 08:17:47 charon Tautulli.py[18238]: AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?
Oct 22 08:17:47 charon systemd[1]: tautulli.service: Main process exited, code=exited, status=1/FAILURE
Oct 22 08:17:47 charon systemd[1]: tautulli.service: Failed with result 'exit-code'.
Oct 22 08:17:47 charon systemd[1]: tautulli.service: Consumed 1.421s CPU time.


Is this the same issue or another?  Thanks!

Comment 6 Maurizio Lombardi 2022-10-24 10:51:37 UTC
(In reply to Gerald Cox from comment #5)
> I just upgraded to F37 and am getting the following error when trying to
> start tautulli:
> 
> tautulli.service - Tautulli - Stats for Plex Media Server usage
>      Loaded: loaded (/usr/lib/systemd/system/tautulli.service; enabled;
> preset: disabled)
>      Active: failed (Result: exit-code) since Sat 2022-10-22 08:17:47 PDT;
> 2min 34s ago
>    Duration: 1.451s
>     Process: 18238 ExecStart=/usr/share/tautulli/Tautulli.py --quiet
> --nolaunch --config /etc/tautulli/config.ini --datadir /var/lib/tautulli
> (code=exited, status=1/FAILURE)
>    Main PID: 18238 (code=exited, status=1/FAILURE)
>         CPU: 1.421s
> 
> Oct 22 08:17:47 charon Tautulli.py[18238]:     import cherrypy
> Oct 22 08:17:47 charon Tautulli.py[18238]:   File
> "/usr/share/tautulli/lib/cherrypy/__init__.py", line 71, in <module>
> Oct 22 08:17:47 charon Tautulli.py[18238]:     from . import _cpdispatch as
> dispatch
> Oct 22 08:17:47 charon Tautulli.py[18238]:   File
> "/usr/share/tautulli/lib/cherrypy/_cpdispatch.py", line 209, in <module>
> Oct 22 08:17:47 charon Tautulli.py[18238]:     getargspec =


Hello Gerald, this BZ is about targetcli but you have problems with an application
called "Tautulli".
The bug is identical but should be fixed by Tautulli's maintainer.


According to this post: https://www.reddit.com/r/Tautulli/comments/yar8r8/tautulli_wont_start_with_fedora_37_python_311/
I guess it will be solved when this update will end up in F37: https://bodhi.fedoraproject.org/updates/FEDORA-2022-dd7fb482f7