Bug 695702
Summary: | Error from deleting a repo while sync is in progress | ||
---|---|---|---|
Product: | [Retired] Pulp | Reporter: | dgao |
Component: | z_other | Assignee: | John Matthews <jmatthew> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | dgao |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | unspecified | CC: | pthomas, skarmark |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | Sprint 22 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-08-16 14:00:51 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 641987 |
Description
dgao
2011-04-12 13:20:18 UTC
2011-04-12 08:50:00,008 [INFO][MainThread] connect() @ broker.py:89 - {localhost:5672} connected to AMQP 2011-04-12 08:50:00,009 [INFO][MainThread] open() @ consumer.py:133 - {heartbeat} opening heartbeat;{create:always,node:{type:topic,durable:True},link:{durable:True,x-declare:{arguments:{no-local:True}}}} 2011-04-12 08:50:00,574 [INFO][Dummy-2] initialize() @ connection.py:41 - Attempting Database connection with seeds = pulp-nightly.usersys.redhat.com 2011-04-12 08:50:00,593 [INFO][Dummy-2] initialize() @ connection.py:46 - Database connection established with: seeds = pulp-nightly.usersys.redhat.com, name = pulp_database 2011-04-12 08:50:00,627 [WARNING][Dummy-2] schedule() @ task.py:269 - Task 60e87c73-6503-11e0-a733-5452004fdd6d: cull_history(, ) missed 1 scheduled runs 2011-04-12 08:50:00,628 [ERROR][Dummy-2] clear_all_sync_in_progress() @ repo.py:73 - r = SON([(u'_id', u'f13test'), (u'id', u'f13test'), (u'sync_in_progress', False)]) 2011-04-12 08:50:02,921 [INFO][Dummy-5] sync() @ repositories.py:557 - sync timeout passed : None 2011-04-12 08:50:02,968 [INFO][Thread-6] _sync() @ repo.py:1496 - Sync of faux_test_repo starting, skip_dict = {} 2011-04-12 08:50:02,968 [INFO][Thread-6] sync() @ repo_sync.py:444 - Limiting download speed to 0 KB/sec per thread. [15] threads will be used 2011-04-12 08:50:03,964 [INFO][Thread-3] cancel() @ repo_sync.py:65 - RepoSyncTask cancel invoked 2011-04-12 08:50:04,240 [INFO][Dummy-5] delete() @ repo.py:492 - Delete API call invoked SON([(u'use_symlinks', False), (u'feed_key', None), (u'package_count', 0), (u'distributionid', []), (u'consumer_cert', None), (u'consumer_ca', None), (u'filters', []), (u'id', u'faux_test_repo'), (u'repomd_xml_path', u'/var/lib/pulp//repos/released/F-13/GOLD/Fedora/x86_64/os/repodata/repomd.xml'), (u'group_xml_path', u''), (u'publish', True), (u'source', SON([(u'url', u'http://download.devel.redhat.com/released/F-13/GOLD/Fedora/x86_64/os'), (u'type', u'yum'), (u'supported_types', [u'yum', u'local', u'rhn'])])), (u'sync_in_progress', True), (u'groupid', []), (u'consumer_key', None), (u'packagegroups', SON([])), (u'files', []), (u'relative_path', u'released/F-13/GOLD/Fedora/x86_64/os'), (u'arch', u'noarch'), (u'sync_schedule', None), (u'packages', []), (u'group_gz_xml_path', u''), (u'feed_cert', None), (u'name', u'faux_test_repo'), (u'feed_ca', None), (u'last_sync', None), (u'clone_ids', []), (u'packagegroupcategories', SON([])), (u'_ns', u'repos'), (u'release', None), (u'checksum_type', u'sha256'), (u'_id', u'faux_test_repo'), (u'errata', SON([]))]) 2011-04-12 08:50:04,242 [INFO][Dummy-5] mkdir() @ keystore.py:202 - mkdir: /var/lib/pulp/published/gpg/released/F-13/GOLD/Fedora/x86_64/os 2011-04-12 08:50:04,243 [INFO][Dummy-5] unlink() @ keystore.py:187 - unlinking: /var/lib/pulp/published/gpg/released/F-13/GOLD/Fedora/x86_64/os 2011-04-12 08:50:04,245 [INFO][Dummy-5] delete() @ repo.py:582 - removing repo files .... /var/lib/pulp//repos/released/F-13/GOLD/Fedora/x86_64/os 2011-04-12 08:50:07,788 [ERROR][Thread-6] failed() @ task.py:388 - Task id:6246ddab-6503-11e0-b02b-5452004fdd6d, method_name:_sync: Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/pulp/server/tasking/task.py", line 336, in run result = self.callable(*self.args, **self.kwargs) File "/usr/lib/python2.6/site-packages/pulp/server/api/repo.py", line 1550, in _sync self.set_sync_in_progress(id, False) File "/usr/lib/python2.6/site-packages/pulp/server/api/repo.py", line 2054, in set_sync_in_progress if repo.has_key("sync_in_progress") and repo["sync_in_progress"]: AttributeError: 'NoneType' object has no attribute 'has_key' Commit here: http://git.fedorahosted.org/git/?p=pulp.git;a=commitdiff;h=3fb4515887a793b954527fcc1507fdfa1c880ef6 We added a check for set_sync_in_progress, it guards against repo not being found when querying mongo. Underlying issue is that we are allowing a repo to be deleted while it is being synced...and we are not stopping the sync. Fixed in build 0.163. [root@pulp-qe httpd]# yum info pulp Installed Packages Name : pulp Arch : noarch Version : 0.0.163 [root@pulp-qe httpd]# pulp-admin repo create --id=foo --feed=yum:http://download.devel.redhat.com/released/F-14/GOLD/Fedora/x86_64/os/ Successfully created repository [ foo ] [root@pulp-qe httpd]# pulp-admin repo sync --id=foo -F Sync for repository foo started Step: Downloading Items or Verifying [ ] 0% Tree_Files: 0/7 Rpms: 39/2766 Total: 39/2773 items ^C [root@pulp-qe httpd]# pulp-admin repo delete --id=foo Successful deleted repository [ foo ] [root@pulp-qe httpd]# nethogs NetHogs version 0.7.0 PID USER PROGRAM DEV SENT RECEIVED 6810 apache (wsgi:pulp) eth0 25.437 1198.940 KB/sec No error is outputted in the log from deleting the repo while sync is ongoing. Refer to https://bugzilla.redhat.com/show_bug.cgi?id=695707 for resolution of the underlying problem. Closing with Community Release 15 pulp-0.0.223-4. |