Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1096311

Summary: Currently have to wait for first babysit task before submitting tasks
Product: [Retired] Pulp Reporter: Justin Sherrill <jsherril>
Component: async/tasksAssignee: Brian Bouterse <bmbouter>
Status: CLOSED CURRENTRELEASE QA Contact: mkovacik
Severity: high Docs Contact:
Priority: high    
Version: 2.4.0CC: bmbouter, mhrivnak, mkovacik
Target Milestone: ---Keywords: Triaged
Target Release: 2.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-09 06:54:35 UTC Type: Bug
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: 950743    

Description Justin Sherrill 2014-05-09 15:55:01 UTC
Description of problem:

Currently with pulp 2.4 we've been told to wait for a minute for the 'babysit' task to run before doing anything with pulp that would cause tasks to be submitted.

This isn't realistic for normal use, and should be handled automatically.


Version-Release number of selected component (if applicable):
pulp-server-2.4.0-0.13.beta.el6.noarch

Comment 1 Brian Bouterse 2014-05-16 13:22:56 UTC
PR here:

https://github.com/pulp/pulp/pull/963

Comment 2 Brian Bouterse 2014-05-16 13:23:12 UTC
Merged

Comment 3 Sayli Karmarkar 2014-05-16 15:54:03 UTC
*** Bug 1097699 has been marked as a duplicate of this bug. ***

Comment 4 Randy Barlow 2014-05-16 20:29:41 UTC
Fixed with 2.4.0-0.16.beta.

Comment 5 mkovacik 2014-06-03 11:58:17 UTC
Please, provide reproducer steps

Comment 6 Brian Bouterse 2014-06-03 13:12:40 UTC
Try to reproduce by turning on all pulp services, and dispatch a sync before the babysit that runs 60 seconds after celerybeat starts. You should receive a NoAvailableQueues Exception, even though you have workers. You can watch the logs to see when babysit runs. Babysit also runs at startup, but I believe you can reproduce the issue by running the sync before the one that executes 60 seconds after startup.

This was told to me by a developer. I'm not sure if this is 100% reproducible. 

I can guarantee this is no longer an issue because babysit() has been entirely removed from the architecture and code. New code that behaves differently replaces it in newer versions.

Send more questions if there are any. Thanks for QA-ing this!

Comment 7 mkovacik 2014-06-03 18:28:17 UTC
No old builds handy, I've decided to check the behavior in fixed build only.


Verified in version: pulp-server-2.4.0-0.19.beta.fc20.noarch
Verification scenario:
- check pulp_database.available_queues, .reserved_resources and .task_status
- there should be available queues, no reserved resources and no tasks, 
  preferably
- create a rpm repo
- restart the pulp_worker-*.service and run the repo sync 3 secs  after the 
  services finish starting



Notes: 3 secs necessary for the pulp_worker-*.service processes settle-down on my system. See also: Bug #1104320 


# screen log
[root@ec2-79-125-97-56 ~]# fg
mongo
> db.available_queues.find()
{ "_id" : "reserved_resource_worker-1.compute.amazonaws.com", "last_heartbeat" : ISODate("2014-06-03T17:34:50.517Z"), "num_reservations" : 0 }
{ "_id" : "reserved_resource_worker-0.compute.amazonaws.com", "last_heartbeat" : ISODate("2014-06-03T17:34:50.608Z"), "num_reservations" : 0 }
> db.task_status.find()
> db.reserved_resources.find()
> 
[1]+  Stopped                 mongo
[root@ec2-79-125-97-56 ~]# pulp-admin -u admin -p admin rpm repo create --repo-id zoo --feed http://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/zoo/                                                                                   
Successfully created repository [zoo]

[root@ec2-79-125-97-56 ~]# systemctl restart pulp_worker-0 pulp_worker-1 ; date ; sleep 3 ; systemctl is-active pulp_worker-0 && systemctl is-active pulp_worker-1 && date && pulp-admin -u admin -p admin rpm repo sync run --repo-id zoo   
Tue Jun  3 17:35:47 UTC 2014
active
active
Tue Jun  3 17:35:50 UTC 2014
+----------------------------------------------------------------------+
                     Synchronizing Repository [zoo]
+----------------------------------------------------------------------+

This command may be exited via ctrl+c without affecting the request.


Downloading metadata...
[|]
... completed

Downloading repository content...
[==================================================] 100%
RPMs:       32/32 items
Delta RPMs: 0/0 items

... completed

Downloading distribution files...
[==================================================] 100%
Distributions: 0/0 items
... completed

# ------%<------------------------------------------------

Comment 8 Randy Barlow 2014-08-09 06:54:35 UTC
This has been fixed in Pulp 2.4.0-1.