Bug 837417 - Foreground sync fails with TypeError: 'NoneType' object is unsubscriptable
Summary: Foreground sync fails with TypeError: 'NoneType' object is unsubscriptable
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: 1.1.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: ---
Assignee: John Matthews
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-03 20:01 UTC by Matt Hermanson
Modified: 2013-09-09 16:35 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-11-27 15:14:36 UTC
Embargoed:


Attachments (Terms of Use)

Description Matt Hermanson 2012-07-03 20:01:40 UTC
Description of problem:
Can't sync in the foreground, Ctrl+C prints a traceback and the sync goes on to finish

Version-Release number of selected component (if applicable):
pulp-1.1.11-1.el6.noarch

How reproducible:
Everytime a sync is run with -F

Steps to Reproduce:
1. run sync with -F
2.
3.
  
Actual results:
[root@mirror2 repos]# pulp-admin repo sync -F --id rhel-6-x86_64-pulp
error:  operation failed: No repository rhel-6-x86_64-pulp
[root@mirror2 repos]# pulp-admin repo sync -F --id generic-6-x86_64-pulp
Sync for repository generic-6-x86_64-pulp started
Step: Downloading Metadata
Waiting -
Task not found: 58035bab-c549-11e1-ae3c-00505686001a
^CTraceback (most recent call last):
  File "/usr/bin/pulp-admin", line 23, in <module>
    admin.main()
  File "/usr/lib/python2.6/site-packages/pulp/client/lib/cli.py", line 152, in main
    command.main(self.args[1:])
  File "/usr/lib/python2.6/site-packages/pulp/client/pluginlib/command.py", line 129, in main
    action.main(args[1:])
  File "/usr/lib/python2.6/site-packages/pulp/client/pluginlib/command.py", line 213, in main
    self.run()
  File "/usr/lib/python2.6/site-packages/pulp/client/admin/plugins/repo.py", line 823, in run
    self._foreground_final_output(final_task)
  File "/usr/lib/python2.6/site-packages/pulp/client/admin/plugins/repo.py", line 977, in _foreground_final_output
    state = task['state']
TypeError: 'NoneType' object is unsubscriptable
[root@mirror2 repos]# tail -f /var/log/pulp/pulp.log
2012-07-03 15:57:45,987 30648:140691531290368: pulp.server.api.repo_sync:INFO: repo_sync:286 Sync on generic-6-x86_64-pulp returned 20 packages, 0 errata in 6.10661005974 seconds
2012-07-03 15:57:45,988 30648:140691531290368: pulp.server.api.repo_sync:INFO: repo_sync:297 0 old packages to process, 0 new packages to process
2012-07-03 15:57:45,988 30648:140691531290368: pulp.server.api.repo_sync:INFO: repo_sync:299 Removing 0 old packages
2012-07-03 15:57:45,988 30648:140691531290368: pulp.server.api.repo:DEBUG: repo:1113 remove_packages invoked on generic-6-x86_64-pulp with no packages
2012-07-03 15:57:45,989 30648:140691531290368: pulp.server.api.repo_sync:INFO: repo_sync:305 Adding 0 new packages
2012-07-03 15:57:45,991 30648:140691531290368: pulp.server.api.repo_sync:INFO: repo_sync:314 Examining 0 errata from repo generic-6-x86_64-pulp
2012-07-03 15:57:45,992 30648:140691531290368: pulp.server.api.repo_sync:INFO: repo_sync:318 Removing 0 old errata from repo generic-6-x86_64-pulp
2012-07-03 15:57:45,994 30648:140691531290368: pulp.server.api.repo:DEBUG: repo:1113 remove_packages invoked on generic-6-x86_64-pulp with no packages
2012-07-03 15:57:45,995 30648:140691531290368: pulp.server.api.repo_sync:INFO: repo_sync:327 Adding 0 new errata to repo generic-6-x86_64-pulp
2012-07-03 15:57:45,998 30648:140691531290368: pulp.server.tasking.task:INFO: task:454 Task succeeded: Task 58035bab-c549-11e1-ae3c-00505686001a: _sync(generic-6-x86_64-pulp, synchronizer=<pulp.server.api.synchronizers.YumSynchronizer object at 0x7ff590cb2e90>, skip={}, max_speed=None, threads=None, progress_callback=<bound method RepoSyncTask.progress_callback of <pulp.server.api.repo_sync_task.RepoSyncTask object at 0x7ff590cb2cd0>>)


Expected results:
interactive sync to run


Additional info:
Additionally any status on a repo or --status on generate_metadata will give inconsistent results. It's as if pulp-admin can not get reliable "state" information out of the database.

OS: RHEL 6.3

Comment 1 John Matthews 2012-07-18 18:21:26 UTC
Matt,

I was unsuccessful in recreating the issue you are seeing. 

Are you still seeing this problem?  Are you able to provide more information so we can recreate it?

 


I created a rhel 6.3 x86_64 instance and installed  pulp 1.1.11-1.el6

                                 
# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.3 (Santiago)

# pulp-admin repo create --id demo --feed http://repos.fedorapeople.org/repos/pulp/pulp/v1/stable/6Server/x86_64/
Successfully created repository [ demo ]


# pulp-admin repo sync --id demo -F
Sync for repository demo started
Sync: Finished
20/20 new items downloaded
0/20 existing items processed

Item Details: 
RPMs: 20/20

Comment 2 Matt Hermanson 2012-08-07 14:29:38 UTC
Yes we are still seeing this issue. I'm not sure if it's relevent but we have ~120 repos, clones and all. 

here are more packages: 
[root@mirror2 repos]# rpm -qa | grep pulp
pulp-admin-1.1.11-1.el6.noarch
pulp-client-lib-1.1.11-1.el6.noarch
pulp-1.1.11-1.el6.noarch
python-oauth2-1.5.170-2.pulp.el6.noarch
pulp-selinux-server-1.1.11-1.el6.noarch
pulp-consumer-1.1.11-1.el6.noarch
mod_wsgi-3.3-3.pulp.el6.x86_64
pulp-common-1.1.11-1.el6.noarch
m2crypto-0.21.1.pulp-7.el6.x86_64

Also, I was to do a fresh install of pulp 1.1.11-1.el6 and was able to reproduce the problem. 

(In reply to comment #1)
> Matt,
> 
> I was unsuccessful in recreating the issue you are seeing. 
> 
> Are you still seeing this problem?  Are you able to provide more information
> so we can recreate it?
> 
>  
> 
> 
> I created a rhel 6.3 x86_64 instance and installed  pulp 1.1.11-1.el6
> 
>                                  
> # cat /etc/redhat-release 
> Red Hat Enterprise Linux Server release 6.3 (Santiago)
> 
> # pulp-admin repo create --id demo --feed
> http://repos.fedorapeople.org/repos/pulp/pulp/v1/stable/6Server/x86_64/
> Successfully created repository [ demo ]
> 
> 
> # pulp-admin repo sync --id demo -F
> Sync for repository demo started
> Sync: Finished
> 20/20 new items downloaded
> 0/20 existing items processed
> 
> Item Details: 
> RPMs: 20/20

Comment 3 Matt Hermanson 2012-08-16 19:20:22 UTC
I've been able to narrow this down a bit. 

Our task list isn't accurate. If I do something like schedule a sync, pulp adds a task to the task queue but it doesn't always appear. 

If I run 'pulp-admin task list' right after one another, I get inconsistent task counts. 

[root@mirror2 ~]# date; pulp-admin task list | grep Task | wc -l
Thu Aug 16 15:19:16 EDT 2012
103
[root@mirror2 ~]# date; pulp-admin task list | grep Task | wc -l
Thu Aug 16 15:19:17 EDT 2012
107
[root@mirror2 ~]# date; pulp-admin task list | grep Task | wc -l
Thu Aug 16 15:19:18 EDT 2012
103
[root@mirror2 ~]# date; pulp-admin task list | grep Task | wc -l
Thu Aug 16 15:19:19 EDT 2012
103
[root@mirror2 ~]# date; pulp-admin task list | grep Task | wc -l
Thu Aug 16 15:19:20 EDT 2012
103
[root@mirror2 ~]# date; pulp-admin task list | grep Task | wc -l
Thu Aug 16 15:19:21 EDT 2012
103
[root@mirror2 ~]# date; pulp-admin task list | grep Task | wc -l
Thu Aug 16 15:19:22 EDT 2012
107

Hope this helps!
Matt

(In reply to comment #2)
> Yes we are still seeing this issue. I'm not sure if it's relevent but we
> have ~120 repos, clones and all. 
> 
> here are more packages: 
> [root@mirror2 repos]# rpm -qa | grep pulp
> pulp-admin-1.1.11-1.el6.noarch
> pulp-client-lib-1.1.11-1.el6.noarch
> pulp-1.1.11-1.el6.noarch
> python-oauth2-1.5.170-2.pulp.el6.noarch
> pulp-selinux-server-1.1.11-1.el6.noarch
> pulp-consumer-1.1.11-1.el6.noarch
> mod_wsgi-3.3-3.pulp.el6.x86_64
> pulp-common-1.1.11-1.el6.noarch
> m2crypto-0.21.1.pulp-7.el6.x86_64
> 
> Also, I was to do a fresh install of pulp 1.1.11-1.el6 and was able to
> reproduce the problem. 
> 
> (In reply to comment #1)
> > Matt,
> > 
> > I was unsuccessful in recreating the issue you are seeing. 
> > 
> > Are you still seeing this problem?  Are you able to provide more information
> > so we can recreate it?
> > 
> >  
> > 
> > 
> > I created a rhel 6.3 x86_64 instance and installed  pulp 1.1.11-1.el6
> > 
> >                                  
> > # cat /etc/redhat-release 
> > Red Hat Enterprise Linux Server release 6.3 (Santiago)
> > 
> > # pulp-admin repo create --id demo --feed
> > http://repos.fedorapeople.org/repos/pulp/pulp/v1/stable/6Server/x86_64/
> > Successfully created repository [ demo ]
> > 
> > 
> > # pulp-admin repo sync --id demo -F
> > Sync for repository demo started
> > Sync: Finished
> > 20/20 new items downloaded
> > 0/20 existing items processed
> > 
> > Item Details: 
> > RPMs: 20/20

(In reply to comment #1)
> Matt,
> 
> I was unsuccessful in recreating the issue you are seeing. 
> 
> Are you still seeing this problem?  Are you able to provide more information
> so we can recreate it?
> 
>  
> 
> 
> I created a rhel 6.3 x86_64 instance and installed  pulp 1.1.11-1.el6
> 
>                                  
> # cat /etc/redhat-release 
> Red Hat Enterprise Linux Server release 6.3 (Santiago)
> 
> # pulp-admin repo create --id demo --feed
> http://repos.fedorapeople.org/repos/pulp/pulp/v1/stable/6Server/x86_64/
> Successfully created repository [ demo ]
> 
> 
> # pulp-admin repo sync --id demo -F
> Sync for repository demo started
> Sync: Finished
> 20/20 new items downloaded
> 0/20 existing items processed
> 
> Item Details: 
> RPMs: 20/20

Comment 4 Jay Dobies 2012-11-27 15:14:36 UTC
Our focus has been on the 2.x releases and there are no plans for any more releases in the 1.x stream. We've been unable to reproduce this in the 2.x stream, so I'm going to close this bug out as fixed in our next release (currently planned for the end of 2012).


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