This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1283657 - kimchi crashes on AttributeError: 'module' object has no attribute 'NUM_CPUS'
kimchi crashes on AttributeError: 'module' object has no attribute 'NUM_CPUS'
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: kimchi (Show other bugs)
23
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Brent Baude
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-19 09:18 EST by Sandro Bonazzola
Modified: 2016-12-20 11:05 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-12-20 11:05:40 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sandro Bonazzola 2015-11-19 09:18:21 EST
Description of problem:
kimchi crashes

Version-Release number of selected component (if applicable):
kimchi-1.4.1-4.fc23.noarch

How reproducible:
100%

Steps to Reproduce:
1. dnf install kimchi
2. service kimchid start
3. service kimchid status

Actual results:
nov 19 15:13:41 sbonazzo.csb kimchid[16275]: Traceback (most recent call last):
nov 19 15:13:41 sbonazzo.csb kimchid[16275]: File "/usr/bin/kimchid", line 96, in <module>
nov 19 15:13:41 sbonazzo.csb kimchid[16275]: sys.exit(main(sys.argv[1:]))
nov 19 15:13:41 sbonazzo.csb kimchid[16275]: File "/usr/bin/kimchid", line 93, in main
nov 19 15:13:41 sbonazzo.csb kimchid[16275]: kimchi.server.main(options)
nov 19 15:13:41 sbonazzo.csb kimchid[16275]: File "/usr/lib/python2.7/site-packages/kimchi/server.py", line 187, in main
nov 19 15:13:41 sbonazzo.csb kimchid[16275]: srv = Server(options)
nov 19 15:13:41 sbonazzo.csb kimchid[16275]: File "/usr/lib/python2.7/site-packages/kimchi/server.py", line 132, in __init__
nov 19 15:13:41 sbonazzo.csb kimchid[16275]: model_instance = model.Model()
nov 19 15:13:41 sbonazzo.csb kimchid[16275]: File "/usr/lib/python2.7/site-packages/kimchi/model/model.py", line 64, in __init__
nov 19 15:13:41 sbonazzo.csb kimchid[16275]: models.append(instance(**kargs))
nov 19 15:13:41 sbonazzo.csb kimchid[16275]: File "/usr/lib/python2.7/site-packages/kimchi/model/host.py", line 52, in __init__
nov 19 15:13:41 sbonazzo.csb kimchid[16275]: self.host_info = self._get_host_info()
nov 19 15:13:41 sbonazzo.csb kimchid[16275]: File "/usr/lib/python2.7/site-packages/kimchi/model/host.py", line 90, in _get_host_info
nov 19 15:13:41 sbonazzo.csb kimchid[16275]: res['cpus'] = psutil.NUM_CPUS
nov 19 15:13:41 sbonazzo.csb kimchid[16275]: AttributeError: 'module' object has no attribute 'NUM_CPUS'


Expected results:
kimchi starts

Additional info:
Comment 1 Brent Baude 2015-11-19 17:05:07 EST
Please see if https://koji.fedoraproject.org/koji/taskinfo?taskID=11909146 solves the issue and provide feedback.
Comment 2 Sandro Bonazzola 2015-11-20 09:27:37 EST
kimchi-1.5.1-2.fc23.noarch from above link crashes on :
nov 20 15:22:32 sbonazzo.csb kimchid[4988]: Traceback (most recent call last):
nov 20 15:22:32 sbonazzo.csb kimchid[4988]: File "/usr/lib64/python2.7/threading.py", line 813, in __bootstrap_inner
nov 20 15:22:32 sbonazzo.csb kimchid[4988]: self.run()
nov 20 15:22:32 sbonazzo.csb kimchid[4988]: File "/usr/lib/python2.7/site-packages/cherrypy/process/plugins.py", line 500, in run
nov 20 15:22:32 sbonazzo.csb kimchid[4988]: self.function(*self.args, **self.kwargs)
nov 20 15:22:32 sbonazzo.csb kimchid[4988]: File "/usr/lib/python2.7/site-packages/kimchi/model/host.py", line 194, in _update_host_stats
nov 20 15:22:32 sbonazzo.csb kimchid[4988]: self._get_host_network_io_rate(seconds)
nov 20 15:22:32 sbonazzo.csb kimchid[4988]: File "/usr/lib/python2.7/site-packages/kimchi/model/host.py", line 252, in _get_host_network_io_rate
nov 20 15:22:32 sbonazzo.csb kimchid[4988]: net_ios = psutil.network_io_counters(True)
nov 20 15:22:32 sbonazzo.csb kimchid[4988]: AttributeError: 'module' object has no attribute 'network_io_counters'

I'd suggest to redirect to /dev/null the call to "openssl dhparam -out %{_sysconfdir}/kimchi/dhparams.pem 2048" in the spec file too while bumping release, avoiding a really ugly output.
Comment 3 Brent Baude 2015-11-30 18:32:45 EST
Thanks for your feedback on the python errors.  Could you try http://koji.fedoraproject.org/koji/taskinfo?taskID=12018868 and provide feedback?  I've handled two additional deprecated psutil functions.
Comment 4 Brian 2016-08-31 12:41:44 EDT
The only thing that would fix this for me in F24 was to downgrade python-psutil to 1.2.1

http://koji.fedoraproject.org/koji/buildinfo?buildID=619615
Comment 5 Brian 2016-08-31 21:59:12 EDT
And I had to add this to /etc/dnf/dnf.conf

exclude=python-psutil python2-psutil
Comment 6 Fedora End Of Life 2016-11-24 08:34:55 EST
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 7 Fedora End Of Life 2016-12-20 11:05:40 EST
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.