Bug 807769 - Need to verify that agent (gofer plugin) is behaving properly when getsecret() gets FILE-NOT-FOUND
Summary: Need to verify that agent (gofer plugin) is behaving properly when getsecret(...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Jeff Ortel
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-28 16:36 UTC by Jeff Ortel
Modified: 2012-03-28 16:48 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-03-28 16:48:02 UTC
Embargoed:


Attachments (Terms of Use)

Description Jeff Ortel 2012-03-28 16:36:56 UTC
Description of problem:

Need to be sure that missing consumer cert is handled properly by getsecret() in pulp agent (gofer plugin)

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

1.0

How reproducible:

Not very.  Relies on race condition where an RMI is queued and journal(ed) locally by gofer but the cert is gone.

Steps to Reproduce:
1. Register consumer
2. hack pulpplugin and make duration between polling for cert changes long.
3. unregister the consumer in pulp.
  
Actual results:

Exceptions defined below in the log.

Expected results:

Should raise exception to unregisterted() RMI and be done.  Might be working properly but need to walk though it to be sure.  Log suggests otherwise.

Additional info:

2012-03-28 12:10:11,796 [INFO][pulpplugin-monitor] getbroker() @ plugin.py:192 - broker (qpid) configured: {pulp-nightly.usersys.redhat.com:5672}:
transport=TCP
host=pulp-nightly.usersys.redhat.com
port=5672
cacert=
clientcert=
2012-03-28 12:10:11,797 [INFO][pulpplugin-monitor] update() @ main.py:123 - uuid="test_consumer_remote", attached
2012-03-28 12:11:33,051 [INFO][worker-0] dispatch() @ dispatcher.py:613 - dispatching:{
  "args": [],
  "auth": {
    "secret": "531a072ae6d7d4bd07ac081213460b5eb7f13b7d30af68e650a75a75aadc2a99",
    "pam": null,
    "uuid": "test_consumer_remote"
  },
  "classname": "Consumer",
  "kws": {},
  "cntr": null,
  "method": "unregistered"
}
2012-03-28 12:11:33,072 [ERROR][worker-0] __call__() @ dispatcher.py:449 - [Errno 2] No such file or directory: '/etc/pki/pulp/consumer/cert.pem'
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/gofer/rmi/dispatcher.py", line 445, in __call__
    inst, method = self.resolve()
  File "/usr/lib/python2.7/site-packages/gofer/rmi/dispatcher.py", line 314, in resolve
    method = self.getmethod(inst)
  File "/usr/lib/python2.7/site-packages/gofer/rmi/dispatcher.py", line 346, in getmethod
    return self.permitted(method)
  File "/usr/lib/python2.7/site-packages/gofer/rmi/dispatcher.py", line 365, in permitted
    security.apply(auth)
  File "/usr/lib/python2.7/site-packages/gofer/rmi/dispatcher.py", line 498, in apply
    return fn(required, passed)
  File "/usr/lib/python2.7/site-packages/gofer/rmi/dispatcher.py", line 538, in secret
    secret = secret()
  File "/usr/lib/python2.7/site-packages/pulp/client/consumer/goferbase.py", line 35, in getsecret
    content = bundle.read()
  File "/usr/lib/python2.7/site-packages/pulp/common/bundle.py", line 185, in read
    f = open(path)
IOError: [Errno 2] No such file or directory: '/etc/pki/pulp/consumer/cert.pem'


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