Project

Profile

Help

Issue #2418

pulp-admin rpm provider lost auto-publish

Added by darkfader about 5 years ago. Updated over 2 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
1. Low
Version:
2.10.0
Platform Release:
OS:
CentOS 7
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Documentation, Easy Fix, Pulp 2
Sprint:
Quarter:

Description

Hi,

there's a quite big issue with the rpm module.
There's a supposed to be a flag named auto-publish, which is needed if you don't want to expose the raw upstream (feed=url) repositories to the clients.
This flag was there intentionally, and it's been there since v1.
It's now MIA, but as far as I could find out it is only missing in RPM, and only since we went to 2.10.0 (from 2.8)

I asked on IRC about this but was asked for a backtrace - there's no backtrace, the option itself is gone.


  #  pulp-admin rpm repo create --repo-id testname --autopublish false

Pulp replies with

The following options were specified but do not exist on the command:
  --autopublish

I've spent a lot time trying to find out why/how/where this happened, but found no hint of it.
Since other types (docker, python) seem to still have it, I am assuming this was a mistake.

I'm marking this as a blocker, since it's quite a bit of a problem for everyone using that.
Please, put an eye on this, when you can.

Also marked as easy fix, assuming someone is better at me at finding out what happened.

History

#1 Updated by darkfader about 5 years ago

I also don't know where it is actually missing, i.e. here we still got it:
/usr/lib/python2.7/site-packages/pulp_rpm/extensions/admin/repo_options.py

  1. publish options
    d = _('if "true", on each successful sync the repository will automatically be '
    'published on the configured protocols; if "false" synchronized content '
    'will only be available after manually publishing the repository; '
    'defaults to "true"')
    OPT_AUTO_PUBLISH = PulpCliOption('--auto-publish', d, required=False,
    parse_func=parsers.parse_boolean)

So, it would be great if someone can at least confirm it's supposed to work.
I have two servers that pretend it's not there.

#3 Updated by mhrivnak about 5 years ago

Thanks for the bug report.

I am having trouble finding any release of pulp_rpm that did include --auto-publish on the repo create or update command. It looks like that option is available in code, but is unused. It gets instantiated, but never added to a command.

I grepped all 2.8 releases for OPT_AUTO_PUBLISH, auto-publish, and autopublish as shown below. I didn't find anywhere that any of them get used.

I did find this line of code commented out, with a comment from 2012 explaining why:

https://github.com/pulp/pulp_rpm/blob/2.10-release/extensions_admin/pulp_rpm/extensions/admin/repo_options.py#L124

So it looks to me like this has never been available in pulp_rpm, but if you can help us identify a release where it was available, that would bump our priority for adding it back.

$ echo $TAGS
pulp-rpm-2.8.0-1 pulp-rpm-2.8.1-1 pulp-rpm-2.8.2-1 pulp-rpm-2.8.3-1 pulp-rpm-2.8.4-1 pulp-rpm-2.8.5-1 pulp-rpm-2.8.6-1 pulp-rpm-2.8.7-1
[mhrivnak@dhcp129-40 pulp_rpm]$ for T in $TAGS; do git checkout -q $T; grep -r OPT_AUTO_PUBLISH; done
Binary file extensions_admin/pulp_rpm/extensions/admin/repo_options.pyc matches
extensions_admin/pulp_rpm/extensions/admin/repo_options.py:OPT_AUTO_PUBLISH = PulpCliOption('--auto-publish', d, required=False,
extensions_admin/pulp_rpm/extensions/admin/repo_options.py:    # publish_group.add_option(OPT_AUTO_PUBLISH)
Binary file extensions_admin/pulp_rpm/extensions/admin/repo_options.pyc matches
extensions_admin/pulp_rpm/extensions/admin/repo_options.py:OPT_AUTO_PUBLISH = PulpCliOption('--auto-publish', d, required=False,
extensions_admin/pulp_rpm/extensions/admin/repo_options.py:    # publish_group.add_option(OPT_AUTO_PUBLISH)
Binary file extensions_admin/pulp_rpm/extensions/admin/repo_options.pyc matches
extensions_admin/pulp_rpm/extensions/admin/repo_options.py:OPT_AUTO_PUBLISH = PulpCliOption('--auto-publish', d, required=False,
extensions_admin/pulp_rpm/extensions/admin/repo_options.py:    # publish_group.add_option(OPT_AUTO_PUBLISH)
Binary file extensions_admin/pulp_rpm/extensions/admin/repo_options.pyc matches
extensions_admin/pulp_rpm/extensions/admin/repo_options.py:OPT_AUTO_PUBLISH = PulpCliOption('--auto-publish', d, required=False,
extensions_admin/pulp_rpm/extensions/admin/repo_options.py:    # publish_group.add_option(OPT_AUTO_PUBLISH)
Binary file extensions_admin/pulp_rpm/extensions/admin/repo_options.pyc matches
extensions_admin/pulp_rpm/extensions/admin/repo_options.py:OPT_AUTO_PUBLISH = PulpCliOption('--auto-publish', d, required=False,
extensions_admin/pulp_rpm/extensions/admin/repo_options.py:    # publish_group.add_option(OPT_AUTO_PUBLISH)
Binary file extensions_admin/pulp_rpm/extensions/admin/repo_options.pyc matches
extensions_admin/pulp_rpm/extensions/admin/repo_options.py:OPT_AUTO_PUBLISH = PulpCliOption('--auto-publish', d, required=False,
extensions_admin/pulp_rpm/extensions/admin/repo_options.py:    # publish_group.add_option(OPT_AUTO_PUBLISH)
Binary file extensions_admin/pulp_rpm/extensions/admin/repo_options.pyc matches
extensions_admin/pulp_rpm/extensions/admin/repo_options.py:OPT_AUTO_PUBLISH = PulpCliOption('--auto-publish', d, required=False,
extensions_admin/pulp_rpm/extensions/admin/repo_options.py:    # publish_group.add_option(OPT_AUTO_PUBLISH)
Binary file extensions_admin/pulp_rpm/extensions/admin/repo_options.pyc matches
extensions_admin/pulp_rpm/extensions/admin/repo_options.py:OPT_AUTO_PUBLISH = PulpCliOption('--auto-publish', d, required=False,
extensions_admin/pulp_rpm/extensions/admin/repo_options.py:    # publish_group.add_option(OPT_AUTO_PUBLISH)

#4 Updated by darkfader about 5 years ago

I think we started out in 2.3/2.4, maybe I had somehow re-enabled it to 2.8...
I'm having a hard time finding out about that too, otherwise I'd have included the info.

I know it was there because it's been part of the release process.
I'll try to uncomment that line and see what happens.
My memory says if one tries to publish a repo that has neither enabled, things get ugly, but not uglier than not having the option at all.

Do you think the "fixme" from 2012 is still valid?
To me it sounds like it was removed back then and is concerned about updating the flag.
I'm also certain that never worked. But giving it at creation? it was possible.
Maybe it had some bugs and got turned off, that's what it sounds like.

I'll see how I can get to this. Either I set up some outdated pulp server or something else I can't think of now.

Logic tells me it's been there. Take a step back: any of those flags must've originally gone back to the RPM mode. It's even been in the v1 manual. I think I also came across a few list posts that had it disabled in V2.
At some point it was temporarily disabled because of the mentioned API issue. and then it apparently got lost :-)

I'll dig into old versions and report back.
My priority is to just turn it back on though :-)

#5 Updated by mhrivnak about 5 years ago

I tried uncommenting that option and using it, but it did not work. No errors were seen, but the setting did not get changed.

For now, you can change the value of the auto_publish setting using the API directly like this:

curl -X PUT -d '{"delta": {"auto_publish": true}, "distributor_config": {}}' -E ~/.pulp/user-cert.pem https://localhost/pulp/api/v2/repositories/zoo/distributors/yum_distributor/

#6 Updated by darkfader about 5 years ago

Thanks! I had no recollection of how to do that via curl + api ;-)

#7 Updated by bizhang about 5 years ago

  • Checklist item clean up vestigial --auto-publish code from pulp 1.x added
  • Checklist item document the 'auto_publish' feature of distributors with example API calls added
  • Severity changed from 2. Medium to 1. Low
  • Triaged changed from No to Yes
  • Tags Documentation added

#8 Updated by bmbouter almost 3 years ago

  • Status changed from NEW to CLOSED - WONTFIX

#9 Updated by bmbouter almost 3 years ago

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.

#10 Updated by bmbouter almost 3 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF