Bug 838612 - unable to delete custom repos, due to schedule conflict
Summary: unable to delete custom repos, due to schedule conflict
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: RHUA
Version: 2.1
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: wes hayutin
QA Contact: mkovacik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-09 15:26 UTC by wes hayutin
Modified: 2012-07-10 16:57 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-10 16:57:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description wes hayutin 2012-07-09 15:26:02 UTC
Description of problem:

------------------------------------------------------------------------------
             -= Red Hat Update Infrastructure Management Tool =-


-= Repository Management =-

   l   list repositories currently managed by the RHUI
   i   display detailed information on a repository
   a   add a new Red Hat content repository
   c   create a new custom repository
   d   delete a repository from the RHUI
   u   upload content to a custom repository
   p   list packages in a repository

                                      Connected: ip-10-212-87-146.ec2.internal
------------------------------------------------------------------------------
rhui (repo) => d

Select one or more repositories:

  Custom Repositories
    -  1 : test_protected

  Red Hat Repositories
    -  2 : Red Hat Enterprise Linux 6 Server - Optional Beta from RHUI (RPMs) (6Server-i386)
    -  3 : Red Hat Enterprise Linux 6 Server - Optional Beta from RHUI (RPMs) (6Server-x86_64)
    -  4 : Red Hat Enterprise Linux 6 Server - Optional Beta from RHUI (Source RPMs) (6Server-i386)
    -  5 : Red Hat Enterprise Linux 6 Server - Optional Beta from RHUI (Source RPMs) (6Server-x86_64)
    -  6 : Red Hat Enterprise Linux 6 Server - Optional Beta from RHUI(Debug RPMs) (6Server-i386)
    -  7 : Red Hat Enterprise Linux 6 Server - Optional Beta from RHUI(Debug RPMs) (6Server-x86_64)
    -  8 : Red Hat Enterprise Linux 6 Server - Optional from RHUI (Debug RPMs) (6Server-i386)
    -  9 : Red Hat Enterprise Linux 6 Server - Optional from RHUI (Debug RPMs) (6Server-x86_64)
    -  10: Red Hat Enterprise Linux 6 Server - Optional from RHUI (RPMs) (6Server-i386)
    -  11: Red Hat Enterprise Linux 6 Server - Optional from RHUI (RPMs) (6Server-x86_64)
    -  12: Red Hat Enterprise Linux 6 Server - Optional from RHUI (Source RPMs) (6Server-i386)
    -  13: Red Hat Enterprise Linux 6 Server - Optional from RHUI (Source RPMs) (6Server-x86_64)
    -  14: Red Hat Enterprise Linux 6 Server Beta from RHUI (Debug RPMs) (6Server-i386)
    -  15: Red Hat Enterprise Linux 6 Server Beta from RHUI (Debug RPMs) (6Server-x86_64)
    -  16: Red Hat Enterprise Linux 6 Server Beta from RHUI (RPMs) (6Server-i386)
    -  17: Red Hat Enterprise Linux 6 Server Beta from RHUI (RPMs) (6Server-x86_64)
    -  18: Red Hat Enterprise Linux 6 Server Beta from RHUI (Source RPMs) (6Server-i386)
    -  19: Red Hat Enterprise Linux 6 Server Beta from RHUI (Source RPMs) (6Server-x86_64)
    -  20: Red Hat Enterprise Linux 6 Server from RHUI (Debug RPMs) (6Server-i386)
    -  21: Red Hat Enterprise Linux 6 Server from RHUI (Debug RPMs) (6Server-x86_64)
    -  22: Red Hat Enterprise Linux 6 Server from RHUI (RPMs) (6Server-i386)
    -  23: Red Hat Enterprise Linux 6 Server from RHUI (RPMs) (6Server-x86_64)
    -  24: Red Hat Enterprise Linux 6 Server from RHUI (Source RPMs) (6Server-i386)
    -  25: Red Hat Enterprise Linux 6 Server from RHUI (Source RPMs) (6Server-x86_64)
    -  26: Red Hat Update Infrastructure 2.0 (RPMs) (6Server-i386)
    -  27: Red Hat Update Infrastructure 2.0 (RPMs) (6Server-x86_64)
    -  28: Red Hat Update Infrastructure 2.0 (Source RPMs) (6Server-i386)
    -  29: Red Hat Update Infrastructure 2.0 (Source RPMs) (6Server-x86_64)

Enter value (1-29) to toggle selection, 'c' to confirm selections, or '?' for more commands: 1

Select one or more repositories:

  Custom Repositories
    x  1 : test_protected

  Red Hat Repositories
    -  2 : Red Hat Enterprise Linux 6 Server - Optional Beta from RHUI (RPMs) (6Server-i386)
    -  3 : Red Hat Enterprise Linux 6 Server - Optional Beta from RHUI (RPMs) (6Server-x86_64)
    -  4 : Red Hat Enterprise Linux 6 Server - Optional Beta from RHUI (Source RPMs) (6Server-i386)
    -  5 : Red Hat Enterprise Linux 6 Server - Optional Beta from RHUI (Source RPMs) (6Server-x86_64)
    -  6 : Red Hat Enterprise Linux 6 Server - Optional Beta from RHUI(Debug RPMs) (6Server-i386)
    -  7 : Red Hat Enterprise Linux 6 Server - Optional Beta from RHUI(Debug RPMs) (6Server-x86_64)
    -  8 : Red Hat Enterprise Linux 6 Server - Optional from RHUI (Debug RPMs) (6Server-i386)
    -  9 : Red Hat Enterprise Linux 6 Server - Optional from RHUI (Debug RPMs) (6Server-x86_64)
    -  10: Red Hat Enterprise Linux 6 Server - Optional from RHUI (RPMs) (6Server-i386)
    -  11: Red Hat Enterprise Linux 6 Server - Optional from RHUI (RPMs) (6Server-x86_64)
    -  12: Red Hat Enterprise Linux 6 Server - Optional from RHUI (Source RPMs) (6Server-i386)
    -  13: Red Hat Enterprise Linux 6 Server - Optional from RHUI (Source RPMs) (6Server-x86_64)
    -  14: Red Hat Enterprise Linux 6 Server Beta from RHUI (Debug RPMs) (6Server-i386)
    -  15: Red Hat Enterprise Linux 6 Server Beta from RHUI (Debug RPMs) (6Server-x86_64)
    -  16: Red Hat Enterprise Linux 6 Server Beta from RHUI (RPMs) (6Server-i386)
    -  17: Red Hat Enterprise Linux 6 Server Beta from RHUI (RPMs) (6Server-x86_64)
    -  18: Red Hat Enterprise Linux 6 Server Beta from RHUI (Source RPMs) (6Server-i386)
    -  19: Red Hat Enterprise Linux 6 Server Beta from RHUI (Source RPMs) (6Server-x86_64)
    -  20: Red Hat Enterprise Linux 6 Server from RHUI (Debug RPMs) (6Server-i386)
    -  21: Red Hat Enterprise Linux 6 Server from RHUI (Debug RPMs) (6Server-x86_64)
    -  22: Red Hat Enterprise Linux 6 Server from RHUI (RPMs) (6Server-i386)
    -  23: Red Hat Enterprise Linux 6 Server from RHUI (RPMs) (6Server-x86_64)
    -  24: Red Hat Enterprise Linux 6 Server from RHUI (Source RPMs) (6Server-i386)
    -  25: Red Hat Enterprise Linux 6 Server from RHUI (Source RPMs) (6Server-x86_64)
    -  26: Red Hat Update Infrastructure 2.0 (RPMs) (6Server-i386)
    -  27: Red Hat Update Infrastructure 2.0 (RPMs) (6Server-x86_64)
    -  28: Red Hat Update Infrastructure 2.0 (Source RPMs) (6Server-i386)
    -  29: Red Hat Update Infrastructure 2.0 (Source RPMs) (6Server-x86_64)

Enter value (1-29) to toggle selection, 'c' to confirm selections, or '?' for more commands: c


The following repositories will be deleted:
  Custom Repositories
    test_protected

Proceed? (y/n) y


Deleting test_protected...

An unexpected error has occurred during the last operation.
More information can be found in /home/whayutin/.rhui/rhui.log.


------------------------------------------------------------------------------
             -= Red Hat Update Infrastructure Management Tool =-


-= Repository Management =-

   l   list repositories currently managed by the RHUI
   i   display detailed information on a repository
   a   add a new Red Hat content repository
   c   create a new custom repository
   d   delete a repository from the RHUI
   u   upload content to a custom repository
   p   list packages in a repository

   logout
       removes stored authentication credentials and exits

   <   move to the previous screen
   ^, home
       move to the home screen
   /, clear
       clears the screen
   ?, help
       display help
   q, quit, exit
       exit

                                      Connected: ip-10-212-87-146.ec2.internal
------------------------------------------------------------------------------
rhui (repo) => l

Custom Repositories
  test_protected

Red Hat Repositories
  Red Hat Update Infrastructure 2.0 (RPMs) (6Server-i386)
  Red Hat Update Infrastructure 2.0 (Source RPMs) (6Server-i386)
  Red Hat Enterprise Linux 6 Server - Optional Beta from RHUI (Source RPMs) (6Server-i386)
  Red Hat Enterprise Linux 6 Server - Optional Beta from RHUI (Source RPMs) (6Server-x86_64)
  Red Hat Enterprise Linux 6 Server - Optional Beta from RHUI(Debug RPMs) (6Server-i386)
  Red Hat Enterprise Linux 6 Server - Optional Beta from RHUI(Debug RPMs) (6Server-x86_64)
  Red Hat Enterprise Linux 6 Server Beta from RHUI (Debug RPMs) (6Server-i386)
  Red Hat Update Infrastructure 2.0 (RPMs) (6Server-x86_64)
  Red Hat Update Infrastructure 2.0 (Source RPMs) (6Server-x86_64)
  Red Hat Enterprise Linux 6 Server - Optional Beta from RHUI (RPMs) (6Server-i386)
  Red Hat Enterprise Linux 6 Server - Optional Beta from RHUI (RPMs) (6Server-x86_64)
  Red Hat Enterprise Linux 6 Server - Optional from RHUI (RPMs) (6Server-i386)
  Red Hat Enterprise Linux 6 Server - Optional from RHUI (RPMs) (6Server-x86_64)
  Red Hat Enterprise Linux 6 Server - Optional from RHUI (Debug RPMs) (6Server-i386)
  Red Hat Enterprise Linux 6 Server Beta from RHUI (Debug RPMs) (6Server-x86_64)
  Red Hat Enterprise Linux 6 Server - Optional from RHUI (Debug RPMs) (6Server-x86_64)
  Red Hat Enterprise Linux 6 Server - Optional from RHUI (Source RPMs) (6Server-i386)
  Red Hat Enterprise Linux 6 Server Beta from RHUI (RPMs) (6Server-x86_64)
  Red Hat Enterprise Linux 6 Server Beta from RHUI (RPMs) (6Server-i386)
  Red Hat Enterprise Linux 6 Server Beta from RHUI (Source RPMs) (6Server-x86_64)
  Red Hat Enterprise Linux 6 Server Beta from RHUI (Source RPMs) (6Server-i386)
  Red Hat Enterprise Linux 6 Server - Optional from RHUI (Source RPMs) (6Server-x86_64)
  Red Hat Enterprise Linux 6 Server from RHUI (Debug RPMs) (6Server-i386)
  Red Hat Enterprise Linux 6 Server from RHUI (Debug RPMs) (6Server-x86_64)
  Red Hat Enterprise Linux 6 Server from RHUI (Source RPMs) (6Server-i386)
  Red Hat Enterprise Linux 6 Server from RHUI (Source RPMs) (6Server-x86_64)
  Red Hat Enterprise Linux 6 Server from RHUI (RPMs) (6Server-i386)
  Red Hat Enterprise Linux 6 Server from RHUI (RPMs) (6Server-x86_64)


------------------------------------------------------------------------------



rh-rhui-tools-2.0.68-1.el6_3.noarch.rpm

Comment 1 wes hayutin 2012-07-09 15:27:13 UTC
Unexpected error caught at the shell level
Traceback (most recent call last):
  File "/home/whayutin/workspace/cloude/rhui-2.0/tools/src/rhui/tools/shell.py", line 86, in safe_listen
    self.listen(clear=first_run)
  File "/home/whayutin/workspace/cloude/rhui-2.0/tools/src/rhui/tools/shell.py", line 112, in listen
    Shell.listen(self)
  File "/home/whayutin/workspace/cloude/rhui-2.0/tools/src/rhui/common/shell.py", line 186, in listen
    item.func(*args, **item.kwargs)
  File "/home/whayutin/workspace/cloude/rhui-2.0/tools/src/rhui/tools/screens/repo.py", line 334, in delete
    self.pulp.delete_repo(repo['id'])
  File "/home/whayutin/workspace/cloude/rhui-2.0/tools/src/rhui/tools/pulp_api.py", line 407, in delete_repo
    self.repo_api.delete(repo_id)
  File "/usr/lib/python2.7/site-packages/pulp/client/api/repository.py", line 98, in delete
    return self.server.DELETE(path)[1]
  File "/usr/lib/python2.7/site-packages/pulp/client/api/server.py", line 314, in DELETE
    return self._request('DELETE', path, body=body)
  File "/usr/lib/python2.7/site-packages/pulp/client/api/server.py", line 288, in _request
    raise ServerRequestError(response.status, response_body, None)
ServerRequestError: (409, u'The repository, test_protected, cannot be deleted', None)

Comment 2 wes hayutin 2012-07-09 15:32:31 UTC
[root@ip-10-212-87-146 ~]# rpm -qa | grep pulp
m2crypto-0.21.1.pulp-7.el6.x86_64
pulp-selinux-server-0.0.263-21.el6_3.noarch
pulp-consumer-0.0.263-21.el6_3.noarch
python-isodate-0.4.4-4.pulp.el6.noarch
pulp-common-0.0.263-21.el6_3.noarch
python-oauth2-1.5.170-2.pulp.el6.noarch
mod_wsgi-3.3-2.pulp.el6.x86_64
pulp-admin-0.0.263-21.el6_3.noarch
pulp-client-lib-0.0.263-21.el6_3.noarch
pulp-0.0.263-21.el6_3.noarch

FYI.. the trace in comment#1 was taken from my develop machine, not the rhui server. but recreated on rhui-server

*** RHUI server ***

File "/usr/lib/python2.6/site-packages/rhui/tools/screens/repo.py", line 334, in delete
    self.pulp.delete_repo(repo['id'])
  File "/usr/lib/python2.6/site-packages/rhui/tools/pulp_api.py", line 407, in delete_repo
    self.repo_api.delete(repo_id)
  File "/usr/lib/python2.6/site-packages/pulp/client/api/repository.py", line 97, in delete
    return self.server.DELETE(path)[1]
  File "/usr/lib/python2.6/site-packages/pulp/client/api/server.py", line 314, in DELETE
    return self._request('DELETE', path, body=body)
  File "/usr/lib/python2.6/site-packages/pulp/client/api/server.py", line 288, in _request
    raise ServerRequestError(response.status, response_body, None)
ServerRequestError: (409, u'The repository, test_protected, cannot be deleted', None)
(END)

Comment 3 wes hayutin 2012-07-09 15:40:46 UTC
hrm.. I tried to delete the repo w/ pulp-admin and got the following error...

content/dist/rhel/rhui/server/6/6Server/i386/os> with verify_options <{'checksum': False, 'size': False}>
2012-07-09 11:36:58,513 32609:139817606174464: pulp.server.async:ERROR: async:60 Task [eb90af26-c9db-11e1-ab81-12313b045064] Task eb90af26-c9db-11e1-ab81-12313b045064: RepoApi.delete(test_protected, ) scheduled to run immediately conflicts with [b3ab35f8-c9d9-11e1-a1bd-12313b045064] Task b3ab35f8-c9d9-11e1-a1bd-12313b045064: RepoApi.delete(test_protected, ) scheduled to run immediately and cannot be enqueued

These task errors are not bubbled up to the rhui admin.


recreate:
1. create a custom repo in rhui-manager
2. do not add any packages etc.. only create the repo
3. try to delete the custom repo

results: error

expected results:
repo is deleted

Comment 4 wes hayutin 2012-07-09 16:51:51 UTC
This looks like it can be fixed by enabling the task api in v1

via..


[root@ip-10-212-87-146 ~]# cat /etc/pulp/admin/task.conf 
[task]
#enabled = False
enabled = True

Comment 5 wes hayutin 2012-07-10 13:47:15 UTC
potential fix..


[whayutin@whayutin-devel rel-eng]$ git diff
diff --git a/rhui-2.0/tools/etc/rhui/templates/rh-rhua-config.spec b/rhui-2.0/tools/etc/rhui/templa
index 917b2fe..43ba246 100644
--- a/rhui-2.0/tools/etc/rhui/templates/rh-rhua-config.spec
+++ b/rhui-2.0/tools/etc/rhui/templates/rh-rhua-config.spec
@@ -64,6 +64,7 @@ cp -R $RPM_BUILD_DIR/%{name}-%{version}/qpid-nss $RPM_BUILD_ROOT/%{_sysconfdir}/
 echo "Updating RHUA Server Configuration"
 python /usr/bin/rhui_configurator.py /etc/pulp/pulp.conf !PULP_CONFIGURATOR!
 python /usr/bin/rhui_configurator.py /etc/rhui/rhui-tools.conf !RHUI_CONFIGURATOR!
+python /usr/bin/rhui_configurator.py /etc/pulp/admin/task.conf !PULP_TASK_CONFIGURATOR!
 
 #   Substitute in the custom CA certificate
 sed -i -e "s/SSLCACertificateFile.*/SSLCACertificateFile \\/etc\\/pki\\/rhua\\/user-ca-cert.crt/g"
diff --git a/rhui-2.0/tools/src/rhui/rpm/rhua.py b/rhui-2.0/tools/src/rhui/rpm/rhua.py
index aa9addd..4a0601b 100644
--- a/rhui-2.0/tools/src/rhui/rpm/rhua.py
+++ b/rhui-2.0/tools/src/rhui/rpm/rhua.py
@@ -145,6 +145,12 @@ def _create_spec_file(config_dir, answers):
     ]
 
     spec = spec.replace('!RHUI_CONFIGURATOR!', ' '.join(args))
+    
+    args = [ 
+            'task', 'enabled', 'True',
+    ]
+
+    spec = spec.replace('!PULP_TASK_CONFIGURATOR!', ' '.join(args))
 
     # Destination for the generated file

Comment 6 wes hayutin 2012-07-10 16:57:13 UTC
I'm no longer able to repro this error


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