Bug 807769 - Need to verify that agent (gofer plugin) is behaving properly when getsecret() gets FILE-NOT-FOUND
Need to verify that agent (gofer plugin) is behaving properly when getsecret(...
Product: Pulp
Classification: Community
Component: z_other (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jeff Ortel
Preethi Thomas
Depends On:
  Show dependency treegraph
Reported: 2012-03-28 12:36 EDT by Jeff Ortel
Modified: 2012-03-28 12:48 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-03-28 12:48:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jeff Ortel 2012-03-28 12:36:56 EDT
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):


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}:
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
  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.