Description of problem: When we want an exact copy (clone) of an repo we have to create it in several steps e.g.: pulp-admin rpm repo create --repo-id=repo-clone --relative-url=repo-clone pulp-admin rpm repo copy rpm --from-repo-id repo-live --to-repo-id repo-clone pulp-admin rpm repo copy distribution --from-repo-id repo-live --to-repo-id repo-clone pulp-admin rpm repo copy errata --from-repo-id repo-live --to-repo-id repo-clone pulp-admin rpm repo copy category --from-repo-id repo-live --to-repo-id repo-clone pulp-admin rpm repo copy group --from-repo-id repo-live --to-repo-id repo-clone pulp-admin rpm repo publish run --repo-id=repo-clone It would be convenient to be able to do this in one step e.g: pulp-admin rpm repo copy --from-repo-id repo-live --to-repo-id repo-clone Or add an "all" flag to pulp-admin rpm repo copy e.g: pulp-admin rpm repo create --repo-id=repo-clone --relative-url=repo-clone pulp-admin rpm repo copy all --from-repo-id repo-live --to-repo-id repo-clone pulp-admin rpm repo publish run --repo-id=repo-clone Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Fixed. $ pulp-admin rpm repo copy Usage: pulp-admin [SUB_SECTION, ..] COMMAND Description: copies one or more content units between repositories Available Commands: all - copy all content units from one repository to another category - copy package categories from one repository to another distribution - copy distributions from one repository to another errata - copy errata from one repository to another group - copy package groups from one repository to another rpm - copy RPMs from one repository to another $ pulp-admin rpm repo copy all --from-repo-id zoo --to-repo-id zoo-copy This command may be exited via ctrl+c without affecting the request. [-] Waiting to begin... [\] Running... Units: erratum: RHEA-2012:0001 RHEA-2012:0002 RHEA-2012:0003 RHEA-2012:0004 package_category: all package_group: birds mammals rpm: bear-4.1-1-noarch camel-0.1-1-noarch cat-1.0-1-noarch cheetah-1.25.3-5-noarch chimpanzee-0.21-1-noarch cockateel-3.1-1-noarch cow-2.2-3-noarch crow-0.8-1-noarch dog-4.23-1-noarch dolphin-3.10.232-1-noarch duck-0.6-1-noarch elephant-8.3-1-noarch fox-1.1-2-noarch frog-0.1-1-noarch giraffe-0.67-2-noarch gorilla-0.62-1-noarch horse-0.22-2-noarch kangaroo-0.2-1-noarch lion-0.4-1-noarch mouse-0.1.12-1-noarch penguin-0.9.1-1-noarch pike-2.2-1-noarch shark-0.1-1-noarch squirrel-0.1-1-noarch stork-0.12-2-noarch tiger-1.0-4-noarch trout-0.12-1-noarch walrus-0.71-1-noarch walrus-5.21-1-noarch whale-0.2-1-noarch wolf-9.4-2-noarch zebra-0.1-2-noarch $ pulp-admin rpm repo list +----------------------------------------------------------------------+ RPM Repositories +----------------------------------------------------------------------+ Id: zoo Display Name: zoo Description: None Content Unit Counts: Erratum: 4 Package Category: 1 Package Group: 2 Rpm: 32 Id: zoo-copy Display Name: zoo-copy Description: None Content Unit Counts: Erratum: 4 Package Category: 1 Package Group: 2 Rpm: 32
commit 5a8f46de732838a0553bce4424bef24f71108616 Author: Sayli Karmarkar <skarmark> Date: Mon May 27 23:25:41 2013 -0700 955700 - Added all command to pulp-admin rpm repo copy to copy all content units and unit tests for the same
Merged. Including the fix for https://bugzilla.redhat.com/show_bug.cgi?id=971200 - $ pulp-admin rpm repo copy all --from-repo-id test-repo --to-repo-id test-repo-copy This command may be exited via ctrl+c without affecting the request. [-] Waiting to begin... [-] Running... Units: erratum: RHBA-2007:0112 RHBA-2007:0611 RHBA-2008:0026 RHBA-2008:0189 RHBA-2008:0198 RHBA-2008:0279 RHBA-2008:0280 RHBA-2008:0291 RHBA-2008:0305 RHBA-2008:0433 RHBA-2008:0480 RHBA-2008:0554 RHBA-2009:0118 RHBA-2009:0137 RHBA-2009:0140 RHBA-2009:0141 RHBA-2009:0142 RHBA-2009:0216 RHBA-2009:0401 RHBA-2009:1092 RHBA-2009:1285 RHBA-2009:1299 RHBA-2009:1328 RHBA-2009:1412 RHBA-2009:1421 RHBA-2009:1424 RHBA-2009:1514 RHBA-2010:0010 RHBA-2010:0205 RHBA-2010:0206 RHBA-2010:0222 RHBA-2010:0251 RHBA-2010:0281 RHBA-2010:0282 RHBA-2010:0294 RHBA-2010:0418 RHEA-2007:0635 RHEA-2007:0636 RHEA-2007:0637 RHEA-2007:0643 RHEA-2008:0371 RHEA-2008:0467 RHEA-2009:1269 RHEA-2009:1270 RHEA-2009:1302 RHSA-2007:0114 RHSA-2007:0323 RHSA-2008:0194 RHSA-2008:0892 RHSA-2009:0003 RHSA-2009:0382 RHSA-2009:1472 package_category: apps desktops package_group: admin-tools dns-server haskell rpm: pulp-dot-2.0-test-0.1.2-1.fc11-x86_64 pulp-test-package-0.2.1-1.fc11-x86_64 pulp-test-package-0.3.1-1.fc11-x86_64
build: 2.2.0-0.3.beta
verified [root@hp-dl360g6-01 ~]# rpm -q pulp-server pulp-server-2.2.0-0.3.beta.fc18.noarch [root@hp-dl360g6-01 ~]# [root@hp-dl360g6-01 ~]# pulp-admin rpm repo create --repo-id zoo.repo --feed http://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/zoo/ Successfully created repository [zoo.repo] [root@hp-dl360g6-01 ~]# pulp-admin rpm repo sync run --repo-id zoo.repo +----------------------------------------------------------------------+ Synchronizing Repository [zoo.repo] +----------------------------------------------------------------------+ This command may be exited by pressing ctrl+c without affecting the actual operation on the server. 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 Importing errata... [-] ... completed Importing package groups/categories... [-] ... completed Publishing packages... [==================================================] 100% Packages: 32/32 items ... completed Publishing distributions... [==================================================] 100% Distributions: 0/0 items ... completed Generating metadata [-] ... completed Publishing repository over HTTPS [-] ... completed [root@hp-dl360g6-01 ~]# pulp-admin rpm repo create --repo-id zoo-copy Successfully created repository [zoo-copy] [root@hp-dl360g6-01 ~]# [root@hp-dl360g6-01 ~]# [root@hp-dl360g6-01 ~]# pulp-admin rpm repo copy Usage: pulp-admin [SUB_SECTION, ..] COMMAND Description: copies one or more content units between repositories Available Commands: all - copy all content units from one repository to another category - copy package categories from one repository to another distribution - copy distributions from one repository to another errata - copy errata from one repository to another group - copy package groups from one repository to another rpm - copy RPMs from one repository to another [root@hp-dl360g6-01 ~]# pulp-admin rpm repo copy all --from-repo-id zoo.repo --to-repo-id zoo-copy This command may be exited via ctrl+c without affecting the request. [-] Waiting to begin... [-] Running... Units: erratum: RHEA-2012:0001 RHEA-2012:0002 RHEA-2012:0003 RHEA-2012:0004 package_category: all package_group: birds mammals rpm: bear-4.1-1-noarch camel-0.1-1-noarch cat-1.0-1-noarch cheetah-1.25.3-5-noarch chimpanzee-0.21-1-noarch cockateel-3.1-1-noarch cow-2.2-3-noarch crow-0.8-1-noarch dog-4.23-1-noarch dolphin-3.10.232-1-noarch duck-0.6-1-noarch elephant-8.3-1-noarch fox-1.1-2-noarch frog-0.1-1-noarch giraffe-0.67-2-noarch gorilla-0.62-1-noarch horse-0.22-2-noarch kangaroo-0.2-1-noarch lion-0.4-1-noarch mouse-0.1.12-1-noarch penguin-0.9.1-1-noarch pike-2.2-1-noarch shark-0.1-1-noarch squirrel-0.1-1-noarch stork-0.12-2-noarch tiger-1.0-4-noarch trout-0.12-1-noarch walrus-0.71-1-noarch walrus-5.21-1-noarch whale-0.2-1-noarch wolf-9.4-2-noarch zebra-0.1-2-noarch [root@hp-dl360g6-01 ~]# pulp-admin rpm repo list +----------------------------------------------------------------------+ RPM Repositories +----------------------------------------------------------------------+ Id: zoo.repo Display Name: zoo.repo Description: None Content Unit Counts: Erratum: 4 Package Category: 1 Package Group: 2 Rpm: 32 Id: zoo-copy Display Name: zoo-copy Description: None Content Unit Counts: Erratum: 4 Package Category: 1 Package Group: 2 Rpm: 32 [root@hp-dl360g6-01 ~]#
2.2 released http://repos.fedorapeople.org/repos/pulp/pulp/stable/2.2/
Hi, maybe this is a stupid question, but 'all' does not seem to include 'distribution'. Maybe this is a bug?
Frank, 'all' does include distributions. It seems to be copying distributions as well with version 2.3. Which version are you running? and can you confirm whether distrubution sync was successful before copying to another repo? Thanks,
Hi, yes, distribution sync was running fine on the source; it was just the copy repository which didn't have it. This was before; with rpm repo copy all: bash-4.1$ pwd /var/www/pub/http/repos/201309_01/rhel-x86_64-server-6 bash-4.1$ du 19912 ./repodata 36264 . And after running this: bash-4.1$ pulp-admin rpm repo copy distribution --from-repo-id rhel-x86_64-server-6 --to-repo-id rhel-x86_64-server-6-201309_01 This command may be exited via ctrl+c without affecting the request. [-] Waiting to begin... [-] Running... Units: ks-Red Hat Enterprise Linux-Server-6.4-x86_64 bash-4.1$ cd /var/www/pub/http/repos/201309_01/rhel-x86_64-server-6 bash-4.1$ du 19912 ./repodata 15240 ./Packages 12 ./images/pxeboot 36 ./images 19912 ./repodata.old 71452 . This is on 2.3.0.27.beta.el6; maybe it is already fixed but the rpm is from November 1st. Thanks =) Frank