[Pulp-list] pulp_streamer - The requested URL returned error: 400 Bad Request

Matthew Madey mattmadey at gmail.com
Tue Oct 30 18:40:07 UTC 2018


I've been trying to get the deferred download features working on Pulp.
Currently I have a "master" Pulp server with a custom repo, then a "slave"
Pulp server that points to the "master" for the same content. I've
installed\configured squid\pulp_streamer on the "slave" and setup it's
custom repo to use on_demand download policy. Unfortunately, when a client
requests a package, I get the error: [Errno 14] PYCURL ERROR 22 - "The
requested URL returned error: 400 Bad Request"

Some interesting things that I noticed..

When setting up the custom repo on the "slave", I noticed that it created
an additional /pulp/repos/ directory
under /var/lib/pulp/published/yum/https/repos
Example:

[root at slave repos]# pwd
/var/lib/pulp/published/yum/https/repos/pulp/repos

This caused me to have to change the rewrite rule in the pulp_rpm.conf to
the below, otherwise when I would go to
http://slave.mycompany.com/pulp/repos/ I would have a pulp directory.
Clicking on that would go to a repos subdir, which had a pulp subdir.. on
and on.. because the rewrite rule would keep going back.. I'm thinking that
might be part of the issue I'm seeing. Is this expected behavior when you
synchronize one pulp repository with another pulp server?? I went down this
route as per documentation since the Parent\Child setup is deprecated and
very buggy..

<Location /pulp/repos/>
  RewriteEngine On
  RewriteCond %{HTTPS} on
  RewriteRule (.+/pulp/repos/)(.*)
/pulp/content/var/www/pub/yum/https/repos/pulp/repos/$2 [DPI]
  RewriteCond %{HTTPS} off
  RewriteRule (.+/pulp/repos/)(.*)
/pulp/content/var/www/pub/yum/http/repos/pulp/repos/$2 [DPI]

Next, I have nothing under /var/www/streamer/

[root at slave repos]# cd /var/www/streamer/
[root at slave streamer]# ls -al
total 0
drwxr-xr-x. 2 apache apache  6 Oct 11 14:33 .
drwxr-xr-x. 5 root   root   60 Oct 30 12:07 ..


I see the requests for the package coming in from the squid access log on
the "slave" pulp server

[root at slave streamer]# tail -f /var/log/squid/access.log
1540919365.408      0 127.0.0.1 TAG_NONE/400 4221 GET
/var/lib/pulp/content/units/rpm/ea/f2480dc9740f9a787e69e5a7d06f501a67780672f2a35ed22c182e7be387bc/puppet_test_package-1.0.2-1.el6.x86_64.rpm
- HIER_NONE/- text/html

That content obviously does not exist because it hasn't been downloaded
yet..

I see under the published directory the link to the non-existent content
unit

[root at slave p]# pwd
/var/lib/pulp/published/yum/https/repos/pulp/repos/rhel-x86_64-server-7-base-thd-tools/Packages/p
[root at slave p]# ll
total 0
lrwxrwxrwx. 1 apache apache 140 Oct 30 13:01
puppet_test_package-1.0.2-1.el6.x86_64.rpm ->
/var/lib/pulp/content/units/rpm/ea/f2480dc9740f9a787e69e5a7d06f501a67780672f2a35ed22c182e7be387bc/puppet_test_package-1.0.2-1.el6.x86_64.rpm

Any ideas?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-list/attachments/20181030/615ca3a4/attachment.htm>


More information about the Pulp-list mailing list