-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #27398 - enable ansible collection smart proxy content sync #8974
Fixes #27398 - enable ansible collection smart proxy content sync #8974
Conversation
Issues: #27398 |
88efdba
to
b270a9d
Compare
8e30cf0
to
3a53249
Compare
@jjeffers : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jjeffers :
Can you paste the versions of pulpcore and plugins on your dev box and proxy. I am seeing some issues with file proxy sync I am guessing are because of version mismatch.
Development (katello host)
{
"versions": [
{
"component": "pulpcore",
"version": "3.7.0"
},
{
"component": "pulp_rpm",
"version": "3.7.0"
},
{
"component": "pulp_file",
"version": "1.3.0"
},
{
"component": "pulp_ansible",
"version": "0.4.1"
}
],
devel proxy
{
"versions": [
{
"component": "pulpcore",
"version": "3.7.1"
},
{
"component": "pulp_2to3_migration",
"version": "0.6.0.dev0"
},
{
"component": "pulp_file",
"version": "1.4.0.dev0"
},
{
"component": "pulp_container",
"version": "2.1.0"
},
{
"component": "pulp_ansible",
"version": "0.4.1"
},
{
"component": "pulp_certguard",
"version": "1.1.0.dev0"
},
{
"component": "pulp_rpm",
"version": "3.7.0"
}
]
@@ -91,10 +91,11 @@ def distribution_options(path, options = {}) | |||
|
|||
def remote_options | |||
base_options = common_remote_options | |||
base_options.merge(url: remote_feed_url) | |||
base_options.merge!(url: remote_feed_url) | |||
if (type_specific_options = repo_service.try(:mirror_remote_options)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bug seemed to manifest where not all options would be merged if this test failed (mirror remote options threw an exception).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I was hitting this..Let me test with this change..I was seeing the remote issue on master branch..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not 100% convinced that it's a bug as long as the repository service sub-class provides a hash value. I would like folks to really tear down this change and if they agree it's a problem, we should change it. Otherwise, I'd rather keep the original implementation to avoid unneeded changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you able to sync file repos to the proxy?
I am hitting this:
Error: ArgumentError
The input argument (attributes) must be a hash in `PulpFileClient::FileFileRemote` initialize method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only tried yum. Does this happen on master?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, hey I wonder if the file repository service sub-class implements the mirror_repository_options?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started with files. Although my proxy is 3.6 pulpcore. The file plugin is up to date. If you are able to reproduce, that would be something we might want to fix for 3.6 as well?
Spinning up a 3.7 proxy to test the ansible piece.
So I am seeing the error on proxy sync: I am guessing it's something to do with apache config..I can hit that URL on my master and see results.. |
Yup, that's the same debugging route I did when I couldn't hit that URL from the proxy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works well for ansible collections. Able to see content synced to proxies with changes to apache config.
Fixes file and yum capsule sync with the remote option change as well.
ACK 👍
Fixes #27938 - removing this mistake
2b96c46
to
f9d827b
Compare
This PR enables ansible collection content syncing with remote proxies.
There are a few pre-requisites to this PR.
First is to have pulp_ansible v0.4.1 installed on both the the katello host and the remote proxy.
Both the katello host and the remote proxy must have support displayed for ansible_collection under the Pulpcore section in the Smart Proxies -> Services tab.
In the Foreman config/settings.plugins.d/katello.yml on the katello/pulp primary ensure that:
:ansible_collection: true
is present in the content types.
To support the remote proxy with reverse proxy mapping to pulpcore on the katello host, a http conf should be created on the katello/pulp primary, similar to:
Also update the /etc/httpd/conf.d/05-foreman-ssl.conf with:
Create a new product and repository of the ansible_collection type, using the galaxy api url such as
https://galaxy-dev.ansible.com/api/v2/collections/testing/ansible_testing_content
.Sync that repository. You should now have content available on the katello host (but not the remote proxy... yet).
You can check that the http configuration is correct by issuing an HTTP request for that content via the pulpcore galaxy API:
curl https://centos7-katello-devel-stable.example.com/pulp_ansible/galaxy/Default_Organization/Library/custom/test/test-ansible/api/v2/collections/
And the result should be:
You are now ready to kick off a remote proxy sync. Go to Smart Proxies -> , click the "Synchonize" button and choose "Complete Sync".
Check the UI for the proxy by checkin the "Content" tab. Although the number of collections is not (currently) shown, if there was no previous content sync'd, you should now see a Library content view with a product present.
Check the pulpcore schema on the proxy:
The content/artifacts should match on both the katello host and on the proxy.
Attached files from katello/pulp primary:
/etc/httpd/conf.d/05-foreman-ssl.conf
/etc/httpd/conf.d/05-foreman-ssl.d/pulp_ansible.conf
IMPORTANT for the katello master update your
/etc/pulp/settings.py
: