Actions
Issue #1654
closedNot able to use the kickstart trees synced with repo sync
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Master
Platform Release:
2.8.0
OS:
RHEL 7
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:
Description
Not able to kickstart a vm using the kickstart trees synced using pulp-admin rpm repo sync ( not using a download policy)
Steps to reproduce
1. Create & Sync a kickstart repo
2. Publish it over http
3. Use that pulp synced kickstart repo to network install a vm
[root@ibm-x3550m3-09 ~]# rpm -qa |grep pulp
python-pulp-rpm-common-2.8.0-0.5.beta.git.25.8b3df25.el7.noarch
pulp-server-2.8.0-0.5.beta.git.59.f7eb659.el7.noarch
pulp-docker-plugins-2.0.0-0.5.beta.git.10.3ce1ef2.el7.noarch
pulp-selinux-2.8.0-0.5.beta.git.59.f7eb659.el7.noarch
pulp-admin-client-2.8.0-0.5.beta.git.59.f7eb659.el7.noarch
python-pulp-common-2.8.0-0.5.beta.git.59.f7eb659.el7.noarch
python-kombu-3.0.33-1.pulp.el7.noarch
python-pulp-docker-common-2.0.0-0.5.beta.git.10.3ce1ef2.el7.noarch
python-pulp-repoauth-2.8.0-0.5.beta.git.59.f7eb659.el7.noarch
pulp-rpm-plugins-2.8.0-0.5.beta.git.25.8b3df25.el7.noarch
python-pulp-bindings-2.8.0-0.5.beta.git.59.f7eb659.el7.noarch
python-pulp-client-lib-2.8.0-0.5.beta.git.59.f7eb659.el7.noarch
pulp-docker-admin-extensions-2.0.0-0.5.beta.git.10.3ce1ef2.el7.noarch
pulp-rpm-admin-extensions-2.8.0-0.5.beta.git.25.8b3df25.el7.noarch
python-pulp-streamer-2.8.0-0.5.beta.git.59.f7eb659.el7.noarch
python-isodate-0.5.0-4.pulp.el7.noarch
python-pulp-puppet-common-2.8.0-0.5.beta.git.4.2960d39.el7.noarch
python-pulp-oid_validation-2.8.0-0.5.beta.git.59.f7eb659.el7.noarch
pulp-puppet-plugins-2.8.0-0.5.beta.git.4.2960d39.el7.noarch
pulp-puppet-admin-extensions-2.8.0-0.5.beta.git.4.2960d39.el7.noarch
[root@ibm-x3550m3-09 ~]#
[root@ibm-x3550m3-09 ~]# pulp-admin rpm repo create --repo-id rhel6server --feed http://download.devel.redhat.com/cds/prod/content/dist/rhel/server/6/6Server/x86_64/kickstart/
Successfully created repository [rhel6server]
[root@ibm-x3550m3-09 CDN]# pulp-admin rpm repo sync run --repo-id rhel6server
+----------------------------------------------------------------------+
Synchronizing Repository [rhel6server]
+----------------------------------------------------------------------+
A sync task is already in progress for this repository. Its progress will be
tracked below.
This command may be exited via ctrl+c without affecting the request.
Downloading metadata...
[-]
... completed
Downloading repository content...
[==================================================] 100%
RPMs: 3819/3819 items
Delta RPMs: 0/0 items
... completed
Downloading distribution files...
[==================================================] 100%
Distributions: 1840/1840 items
... completed
Importing errata...
[-]
... completed
Importing package groups/categories...
[|]
... completed
Cleaning duplicate packages...
[-]
... completed
Task Succeeded
Initializing repo metadata
[-]
... completed
Publishing Distribution files
[|]
... completed
Publishing RPMs
[==================================================] 100%
3819 of 3819 items
... completed
Publishing Delta RPMs
... skipped
Publishing Errata
[-]
... completed
Publishing Comps file
[==================================================] 100%
212 of 212 items
... completed
Publishing Metadata.
[-]
... completed
Closing repo metadata
[-]
... completed
Generating sqlite files
... skipped
Publishing files to web
[\]
... completed
Writing Listings File
[-]
... completed
Task Succeeded
[root@ibm-x3550m3-09 ~]# pulp-admin rpm repo update --repo-id rhel6server --serve-http true
This command may be exited via ctrl+c without affecting the request.
[\]
Running...
Updating distributor: yum_distributor
Task Succeeded
[\]
Running...
Updating distributor: export_distributor
Task Succeeded
[root@ibm-x3550m3-09 ~]# pulp-admin rpm repo publish run --repo-id rhel6server
+----------------------------------------------------------------------+
Publishing Repository [rhel6server]
+----------------------------------------------------------------------+
This command may be exited via ctrl+c without affecting the request.
Copying files
[\]
... completed
Initializing repo metadata
[-]
... completed
Publishing Distribution files
[-]
... completed
Publishing RPMs
[\]
... completed
Publishing Delta RPMs
... skipped
Publishing Errata
[-]
... completed
Publishing Comps file
[==================================================] 100%
212 of 212 items
... completed
Publishing Metadata.
[-]
... completed
Closing repo metadata
[-]
... completed
Generating sqlite files
... skipped
Publishing files to web
[|]
... completed
Writing Listings File
[-]
... completed
Writing Listings File
[-]
... completed
Task Succeeded
Unable to complete install: 'Could not find an installable distribution at 'http://ibm-x3550m3-09.lab.eng.brq.redhat.com/pulp/repos/cds/prod/content/dist/rhel/server/6/6Server/x86_64/kickstart/': The URL could not be accessed, maybe you mistyped?
Actions
Distribution storage path no longer dependant on hostname and PRNG.
Use os.path.relpath instead of str.lstrip when determining the relative path of a distribution file during content import.
The Python method
str.lstrip
takes a list of chars, but this is treated as a set of characters to strip from the left side of the string, not as a substring to remove[0]. This was problematic for many reasons, but would (rather entertainingly) determine the relative path for distribution files based on the hostname of the worker and the psuedo-random number generator used by tempdir and uuid. to '/var/cache/pulp/@///'[0] https://docs.python.org/2/library/stdtypes.html#str.lstrip
closes #1654