pulp / pulpcore

Pulp 3 pulpcore package https://pypi.org/project/pulpcore/
GNU General Public License v2.0
300 stars 115 forks source link

The `analyze-publication` management command shows a warning #3174

Open dralley opened 2 years ago

dralley commented 2 years ago

Version pulpcore 3.18

Describe the bug

Warning messages are printed when using the analyze-publication management command

# PULP_SETTINGS=/etc/pulp/settings.py pulpcore-manager analyze-publication --distribution-base-path 'RedHat/Library/content/dist/rhel/server/7/7.9/x86_64/kickstart' | grep vmlinuz -A2
System check identified some issues:

WARNINGS:
?: (guardian.W001) Guardian authentication backend is not hooked. You can add this in settings as eg: `AUTHENTICATION_BACKENDS = ('django.contrib.auth.backends.ModelBackend', 'guardian.backends.ObjectPermissionBackend')`.
images/pxeboot/vmlinuz
└─ Storage path: /var/lib/pulp/media/artifact/9f/67343147f945a5e75f14e9012315d8300d78fb67b1a35db1e561b0b261c06c
└─ Artifact href: /pulp/api/v3/artifacts/6a5c1151-ebd2-485e-a718-66c119f17a10

# PULP_SETTINGS=/etc/pulp/settings.py pulpcore-manager analyze-publication --distribution-base-path 'RedHat/Library/content/dist/rhel/server/7/7.9/x86_64/kickstart' --tabular
System check identified some issues:

WARNINGS:
?: (guardian.W001) Guardian authentication backend is not hooked. You can add this in settings as eg: `AUTHENTICATION_BACKENDS = ('django.contrib.auth.backends.ModelBackend', 'guardian.backends.ObjectPermissionBackend')`.
CommandError: 'prettytable' package must be installed.

To Reproduce

  1. Install a Satellite 6.12 with Organization name RedHat

  2. Enable RHEL 7.9 Kickstart repo and sync it with immediate download policy.

  3. Find out it's distribution_path

  4. Run "pulpcore-manager analyze-publication" against the same with and without --tabular option.

Expected behavior No warning messages

Additional context

https://bugzilla.redhat.com/show_bug.cgi?id=2124637

dralley commented 2 years ago

This is likely not specific to the analyze-publication command at all.

mdellweg commented 2 years ago

Maybe it's a setting error and guardian complains rightfully that it is not set as an authentication backend.