Project

Profile

Help

Issue #2095

closed

Publishing with the rpm_rsync_distributor without first publishing with the yum_distributor causes a traceback

Added by bmbouter almost 8 years ago. Updated almost 4 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

Let the file rsync_distributor_config.json have contents similar to the snippet below.

{
    "distributor_id": "rpm_rsync_distributor",
    "distributor_type_id": "rpm_rsync_distributor",
    "distributor_config": {
        "remote": {
            "auth_type": "publickey",
            "ssh_user": "57840d112d527166ac000259",
            "ssh_identity_file": "/home/vagrant/openshift",
            "host": "rsync-bmbouter.rhcloud.com",
            "root": "/var/lib/openshift/57840d112d527166ac000259/app-root/repo/diy"
        },
        "predistributor_id": "yum_distributor"
    }
}

Let the publish_rsync.json file have these contents:


{
  "id": "rpm_rsync_distributor",
  "override_config": {"skip_fast_forward": true}
}

Now consider this reproducer:

pulp-admin rpm repo delete --repo-id zoo
pulp-admin orphan remove --all
pulp-admin rpm repo create --repo-id zoo --feed https://repos.fedorapeople.org/repos/pulp/pulp/fixtures/rpm/
http --verify no --auth admin:admin POST https://localhost/pulp/api/v2/repositories/zoo/distributors/ < rsync_distributor_config.json
# pulp-admin rpm repo sync run --repo-id zoo
http --verify no --auth admin:admin POST https://localhost/pulp/api/v2/repositories/zoo/actions/publish/ < publish_rsync.json

Observe that the original yum_distributor publish is commented out so it isn't actually run. When running this reproducer you will receive a traceback like this one:

Task pulp.server.managers.repo.publish.publish[0048d7e9-c687-4eb0-9eb8-537b2ed2fa23] raised unexpected: OSError(2, 'No such file or directory')
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/home/vagrant/devel/pulp/server/pulp/server/async/tasks.py", line 488, in __call__
    return super(Task, self).__call__(*args, **kwargs)
  File "/home/vagrant/devel/pulp/server/pulp/server/async/tasks.py", line 103, in __call__
    return super(PulpTask, self).__call__(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 438, in __protected_call__ 
    return self.run(*args, **kwargs)
  File "/home/vagrant/devel/pulp/server/pulp/server/controllers/repository.py", line 971, in publish
    result = check_publish(repo_obj, dist_id, dist_inst, transfer_repo, conduit, call_config)
  File "/home/vagrant/devel/pulp/server/pulp/server/controllers/repository.py", line 1038, in check_publish
    result = _do_publish(repo_obj, dist_id, dist_inst, transfer_repo, conduit, call_config)
  File "/home/vagrant/devel/pulp/server/pulp/server/controllers/repository.py", line 1090, in _do_publish
    publish_report = publish_repo(transfer_repo, conduit, call_config)
  File "/home/vagrant/devel/pulp/server/pulp/server/async/tasks.py", line 673, in wrap_f
    return f(*args, **kwargs)
  File "/home/vagrant/devel/pulp_rpm/plugins/pulp_rpm/plugins/distributors/rsync/distributor.py", line 122, in publish_repo
    TYPE_ID_DISTRIBUTOR_RPM_RSYNC)
  File "/home/vagrant/devel/pulp/server/pulp/plugins/rsync/publish.py", line 310, in __init__
    self._add_necesary_steps(date_filter=date_filter, config=config)
  File "/home/vagrant/devel/pulp_rpm/plugins/pulp_rpm/plugins/distributors/rsync/publish.py", line 98, in _add_necesary_steps
    repodata_file_list = os.listdir(os.path.join(master_dir, 'repodata')) 
OSError: [Errno 2] No such file or directory: '/var/lib/pulp/published/yum/https/repos/repos/pulp/pulp/fixtures/rpm/repodata'
Actions #1

Updated by amacdona@redhat.com almost 8 years ago

  • Triaged changed from No to Yes
Actions #2

Updated by semyers almost 8 years ago

  • Tags Known Issue for Release Notes added
Actions #3

Updated by Ichimonji10 over 7 years ago

Test case pulp_smash.tests.rpm.api_v2.test_rsync_distributor.PublishBeforeYumDistTestCase targets this issue. An easy way to see whether this issue still affects Pulp is to run the test with the following command, then check the system's logs with journalctl:

python -m unittest2 pulp_smash.tests.rpm.api_v2.test_rsync_distributor.PublishBeforeYumDistTestCase
Actions #4

Updated by bmbouter about 5 years ago

  • Status changed from NEW to CLOSED - WONTFIX

Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.

Actions #5

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added
Actions #6

Updated by bmbouter almost 4 years ago

  • Tags deleted (Known Issue for Release Notes)

Also available in: Atom PDF