Description of problem: Automatic sync doesn't seem to be happening when you create a repo with --schedules option Created repo with the following command [root@preethi ~]# pulp-admin -u admin -p admin repo create --id=f12_x86_64-new --name=f12 --arch=x86_64 --feed=yum:http://download.devel.redhat.com/released/F-12/GOLD/Fedora/x86_64/os/ --schedule="02 * * * *" [root@preethi ~]# pulp-admin -u admin -p admin repo list +-------------------------------------------+ List of Available Repositories +-------------------------------------------+ Label f12_x86_64-new Name f12 Feed {u'url': u'http://download.devel.redhat.com/released/F-12/GOLD/Fedora/x86_64/os/', u'type': u'yum', u'supported_types': [u'yum', u'local', u'rhn']} Arch x86_64 Sync Schedule 02 * * * * Packages 2998 Files 8 But the sync doesn't seem to be happening every 2 minutes as expected.
commit b2f0e6136a06efe34387bd7d70477fb7d666293a tree 1430b04de20800145f481400deba93137100d32b 635803 - Fixed repo sync schedule to use the existing model (for auditing and consumer history reapers) for the cron entries. src/pulp/server/api/repo.py src/pulp/server/api/repo_sync.py test/unit/test_repo_sync_schedule.py
Jay, Could you put in some steps to successfully verify this bug. Thanks
For each scheduled repo sync, there will be a separate crontab entry. Since the server is running as the apache user, it will be in that user's crontab. If you can't log in as the apache user, to display it use: crontab -u apache -l The entry should refer to the repo.py script, which will be in the /usr/lib/python2.*/site-packages/pulp/server/api directory. It needs to pass in a single parameter, --repoid, which identifies the repo to be syncced. Once that's all set up, the simplest way to test it is to create a repo with a schedule but not sync it. When the schedule should kick in and do the sync, it'll pull down the repo in its entirety. Another approach would be to simulate an update by doing a repo sync, changing the contents of the repo, and waiting for the schedule to kick in. Once it does, double check that the new packages are in pulp. Also make sure to double check that when deleting a repo the schedule entry is removed.
verified [root@preethi ~]# pulp-admin -u admin -p admin repo create --id=f13_test_relative --name=f13_test_relative --arch=x86_64 --feed=yum:http://repos.fedorapeople.org/repos/pulp/pulp/testing/fedora-13/x86_64/ --schedule="*/5 * * * *" --relativepath=/tmp/pulp_schedule_test/ successfully created repo [ f13_test_relative ] [root@preethi ~]# crontab -u apache -l 0,30 * * * * python /usr/lib/python2.6/site-packages/pulp/auditing.pyc 0,30 * * * * python /usr/lib/python2.6/site-packages/pulp/server/auditing.pyc 0 1 * * * python /usr/lib/python2.6/site-packages/pulp/server/api/consumer_history.pyc 2 * * * * pulp repo sync f12_i386-3 0,30 8-17 * * 1-5 python /usr/lib/python2.6/site-packages/pulp/server/api/repo.py --repoid=f13_test_schedule */5 * * * * python /usr/lib/python2.6/site-packages/pulp/server/api/repo.py --repoid=f13_test_relative You have new mail in /var/spool/mail/root [root@preethi ~]# ls /var/lib/pulp/repos/tmp/pulp_schedule_test/ cachecookie filelists.xml.gz grinder-0.0.63-1.fc13.noarch.rpm mongo-1.4.4-0.fc13.x86_64.rpm mongo-devel-1.4.4-0.fc13.x86_64.rpm mongo-server-1.4.4-0.fc13.x86_64.rpm other.xml.gz packages/ primary.xml.gz primary.xml.gz.sqlite pulp-0.0.72-1.fc13.noarch.rpm pulp-client-0.0.72-1.fc13.noarch.rpm pulp-common-0.0.72-1.fc13.noarch.rpm python-pymongo-1.6-5.fc13.x86_64.rpm python-qpid-0.7.946106-1.fc13.noarch.rpm python-webpy-0.32-6.fc13.noarch.rpm repodata/ repomd.xml [root@preethi ~]# ls /var/lib/pulp/repos/tmp/pulp_schedule_test/ cachecookie filelists.xml.gz grinder-0.0.63-1.fc13.noarch.rpm mongo-1.4.4-0.fc13.x86_64.rpm mongo-devel-1.4.4-0.fc13.x86_64.rpm mongo-server-1.4.4-0.fc13.x86_64.rpm other.xml.gz packages/ primary.xml.gz primary.xml.gz.sqlite pulp-0.0.72-1.fc13.noarch.rpm pulp-client-0.0.72-1.fc13.noarch.rpm pulp-common-0.0.72-1.fc13.noarch.rpm python-pymongo-1.6-5.fc13.x86_64.rpm python-qpid-0.7.946106-1.fc13.noarch.rpm python-webpy-0.32-6.fc13.noarch.rpm repodata/ repomd.xml
Closing with Community Release 15 pulp-0.0.223-4.