Well, as the error says, it‘s not supported. Generally, file URLs are local client side resources and supporting those would be pretty confusing, I guess.
I don‘t know. From security aspects it‘s good not to allow it. You‘ll never know what someone might enter there. Maybe, it could become a foreman-installer option allowing you some local import paths.
Otherwise, I think you‘ll have to change /etc/pulp/settings.py and then check after the next installer run if it sticks…
But generally, I think it‘s kind of a weird setup to mirror a distribution to the local file system and then copy it from there into the pulp directory…
How many different directories are you talking about? Above it looked like /var/www/html/ That’s all you need. Did you read the documentation for the ALLOWED_IMPORT_PATHS in the link above?
On a sidenote: you could move all that into the pub subdirectory, i.e. /var/www/html/pub On my foreman installation that is presented as simple directory through the web server, i.e. you could access everything via http/https as well, in case you need it… http://foreman.example.com/pub/
On another sidenote: I have the impression that katello 4 with pulp3 needs more host resources (cpu, memory, disk) than the old version. I hope that’s getting better with the time but still, personally, I wouldn’t mirror repositories into a local directory on the foreman server for staging. I am running everything in VMs and my foreman VM uses fast SSD storage while I have another mirror VM which regularly rsyncs various distributions using slower HDD storage. But again, that’s more like an impression or feeling at this time and nothing I really tested or measured…
So, adding in just “/var/www/html/” does not work. It appears the FULL path has to be specified, which is ridiculous to do for every single repo I will have.
I did try moving the yum content under “pub” and set the repo to access the yum content via http: (on my katello host). It’s really sad however I now have to access the yum content via the network and not files directly.
Well, the example in the docs I have linked to shows it should work. Or it’s the wrong docs.
The only thing from the docs which might make a different: the slash at the end. Try without it.
Did you stop all foreman and pulp services and started them again after the configuration change? a foreman-maintain service stop may not stop the pulpcore services even if it should.
Is the pulp user on the host able to read stuff from /var/www/html/ and below ? Try doing sudo su - pulp and ls “/var/www/html/ and directories below
As @gvde points out. You would have to restart pulpcore via foreman-maintain service restart after adding /var/www/html to the ALLOWED_IMPORT_PATHS in /etc/pulp/settings.py
Are you sure you made the correct change in settings.py? There is already a line for ALLOWED_IMPORT_PATHS in there, thus if you make your own setting before that it is going to be changed to the default:
What is the exact URL you have using? In your first post in the error message there is an incorrect url, but I am not sure if maybe somewhere down the line there was some text conversion involved. You seem to have file://var/www/html/rocky8/BaseOS/x86_64/os/. That equals to the file path “/www/html/rocky8/BaseOS/x86_64/os/” on host “var”!
The file URL scheme according to RFC 1738 looks like any other protocol scheme:
A file URL takes the form:
file://<host>/<path>
where <host> is the fully qualified domain name of the system on
which the <path> is accessible, and <path> is a hierarchical
directory path of the form <directory>/<directory>/.../<name>.
Of course, the host part is empty for a local directory.
The double slash “//” is part of the prefix. I have just tested it with the predefined import path
file:///var/lib/pulp/imports/abc/def`
and I was able to set up a repository with that. Note the three (3) slashes after file:
OK, I’m trying it all again on a new setup. I got it to work for one of my repos (yay!), but I have a difficult issue related to doing this. THREE slashes now seems to be the key.
In the second repo I was doing, I of course accidently used the TWO shashes (that worked under foreman 3.18 btw…), and I got the same error aboout the pulp path being invalid. No big deal, went back to change it to three slashes. But now I can’t.
I am getting a conflict with the previous task (Update Repository…), and it’s in a paused state. I cannot for the life of me fgure out how to get rid of that task to prevent the conflict. I can’t kill it, and force-killing it doesnt work eiither, it’s still there. Resuming it doesn’t do anything, still in an error state.
I tried unlocking it, and that seems to have unlocked it, but then it’s back to an ERROR state, and I still gewt a task conflict with the repo when tryying to make the edit. arrggh…
Help?