Story #1759
closedStory #1990: Rsync distributor
As a user, I can use rsync distributor to publish RPM repositores
Added by moegyver over 8 years ago. Updated over 5 years ago.
100%
Description
Pulp users often want to make content available from multiple web servers. This is beneficial in situations where content needs to be highly available or the same content needs to be available in different geographic locations.
Summary
The rsync distributor enables the user to publish a portion or all of the content units associated with a repository to a remote server.
Each plugin has its own implementation of the rsync distributor. The RPM rsync distributor has to be used in conjunction with yum_distributor as its predistributor.
The predistributor is used to perform the initial publish of a repository. The postdistributor performs the second phase of the publish.
How rsync postdistributor works for RPM plugin
The rsync publish consists of 4 steps: content units query, content units publish, symlinks to content units publish, extra data publish.
The only predistributor supported by the RPM rsync postdistributor is the yum_distributor. When performing a publish with the rsync postdistributor, only content that has already been published by the yum_distributor is published.
Units selected for publish
By default, rsync distributor publishes in fast-forward mode. In this mode, only content units that were associated with the repository after the last rsync publish and before the last yum_distributor publish are selected for publishing.
If the yum_distributor performed a non-fastforward publish, the rsync distributor selects all units associated with the repository before the yum_distributor publish. If the previous publish with the rsync distributor failed, the rsync distributor selects all units ssociated with the repository before the yum_distributor's last publish date.
Symlinks are created
Once units are selected for transfer to the remote server, a relative symlink is created for each unit inside the worker's working directory. E.g. /var/cache/pulp/worker1/taskuuid/.relative
Content is rsynced to the remote server
Files from /var/lib/content backing content units selected earlier are transferred to the remote server. Each type of unit is transferred to /<remote_root>/content/origin/<type>/ directory on the remote server.
Symlinks rsynced to the remote server
All the symlinks from previous step are transferred to the remote server.
Repo metadata rsynced to the remote server
The content of repodata directory is transferred to the remote server.
How rsync postdistributor works for Docker plugin
Files
rpm_rsync_test_plan.txt (7.27 KB) rpm_rsync_test_plan.txt | bmbouter, 08/02/2016 06:07 PM |
Updated by bmbouter over 8 years ago
- Tracker changed from Issue to Story
- Subject changed from deterministic behaviour for metadata generation in yum_distributor/rsync distributor to As a user, I have deterministic behaviour for metadata generation in yum_distributor/rsync distributor
- Parent issue set to #1683
- Groomed set to No
- Sprint Candidate set to No
Updated by dkliban@redhat.com over 8 years ago
- Subject changed from As a user, I have deterministic behaviour for metadata generation in yum_distributor/rsync distributor to As a user, I can use rsync distributor to publish RPM and Docker repositores
- Description updated (diff)
- Status changed from NEW to ASSIGNED
- Assignee set to dkliban@redhat.com
Updated by dkliban@redhat.com over 8 years ago
- Sprint Candidate changed from No to Yes
Updated by mhrivnak over 8 years ago
One consideration: for pulp_docker publishes, there is in many cases a need to copy files to two different places. The crane metadata file goes to wherever crane is running, and the rest of the image-related files go to some other web server that makes those files available.
A potential way to handle this is to allow multiple instances of the distributor to be associated with one repo, and let each specify which files it applies to and what the destination is.
Updated by bmbouter over 8 years ago
The workflow is that two distributors are called in a specific order. Is the user expected to make both calls or is there some kind of auto dispatching that happens?
Updated by dkliban@redhat.com over 8 years ago
- Blocked by Story #1887: As a user, I can use the rsync predistributor with docker web distributor added
Updated by mhrivnak over 8 years ago
bmbouter wrote:
The workflow is that two distributors are called in a specific order. Is the user expected to make both calls or is there some kind of auto dispatching that happens?
The auto-publish feature of pulp should automatically invoke all of the distributors that are associated.
Updated by mhrivnak over 8 years ago
- Sprint/Milestone set to 20
- Groomed changed from No to Yes
Updated by dkliban@redhat.com over 8 years ago
The rsync distributor needs to have 4 features:
1) Rsync content needed for the publish
2) Rewrite symlinks to be relative symlinks
3) Deduplicate the remote filesystem (make sure that content is present once and only symlinks live in published directories)
4) Ensure paths to published content on remote system are in proper order
Updated by dkliban@redhat.com over 8 years ago
- Blocked by deleted (Story #1887: As a user, I can use the rsync predistributor with docker web distributor)
Updated by dkliban@redhat.com over 8 years ago
- Blocks Story #1887: As a user, I can use the rsync predistributor with docker web distributor added
Updated by dkliban@redhat.com over 8 years ago
- Subject changed from As a user, I can use rsync distributor to publish RPM and Docker repositores to As a user, I can use rsync distributor to publish RPM repositores
- Parent issue changed from #1683 to #1990
Updated by dkliban@redhat.com over 8 years ago
- Blocks deleted (Story #1887: As a user, I can use the rsync predistributor with docker web distributor)
Updated by dkliban@redhat.com over 8 years ago
- Sprint/Milestone changed from 21 to 22
Updated by dkliban@redhat.com over 8 years ago
- Status changed from ASSIGNED to POST
Updated by bmbouter over 8 years ago
- File rpm_rsync_test_plan.txt added
For QE, here is the test plan that we have been using. This was also being stored here. https://etherpad.net/p/aQ5pqM5j0k
Added by dkliban@redhat.com over 8 years ago
Added by dkliban@redhat.com over 8 years ago
Revision fd43b1e7 | View on GitHub
Adds RPM rsync distributor
The RPM rsync distributor allows a user to publish an already published RPM repo to a remote server.
Updated by dkliban@redhat.com over 8 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset pulp_rpm:fd43b1e775d3d1ac9d983c2789887aa08582fff2.
Added by dkliban@redhat.com over 8 years ago
Revision 0e8efde4 | View on GitHub
Merge pull request #949 from dkliban/fix-cancel-rsync-publish
Removes cancel_publish_repo methods from the rsync distributors
re #1963 https://pulp.plan.io/issues/1963 re #1759 https://pulp.plan.io/issues/1759
Added by dkliban@redhat.com over 8 years ago
Revision dcc8fe5a | View on GitHub
Removes docs about password authentication for rsync publishes
re #1963 https://pulp.plan.io/issues/1963 re #1759 https://pulp.plan.io/issues/1759
Added by dkliban@redhat.com over 8 years ago
Revision fd627ea3 | View on GitHub
Removes ability to use password authentication when performing publishes using rsync
re #1887 https://pulp.plan.io/issues/1887 re #1963 https://pulp.plan.io/issues/1963 re #1759 https://pulp.plan.io/issues/1759
Added by dkliban@redhat.com over 8 years ago
Revision fd627ea3 | View on GitHub
Removes ability to use password authentication when performing publishes using rsync
re #1887 https://pulp.plan.io/issues/1887 re #1963 https://pulp.plan.io/issues/1963 re #1759 https://pulp.plan.io/issues/1759
Added by dkliban@redhat.com over 8 years ago
Revision b7aeeacf | View on GitHub
Fixes logic used to skip publishes based on predistributor.
Also removes extraneous code from rsync.
re #1887 https://pulp.plan.io/issues/1887 re #1963 https://pulp.plan.io/issues/1963 re #1759 https://pulp.plan.io/issues/1759
Added by dkliban@redhat.com over 8 years ago
Revision b7aeeacf | View on GitHub
Fixes logic used to skip publishes based on predistributor.
Also removes extraneous code from rsync.
re #1887 https://pulp.plan.io/issues/1887 re #1963 https://pulp.plan.io/issues/1963 re #1759 https://pulp.plan.io/issues/1759
Updated by bmbouter over 8 years ago
- File rpm_rsync_test_plan.txt rpm_rsync_test_plan.txt added
Adding a new version of the test plan which has been updated in the following ways:
- Removed the password auth since that portion of the feature has been removed
- skip_fast_forward was renamed to force_full
Updated by Ichimonji10 over 8 years ago
I'm trying to create an rsync distributor by issuing an HTTP POST request to /pulp/api/v2/repositories/
with the following body:
{
"distributors": [
{
"distributor_type_id": "yum_distributor",
"distributor_id": "0c991ad7-139d-4c40-9390-71891f423d6c",
"distributor_config": {
"relative_url": "4b4cb83f-e42b-460a-8214-e63837e51b46/",
"https": true,
"http": true
},
"auto_publish": false
},
{
"distributor_type_id": "rpm_rsync_distributor",
"distributor_id": "99d50d72-9d96-4766-9402-da7f8db8eda3",
"distributor_config": {
"remote": {
"auth_type": "password",
"ssh_password": "b321722b-ea3b-4eb2-bb87-2f932f56fc1a",
"ssh_user": "8b517d4c-9d77-49b1-9b67-718d9779",
"root": "/home/8b517d4c-9d77-49b1-9b67-718d9779",
"host": "pulp.example.com"
},
"predistributor_id": "0c991ad7-139d-4c40-9390-71891f423d6c"
}
}
],
"importer_config": {
"feed": "https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm/"
},
"notes": {
"_repo-type": "rpm-repo"
},
"id": "e2353f07-eee5-439a-9d63-74e7b8304634",
"importer_type_id": "yum_importer"
}
The request fails, and the following lines are dumped to the system log:
Aug 16 11:15:13 pulp.example.com pulp[6282]: pulp.server.controllers.repository:ERROR: (6282-96000) Exception adding distributor to repo [7f22804e-27ea-4319-986b-6c16e72719e3]; the repo will be deleted
Aug 16 11:15:13 pulp.example.com pulp[6282]: pulp.server.controllers.repository:ERROR: (6282-96000) Traceback (most recent call last):
Aug 16 11:15:13 pulp.example.com pulp[6282]: pulp.server.controllers.repository:ERROR: (6282-96000) File "/usr/lib/python2.7/site-packages/pulp/server/controllers/repository.py", line 425, in create_repo
Aug 16 11:15:13 pulp.example.com pulp[6282]: pulp.server.controllers.repository:ERROR: (6282-96000) dist_controller.add_distributor(repo_id, type_id, plugin_config, auto_publish, dist_id)
Aug 16 11:15:13 pulp.example.com pulp[6282]: pulp.server.controllers.repository:ERROR: (6282-96000) File "/usr/lib/python2.7/site-packages/pulp/server/controllers/distributor.py", line 77, in add_distributor
Aug 16 11:15:13 pulp.example.com pulp[6282]: pulp.server.controllers.repository:ERROR: (6282-96000) raise exceptions.PulpDataException(message)
Aug 16 11:15:13 pulp.example.com pulp[6282]: pulp.server.controllers.repository:ERROR: (6282-96000) PulpDataException: 'remote' dict missing in distributor's configuration
Aug 16 11:15:13 pulp.example.com pulp[6282]: pulp.server.webservices.middleware.exception:INFO: 'remote' dict missing in distributor's configuration
Am I doing something wrong?
Updated by dkliban@redhat.com over 8 years ago
1. In the final implementation I removed the password authentication option for security reasons. So the auth_type field is no longer needed. I will remove it from the example in the docs.
2. I believe you are getting the wrong error message when the failure is actually not having ssh_identity_file defined in the config.
Updated by Ichimonji10 over 8 years ago
Ahh, gotcha. Thanks. I was looking at the outdated https://github.com/pulp/pulp_rpm/pull/931/files , not the current https://github.com/pulp/pulp_rpm/blob/master/docs/tech-reference/rsync-distributor.rst .
Updated by Ichimonji10 over 8 years ago
I've written two automated test cases for this feature, and so far, the feature seems broken. See: https://github.com/PulpQE/pulp-smash/pull/360
The first test case currently does the following: (More functionality is planned.)
1. Create a repository with a feed, yum distributor and rsync distributor. Sync the repository.
2. Publish the repository with the rsync distributor. Verify that the correct files are in in the target directory.
Note that this definitely should work. As the issue description states, it's possible to use the rsync distributor by itself.
The second test case currently does the following: (Again, more functionality is planned.)
1. Create a repository with a feed, yum distributor and rsync distributor. Sync the repository.
2. Publish the repository with the yum distributor.
3. Publish the repository with the rsync distributor. Verify that the correct files are in in the target directory.
The first test case fails on step 2. Here's the traceback from the logs:
Aug 16 16:06:10 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) Exception caught from plugin during publish for repo [1984c965-b670-4d45-ae5f-0cd4df0383e4]
Aug 16 16:06:10 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) Traceback (most recent call last):
Aug 16 16:06:10 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) File "/usr/lib/python2.7/site-packages/pulp/server/controllers/repository.py", line 1110, in _do_publish
Aug 16 16:06:10 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) publish_report = publish_repo(transfer_repo, conduit, call_config)
Aug 16 16:06:10 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 673, in wrap_f
Aug 16 16:06:10 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) return f(*args, **kwargs)
Aug 16 16:06:10 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/distributors/rsync/distributor.py", line 102, in publish_repo
Aug 16 16:06:10 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) TYPE_ID_DISTRIBUTOR_RPM_RSYNC)
Aug 16 16:06:10 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) File "/usr/lib/python2.7/site-packages/pulp/plugins/rsync/publish.py", line 325, in __init__
Aug 16 16:06:10 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) self._add_necesary_steps(date_filter=date_filter, config=config)
Aug 16 16:06:10 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/distributors/rsync/publish.py", line 101, in _add_necesary_steps
Aug 16 16:06:10 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) repodata_file_list = os.listdir(os.path.join(master_dir, 'repodata'))
Aug 16 16:06:10 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) OSError: [Errno 2] No such file or directory: '/var/lib/pulp/published/yum/https/repos/4c2191be-3897-4dde-9030-49a992eb4c7d/repodata'
Aug 16 16:06:10 pulp.example.com pulp[6695]: pulp.server.async.tasks:INFO: Task failed : [865ce0fe-7f98-4e8a-9b49-e53cb1dad720]
Aug 16 16:06:10 pulp.example.com pulp[6455]: celery.worker.job:ERROR: (6455-41696) Task pulp.server.managers.repo.publish.publish[865ce0fe-7f98-4e8a-9b49-e53cb1dad720] raised unexpected: OSError(2, 'No such file or directory')
Aug 16 16:06:10 pulp.example.com pulp[6455]: celery.worker.job:ERROR: (6455-41696) Traceback (most recent call last):
Aug 16 16:06:10 pulp.example.com pulp[6455]: celery.worker.job:ERROR: (6455-41696) File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
Aug 16 16:06:10 pulp.example.com pulp[6455]: celery.worker.job:ERROR: (6455-41696) R = retval = fun(*args, **kwargs)
Aug 16 16:06:10 pulp.example.com pulp[6455]: celery.worker.job:ERROR: (6455-41696) File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 488, in __call__
Aug 16 16:06:10 pulp.example.com pulp[6455]: celery.worker.job:ERROR: (6455-41696) return super(Task, self).__call__(*args, **kwargs)
Aug 16 16:06:10 pulp.example.com pulp[6455]: celery.worker.job:ERROR: (6455-41696) File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 103, in __call__
Aug 16 16:06:10 pulp.example.com pulp[6455]: celery.worker.job:ERROR: (6455-41696) return super(PulpTask, self).__call__(*args, **kwargs)
Aug 16 16:06:10 pulp.example.com pulp[6455]: celery.worker.job:ERROR: (6455-41696) File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 437, in __protected_call__
Aug 16 16:06:10 pulp.example.com pulp[6455]: celery.worker.job:ERROR: (6455-41696) return self.run(*args, **kwargs)
Aug 16 16:06:10 pulp.example.com pulp[6455]: celery.worker.job:ERROR: (6455-41696) File "/usr/lib/python2.7/site-packages/pulp/server/controllers/repository.py", line 971, in publish
Aug 16 16:06:10 pulp.example.com pulp[6455]: celery.worker.job:ERROR: (6455-41696) result = check_publish(repo_obj, dist_id, dist_inst, transfer_repo, conduit, call_config)
Aug 16 16:06:10 pulp.example.com pulp[6455]: celery.worker.job:ERROR: (6455-41696) File "/usr/lib/python2.7/site-packages/pulp/server/controllers/repository.py", line 1058, in check_publish
Aug 16 16:06:10 pulp.example.com pulp[6455]: celery.worker.job:ERROR: (6455-41696) result = _do_publish(repo_obj, dist_id, dist_inst, transfer_repo, conduit, call_config)
Aug 16 16:06:10 pulp.example.com pulp[6710]: celery.worker.job:INFO: Task pulp.server.async.tasks._queue_reserved_task[0f414674-0a4d-4991-bade-5b344ec0ee1b] succeeded in 0.0375596350023s: None
Aug 16 16:06:10 pulp.example.com pulp[6455]: celery.worker.job:ERROR: (6455-41696) File "/usr/lib/python2.7/site-packages/pulp/server/controllers/repository.py", line 1110, in _do_publish
Aug 16 16:06:10 pulp.example.com pulp[6455]: celery.worker.job:ERROR: (6455-41696) publish_report = publish_repo(transfer_repo, conduit, call_config)
Aug 16 16:06:10 pulp.example.com pulp[6455]: celery.worker.job:ERROR: (6455-41696) File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 673, in wrap_f
Aug 16 16:06:10 pulp.example.com pulp[6455]: celery.worker.job:ERROR: (6455-41696) return f(*args, **kwargs)
Aug 16 16:06:10 pulp.example.com pulp[6455]: celery.worker.job:ERROR: (6455-41696) File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/distributors/rsync/distributor.py", line 102, in publish_repo
Aug 16 16:06:10 pulp.example.com pulp[6455]: celery.worker.job:ERROR: (6455-41696) TYPE_ID_DISTRIBUTOR_RPM_RSYNC)
Aug 16 16:06:10 pulp.example.com pulp[6455]: celery.worker.job:ERROR: (6455-41696) File "/usr/lib/python2.7/site-packages/pulp/plugins/rsync/publish.py", line 325, in __init__
Aug 16 16:06:10 pulp.example.com pulp[6455]: celery.worker.job:ERROR: (6455-41696) self._add_necesary_steps(date_filter=date_filter, config=config)
Aug 16 16:06:10 pulp.example.com pulp[6455]: celery.worker.job:ERROR: (6455-41696) File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/distributors/rsync/publish.py", line 101, in _add_necesary_steps
Aug 16 16:06:10 pulp.example.com pulp[6455]: celery.worker.job:ERROR: (6455-41696) repodata_file_list = os.listdir(os.path.join(master_dir, 'repodata'))
Aug 16 16:06:10 pulp.example.com pulp[6455]: celery.worker.job:ERROR: (6455-41696) OSError: [Errno 2] No such file or directory: '/var/lib/pulp/published/yum/https/repos/4c2191be-3897-4dde-9030-49a992eb4c7d/repodata'
Aug 16 16:06:10 pulp.example.com pulp[6455]: celery.worker.job:INFO: Task pulp.server.async.tasks._release_resource[b7ee4e37-3419-4a33-aaaf-45e73aeeae34] succeeded in 0.0172136059991s: None
This suggests to me that the rsync distributor is expecting a published yum repo to be present. This is wrong: the issue description states it's possible to use the rsync distributor by itself.
The second test case fails with this message in the logs:
Aug 16 16:08:54 pulp.example.com audit[13087]: AVC avc: denied { getattr } for pid=13087 comm="sh" path="/usr/bin/rsync" dev="dm-0" ino=2757983 scontext=system_u:system_r:celery_t:s0 tcontext=system_u:object_r:rsync_exec_t:s0 tclass=file permissive=0
Aug 16 16:08:54 pulp.example.com pulp[6695]: pulp.plugins.rsync.publish:ERROR: (6695-41696) Cannot create directory content/units: ['rsync', '-avr', '-f+ */', '-e', u'ssh -l 26616497-af31-455a-8674-894ac290 -i /tmp/tmp.pOQj2gFgtJ -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -S /tmp/rsync_distributor-%r@%h:%p -o "ControlMaster auto" -o "ControlPersist 10"', u'/var/cache/pulp/reserved_resource_worker-1@pulp.example.com/7d872ab5-69b0-40a9-91e0-bb79ea822e43/.tmp/', u'26616497-af31-455a-8674-894ac290@pulp.example.com:/home/26616497-af31-455a-8674-894ac290/']
Aug 16 16:08:54 pulp.example.com pulp[6695]: pulp.plugins.rsync.publish:ERROR: (6695-41696) /bin/sh: rsync: command not found
Aug 16 16:08:54 pulp.example.com pulp[6695]: pulp.plugins.rsync.publish:ERROR: (6695-41696)
Aug 16 16:08:54 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) Exception caught from plugin during publish for repo [2d2c133b-5bab-4332-aa38-c334a2093e59]
Aug 16 16:08:54 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) Traceback (most recent call last):
Aug 16 16:08:54 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) File "/usr/lib/python2.7/site-packages/pulp/server/controllers/repository.py", line 1110, in _do_publish
Aug 16 16:08:54 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) publish_report = publish_repo(transfer_repo, conduit, call_config)
Aug 16 16:08:54 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 673, in wrap_f
Aug 16 16:08:54 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) return f(*args, **kwargs)
Aug 16 16:08:54 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/distributors/rsync/distributor.py", line 103, in publish_repo
Aug 16 16:08:54 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) return self._publisher.publish()
Aug 16 16:08:54 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 704, in publish
Aug 16 16:08:54 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) return self.process_lifecycle()
Aug 16 16:08:54 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 563, in process_lifecycle
Aug 16 16:08:54 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) super(PluginStep, self).process_lifecycle()
Aug 16 16:08:54 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 160, in process_lifecycle
Aug 16 16:08:54 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) step.process()
Aug 16 16:08:54 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 250, in process
Aug 16 16:08:54 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) self._process_block()
Aug 16 16:08:54 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 294, in _process_block
Aug 16 16:08:54 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) self.process_main()
Aug 16 16:08:54 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) File "/usr/lib/python2.7/site-packages/pulp/plugins/rsync/publish.py", line 258, in process_main
Aug 16 16:08:54 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) raise PulpCodedException(message=output)
Aug 16 16:08:54 pulp.example.com pulp[6695]: pulp.server.controllers.repository:ERROR: (6695-41696) PulpCodedException: A general pulp exception occurred
Aug 16 16:08:54 pulp.example.com pulp[6695]: pulp.server.async.tasks:INFO: Task failed : [7d872ab5-69b0-40a9-91e0-bb79ea822e43] : A general pulp exception occurred
Note that rsync is installed, and selinux is enforcing. I've installed Pulp with the usual script I do: http://pastebin.com/BKAZhxen (Edit pulp_version
as appropriate.)
Updated by Ichimonji10 over 8 years ago
- Status changed from 5 to ASSIGNED
- Sprint Candidate changed from Yes to No
Updated by dkliban@redhat.com over 8 years ago
- Status changed from ASSIGNED to 5
The description of this issue needs to be updated. The final design required that a publish with yum_distributor occur before a publish with the rsync distributor. So the test case that is failing is not valid. Though I completely understand why you thought it should work.
Updated by Ichimonji10 over 8 years ago
- Status changed from 5 to ASSIGNED
Thanks for the info. I've updated the test cases. One test case publishes with the RPM rsync distributor without first publishing with the yum distributor, and it expects a failure. Another test case publishes first with the yum distributor, then the RPM rsync distributor, and expects success.
SNIP
You can see the full diff here: https://github.com/PulpQE/pulp-smash/pull/360
Updated by Ichimonji10 over 8 years ago
I've updated the test to ensure that the private key is owned by user "apache" and has permissions of 600. The publish still fails. Here's a current traceback from journalctl
:
SNIP
Updated by Ichimonji10 over 8 years ago
- Status changed from ASSIGNED to 5
Thanks for the feedback via IRC, dkliban. I've fixed the issues with the automated test case and am now getting down to the meat of the verification process.
Updated by Ichimonji10 about 8 years ago
- Status changed from 5 to 6
We have a reasonable level of automated testing for this feature in place. Verified against a Pulp 2.10.0 beta system provisioned this morning.
(pulp-smash2) [ichimonji10@beech:pulp-smash]$ git grep 1759
pulp_smash/tests/rpm/api_v2/test_rsync_distributor.py:For more information on the RPM rsync distributor, see `Pulp #1759`_.
pulp_smash/tests/rpm/api_v2/test_rsync_distributor.py:.. _Pulp #1759: https://pulp.plan.io/issues/1759
pulp_smash/tests/rpm/api_v2/test_rsync_distributor.py: * `Pulp #1759`_ is not implemented on the target Pulp server.
pulp_smash/tests/rpm/api_v2/test_rsync_distributor.py: .. _Pulp #1759: https://pulp.plan.io/issues/1759
pulp_smash/tests/rpm/api_v2/test_rsync_distributor.py: if selectors.bug_is_untestable(1759, config.get_config().version):
pulp_smash/tests/rpm/api_v2/test_rsync_distributor.py: raise unittest2.SkipTest('https://pulp.plan.io/issues/1759')
(pulp-smash2) [ichimonji10@beech:pulp-smash]$ python -m unittest2 pulp_smash.tests.rpm.api_v2.test_rsync_distributor
s...s..s.
----------------------------------------------------------------------
Ran 9 tests in 475.433s
OK (skipped=3)
(pulp-smash2) [ichimonji10@beech:pulp-smash]$ ssh $hostname rpm -qa | sort | grep -i pulp
pulp-admin-client-2.10.0-0.4.beta.fc24.noarch
pulp-docker-admin-extensions-2.1.0-0.2.beta.fc24.noarch
pulp-docker-plugins-2.1.0-0.2.beta.fc24.noarch
pulp-ostree-admin-extensions-1.1.3-1.fc24.noarch
pulp-ostree-plugins-1.1.3-1.fc24.noarch
pulp-puppet-admin-extensions-2.10.0-0.1.beta.fc24.noarch
pulp-puppet-plugins-2.10.0-0.1.beta.fc24.noarch
pulp-python-admin-extensions-1.1.3-1.fc24.noarch
pulp-python-plugins-1.1.3-1.fc24.noarch
pulp-rpm-admin-extensions-2.10.0-0.4.beta.fc24.noarch
pulp-rpm-plugins-2.10.0-0.4.beta.fc24.noarch
pulp-selinux-2.10.0-0.4.beta.fc24.noarch
pulp-server-2.10.0-0.4.beta.fc24.noarch
python-kombu-3.0.33-6.pulp.fc24.noarch
python-pulp-bindings-2.10.0-0.4.beta.fc24.noarch
python-pulp-client-lib-2.10.0-0.4.beta.fc24.noarch
python-pulp-common-2.10.0-0.4.beta.fc24.noarch
python-pulp-docker-common-2.1.0-0.2.beta.fc24.noarch
python-pulp-oid_validation-2.10.0-0.4.beta.fc24.noarch
python-pulp-ostree-common-1.1.3-1.fc24.noarch
python-pulp-puppet-common-2.10.0-0.1.beta.fc24.noarch
python-pulp-python-common-1.1.3-1.fc24.noarch
python-pulp-repoauth-2.10.0-0.4.beta.fc24.noarch
python-pulp-rpm-common-2.10.0-0.4.beta.fc24.noarch
python-pulp-streamer-2.10.0-0.4.beta.fc24.noarch
Updated by semyers about 8 years ago
- Status changed from 6 to CLOSED - CURRENTRELEASE
Adds rsync distributor publish steps to platform
This adds shared rsync distributor code. The classes provided need to be extended in each plugin that implements the rsync distributor.
re #1990