This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2172845 - Hammer is not propagating error message from production log when content-export fails
Summary: Hammer is not propagating error message from production log when content-expo...
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Inter Satellite Sync
Version: 6.13.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: stream
Assignee: Chris Roberts
QA Contact: Vladimír Sedmík
URL: https://projects.theforeman.org/issue...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-23 09:56 UTC by Vladimír Sedmík
Modified: 2024-06-06 16:08 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-06-06 16:08:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 36977 0 Normal Ready For Testing Hammer is not propagating error message from production log when content-export fails 2023-12-11 18:41:24 UTC
Github Katello katello pull 10823 0 None open Fixes #36977 - Force JSON on 400 to display proper hammer error message 2023-12-11 18:41:24 UTC
Red Hat Issue Tracker   SAT-19394 0 None Migrated None 2024-06-06 16:08:53 UTC

Description Vladimír Sedmík 2023-02-23 09:56:41 UTC
Description of problem:
When incremental syncable export fails for a valid reason (like filtered vs. unfiltered CV version is incrementally exported), hammer does not show the reason message from the production log.


Version-Release number of selected component (if applicable):
6.13.0 snap 11


How reproducible:
always


Steps to Reproduce:
1) Sync some RH repo like Ansible, sync it (with IMMEDIATE policy!)
2) Create a CV, add the repo, add a filter (include rpm `ansible`, not `ansible-test` nor `sshpass`), publish
3) Export complete, check content -> 32 pkgs
# hammer content-export complete version --format syncable --organization-id 1 --id <CVV_id>
4) Add include filter for sshpass, publish.
5) Export incremental, check sshpass is exported.
# hammer content-export incremental version --format syncable --organization-id 1 --id <CVV_id + 1>
6) Remove both filters, publish.
7) Export incremental, check the result and production.log 
# hammer content-export incremental version --format syncable --organization-id 1 --id <CVV_id + 2>


Actual results:
[root@sat ~]# hammer content-export incremental version --format syncable --organization-id 1 --id 15
Could not export the content view version:
  400 Bad Request

In production.log:
2023-02-22T06:10:45 [E|bac|da9f3a38] Cannot incrementally export from a filtered and a non-filtered content view version. The exported content view version 'CV-RH 3.0'  cannot be incrementally updated from version '2.0.'.  Please do a full export. (Katello::Pulp3::ContentViewVersion::ExportValidationError)


Expected results:
[root@sat ~]# hammer content-export incremental version --format syncable --organization-id 1 --id 15
Could not export the content view version:
Cannot incrementally export from a filtered and a non-filtered content view version. The exported content view version 'CV-RH 3.0'  cannot be incrementally updated from version '2.0.'.  Please do a full export.

Comment 1 Vladimír Sedmík 2023-02-23 10:36:27 UTC
Similar result for different scenario:
1) Create new repo, add content, export complete importable format: hammer content-export complete repository --format importable --organization-id 1 --id <repo_id>
2) Check the export path -> tar.gz exported
3) Upload one rpm.
4) Export incremental syncable format: hammer content-export incremental repository --format syncable --organization-id 1 --id <repo_id>

Actual results:
[root@sat ~]# hammer content-export incremental repository --format syncable --organization-id 1 --id 80
Could not export the repository:
  400 Bad Request

production log:
2023-02-23T05:25:37 [E|app|63206f2c] Katello::HttpErrors::BadRequest: Unable to incrementally export. Do a Full Export on the repository content.


Expected results:
[root@sat ~]# hammer content-export incremental repository --format syncable --organization-id 1 --id 80
Could not export the repository:
Unable to incrementally export. Do a Full Export on the repository content.

Comment 3 Vladimír Sedmík 2024-03-04 11:10:59 UTC
Verified in stream snap 49.0 (future 6.16.0) following steps from comment#0 and comment#1:

[root@satellite ~]# hammer content-export incremental version --format syncable --organization-id 1 --id 4
Could not export the content view version:
  Cannot incrementally export from a filtered and a non-filtered content view version. The exported content view version 'CV-1 3.0'  cannot be incrementally updated from version '2.0.'.  Please do a full export.

[root@satellite ~]# hammer content-export incremental repository --format syncable --organization-id 1 --id 6
Could not export the repository:
  Unable to incrementally export. Do a Full Export on the repository content.

Comment 4 Eric Helms 2024-06-06 16:08:55 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "SAT-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


Note You need to log in before you can comment on or make changes to this bug.