Bug 1296390

Summary: TypeError: top() got an unexpected keyword argument 'ps_args'
Product: Red Hat Enterprise Linux 7 Reporter: Alex Jia <ajia>
Component: atomicAssignee: Brent Baude <bbaude>
Status: CLOSED DUPLICATE QA Contact: atomic-bugs <atomic-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.4CC: dwalsh, walters
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-01 07:15:36 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 Alex Jia 2016-01-07 04:23:20 UTC
Description of problem:
The atomic top doesn't work and got error "TypeError: top() got an unexpected keyword argument 'ps_args'".

Version-Release number of selected component (if applicable):
# rpm -q atomic python-docker-py docker
atomic-1.8-2.gita35ae18.el7.x86_64
python-docker-py-1.4.0-118.el7.noarch
docker-1.9.1-9.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. you need to bypass bug 1292776 firstly
2. atomic top


Actual results:
# atomic top
Traceback (most recent call last):
  File "/usr/bin/atomic", line 512, in <module>
    sys.exit(_func())
  File "/usr/lib/python2.7/site-packages/Atomic/top.py", line 114, in atomic_top
    proc_info += self.get_pids_by_container(cid)
  File "/usr/lib/python2.7/site-packages/Atomic/top.py", line 159, in get_pids_by_container
    con_procs = self.AD.top(con_id, ps_args="-eo {}".format(",".join(ps_args)))
  File "/usr/lib/python2.7/site-packages/docker/utils/decorators.py", line 20, in wrapped
    return f(self, resource_id, *args, **kwargs)
TypeError: top() got an unexpected keyword argument 'ps_args'

Expected results:
Fix it.

Additional info:
Perhaps, we also need a new python-docker-py rpm package.

Comment 2 Alex Jia 2016-01-15 09:00:55 UTC
I gave a try for python-docker-py-1.6.0-1.el7.noarch, and can't hit 'TypeError' again when ran atomic top command, but the atomic top doesn't work, I will file a new bug to track this.

Comment 3 Alex Jia 2016-01-15 10:49:14 UTC
(In reply to Alex Jia from comment #2)
> I gave a try for python-docker-py-1.6.0-1.el7.noarch, and can't hit
> 'TypeError' again when ran atomic top command, but the atomic top doesn't
> work, I will file a new bug to track this.

Well, I did a futher testing for atomic top, it works well now.

                                                            ATOMIC TOP

CONTA(I)NER* (N)AME       (P)ID      (C)PU  (M)EM  (U)ID  (G)ID  CMD
9e383e64ec3a elegant_pike 12796      0.0    0.0    0      0      /bin/sh
9e383e64ec3a elegant_pike 14770      96.1   1.7    0      0      dd if=/dev/urandom bs=32867436 count=1050 of=/root/testfile

Comment 4 Daniel Walsh 2016-02-01 04:42:48 UTC
So is this a bug?

Comment 5 Alex Jia 2016-02-01 07:15:36 UTC
(In reply to Daniel Walsh from comment #4)
> So is this a bug?

Yes, but for now, I can find a root reason for this bug, it should be a duplicate of bug 1292776.

*** This bug has been marked as a duplicate of bug 1292776 ***