Bug 970787 - [RFE] Add unit removal support to the ISO client
[RFE] Add unit removal support to the ISO client
Status: CLOSED CURRENTRELEASE
Product: Pulp
Classification: Community
Component: iso-support (Show other bugs)
2.2
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 2.4.0
Assigned To: Randy Barlow
Preethi Thomas
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-04 17:39 EDT by Randy Barlow
Modified: 2014-08-09 02:55 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1087585 (view as bug list)
Environment:
Last Closed: 2014-08-09 02:55:34 EDT
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 Randy Barlow 2013-06-04 17:39:41 EDT
SSIA.
Comment 1 Randy Barlow 2013-06-04 18:11:19 EDT
https://github.com/pulp/pulp_rpm/pull/222
Comment 2 Randy Barlow 2014-03-18 12:04:40 EDT
This was fixed in a prior release of Pulp, but we never put it through the QE process. Moving to ON_QA.
Comment 3 Preethi Thomas 2014-04-14 11:00:08 EDT
Fails-qa
[root@hp-dl380pgen8-02-vm-1 ~]# rpm -qa pulp-server
pulp-server-2.4.0-0.8.beta.el6.noarch
[root@hp-dl380pgen8-02-vm-1 ~]# 

Looks like iso repo remove fails with traceback.

The first time I run I see different error than the second time


[root@hp-dl380pgen8-02-vm-1 ~]# pulp-admin iso repo uploads upload --repo-id iso-upload -f test3.iso -v
+----------------------------------------------------------------------+
                              Unit Upload
+----------------------------------------------------------------------+

Extracting necessary metadata for each request...
[==================================================] 100%
Analyzing: test3.iso
... completed

Files to be uploaded:
  test3.iso

Creating upload requests on the server...
[==================================================] 100%
Initializing: test3.iso
... completed

Starting upload of selected units. If this process is stopped through ctrl+c,
the uploads will be paused and may be resumed later using the resume command or
cancelled entirely using the cancel command.

Uploading: test3.iso
[==================================================] 100%
3244032/3244032 bytes
... completed

Importing into the repository...
Import postponed due to queued operations against the repository. The progress
of this import can be viewed in the repository tasks list.

[root@hp-dl380pgen8-02-vm-1 ~]# 
[root@hp-dl380pgen8-02-vm-1 ~]# 
[root@hp-dl380pgen8-02-vm-1 ~]# pulp-admin iso repo isos --repo-id iso-upload
Name:     test3.iso
Size:     3244032
Checksum: f56e08898287e60b3169392351e9296bbe28417db1f8e34e8058d124be89b93a


[root@hp-dl380pgen8-02-vm-1 ~]# pulp-admin iso repo remove --repo-id iso-upload --str-eq='Name=test3.iso'
This command may be exited via ctrl+c without affecting the request.


[\]
Running...

An unexpected error has occurred. More information can be found in the client
log file ~/.pulp/admin.log.




From admin.log

First time running repo remove

2014-04-14 10:45:30,866 - ERROR - Client-side exception occurred
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/client/extensions/core.py", line 478, in run
    exit_code = Cli.run(self, args)
  File "/usr/lib/python2.6/site-packages/okaara/cli.py", line 974, in run
    exit_code = command_or_section.execute(self.prompt, remaining_args)
  File "/usr/lib/python2.6/site-packages/pulp/client/extensions/extensions.py", line 224, in execute
    return self.method(*arg_list, **clean_kwargs)
  File "/usr/lib/python2.6/site-packages/pulp/client/commands/unit.py", line 103, in run
    self.poll([task], kwargs)
  File "/usr/lib/python2.6/site-packages/pulp/client/commands/polling.py", line 148, in poll
    self.succeeded(task)
  File "/usr/lib/python2.6/site-packages/pulp/client/commands/unit.py", line 133, in succeeded
    self.display_task_results(task, RETURN_REMOVE_SUCCESS_STRING, RETURN_REMOVE_ERROR_STRING)
  File "/usr/lib/python2.6/site-packages/pulp/client/commands/unit.py", line 145, in display_task_results
    units_successful = result.get('units_successful', [])
AttributeError: 'list' object has no attribute 'get'

Running it a second time.

2014-04-14 10:47:31,833 - ERROR - Exception occurred:
        href:      /pulp/api/v2/repositories/iso-upload/actions/unassociate/
        method:    POST
        status:    500
        error:     Unhandled Exception
        traceback: [u'  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/middleware/exception.py", line 44, in __call__\n    return self.app(environ, start_response)\n', u'  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/middleware/postponed.py", line 42, in __call__\n    return self.app(environ, start_response)\n', u'  File "/usr/lib/python2.6/site-packages/web/application.py", line 279, in wsgi\n    result = self.handle_with_processors()\n', u'  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 26, in _handle_with_processors\n    return process(self.processors)\n', u'  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 23, in process\n    return p(lambda : process(processors))\n', u'  File "/usr/lib/python2.6/site-packages/web/application.py", line 566, in processor\n    return handler()\n', u'  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 23, in <lambda>\n    return p(lambda : process(processors))\n', u'  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 23, in process\n    return p(lambda : process(processors))\n', u'  File "/usr/lib/python2.6/site-packages/web/application.py", line 581, in processor\n    result = handler()\n', u'  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 23, in <lambda>\n    return p(lambda : process(processors))\n', u'  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 25, in process\n    return self.handle()\n', u'  File "/usr/lib/python2.6/site-packages/web/application.py", line 230, in handle\n    return self._delegate(fn, self.fvars, args)\n', u'  File "/usr/lib/python2.6/site-packages/web/application.py", line 422, in _delegate\n    return f()\n', u'  File "/usr/lib/python2.6/site-packages/web/application.py", line 430, in <lambda>\n    f = lambda: self._delegate_sub_application(pat, what)\n', u'  File "/usr/lib/python2.6/site-packages/web/application.py", line 455, in _delegate_sub_application\n    return app.handle_with_processors()\n', u'  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 26, in _handle_with_processors\n    return process(self.processors)\n', u'  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 23, in process\n    return p(lambda : process(processors))\n', u'  File "/usr/lib/python2.6/site-packages/web/application.py", line 566, in processor\n    return handler()\n', u'  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 23, in <lambda>\n    return p(lambda : process(processors))\n', u'  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 23, in process\n    return p(lambda : process(processors))\n', u'  File "/usr/lib/python2.6/site-packages/web/application.py", line 581, in processor\n    result = handler()\n', u'  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 23, in <lambda>\n    return p(lambda : process(processors))\n', u'  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 25, in process\n    return self.handle()\n', u'  File "/usr/lib/python2.6/site-packages/web/application.py", line 230, in handle\n    return self._delegate(fn, self.fvars, args)\n', u'  File "/usr/lib/python2.6/site-packages/web/application.py", line 420, in _delegate\n    return handle_class(cls)\n', u'  File "/usr/lib/python2.6/site-packages/web/application.py", line 396, in handle_class\n    return tocall(*args)\n', u'  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/decorators.py", line 227, in _auth_decorator\n    value = method(self, *args, **kwargs)\n', u'  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/repositories.py", line 812, in POST\n    tags=tags)\n', u'  File "/usr/lib/python2.6/site-packages/pulp/server/async/tasks.py", line 318, in apply_async_with_reservation\n    queue = _reserve_resource.apply_async((resource_id,), queue=RESOURCE_MANAGER_QUEUE).get()\n', u'  File "/usr/lib/python2.6/site-packages/celery/app/task.py", line 555, in apply_async\n    **dict(self._get_exec_options(), **options)\n', u'  File "/usr/lib/python2.6/site-packages/celery/app/base.py", line 324, in send_task\n    reply_to=reply_to or self.oid, **options\n', u'  File "/usr/lib/python2.6/site-packages/celery/app/amqp.py", line 300, in publish_task\n    **kwargs\n', u'  File "/usr/lib/python2.6/site-packages/kombu/messaging.py", line 168, in publish\n    routing_key, mandatory, immediate, exchange, declare)\n', u'  File "/usr/lib/python2.6/site-packages/kombu/connection.py", line 440, in _ensured\n    return fun(*args, **kwargs)\n', u'  File "/usr/lib/python2.6/site-packages/kombu/messaging.py", line 184, in _publish\n    mandatory=mandatory, immediate=immediate,\n', u'  File "/usr/lib/python2.6/site-packages/kombu/transport/qpid.py", line 1184, in basic_publish\n    self._put(routing_key, message, exchange, **kwargs)\n', u'  File "/usr/lib/python2.6/site-packages/kombu/transport/qpid.py", line 582, in _put\n    sender = self._qpid_session.sender(address)\n', u'  File "<string>", line 6, in sender\n', u'  File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 597, in sender\n    sender._ewait(lambda: sender.linked)\n', u'  File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 804, in _ewait\n    result = self.session._ewait(lambda: self.error or predicate(), timeout)\n', u'  File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 571, in _ewait\n    result = self.connection._ewait(lambda: self.error or predicate(), timeout)\n', u'  File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 214, in _ewait\n    self.check_error()\n', u'  File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 207, in check_error\n    raise self.error\n']
        data:      {}
Comment 4 Preethi Thomas 2014-04-14 12:44:07 EDT
[root@hp-dl380pgen8-02-vm-1 ~]# rpm -qa pulp-server
pulp-server-2.4.0-0.8.beta.el6.noarch
[root@hp-dl380pgen8-02-vm-1 ~]# 

I think it was the issue with my pulp-server

working now

[root@hp-dl380pgen8-02-vm-1 ~]# pulp-admin iso repo remove --repo-id iso-upload --str-eq='name=test3.iso'
This command may be exited via ctrl+c without affecting the request.


[\]
Running...

Units Removed:
  test3.iso

[root@hp-dl380pgen8-02-vm-1 ~]# pulp-admin iso repo isos --repo-id iso-upload[root@hp-dl380pgen8-02-vm-1 ~]# 
[root@hp-dl380pgen8-02-vm-1 ~]# 
[root@hp-dl380pgen8-02-vm-1 ~]# pulp-admin iso repo remove --repo-id iso --str-eq='name=test3.iso'
This command may be exited via ctrl+c without affecting the request.


[\]
Running...

Units Removed:
  test3.iso

[root@hp-dl380pgen8-02-vm-1 ~]# pulp-admin iso repo remove --repo-id iso --str-eq='name=test.iso'
This command may be exited via ctrl+c without affecting the request.


[\]
Running...

Units Removed:
  test.iso

[root@hp-dl380pgen8-02-vm-1 ~]#
Comment 5 Randy Barlow 2014-08-09 02:55:34 EDT
This has been fixed in Pulp 2.4.0-1.

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