Description of problem: Unable to export "Default Organization View 1.0" Content View Version-Release number of selected component (if applicable): 6.5 snap 13 How reproducible: Always Steps to Reproduce: [root@qe-sat6-bm1 ~]# hammer -u admin content-view version list --organization-id 1 ---|-------------------------------|---------|----------------------- ID | NAME | VERSION | LIFECYCLE ENVIRONMENTS ---|-------------------------------|---------|----------------------- 8 | my_cv 3.0 | 3.0 | Library 7 | my_cv 2.0 | 2.0 | 6 | my_cv 1.0 | 1.0 | 1 | Default Organization View 1.0 | 1.0 | Library ---|-------------------------------|---------|----------------------- [root@qe-sat6-bm1 ~]# hammer -u admin content-view version export --id 1 --export-dir /root/ Could not export the content view: Missing arguments for 'id' [root@qe-sat6 ~]# Actual results: Content-view export fails with below error: Could not export the content view: Missing arguments for 'id' Expected results: It should be export.
Upstream bug assigned to chrobert
*** Satellite 6.5.1/6.5.2 Hotfix Available **** 1) Download tfm-rubygem-hammer_cli_katello-0.16.0.11-2.HOTFIXRHBZ1671319.el7sat.noarch.rpm from this Bug to your Satellite 6.5 server 2) install: rpm -Uvh tfm-rubygem-hammer_cli_katello-0.16.0.11-2.HOTFIXRHBZ1671319.el7sat.noarch.rpm 3) export Default content view. NOTE: You are still restricted to rpm type repos only. An upcoming update that will skip non-RPM types will be fixed in : Bug 1726457 - Unable to export content-view that has at least one non-yum type repo https://bugzilla.redhat.com/show_bug.cgi?id=1726457
Created attachment 1600152 [details] tfm-rubygem-hammer_cli_katello-0.16.0.11-2.HOTFIXRHBZ1671319.el7sat.noarch.rpm
Failed QA! @ Satellite 6.6 snap 16 Description: ---------------- The Default content view version export works as expected but the import is broken with error: Could not import the content view: Error: The latest version (1.0) of the Content View 'Default Organization View' is greater or equal to the version you are trying to import (1.0) Steps: ---------------- 1. Export the default content view version tar to the directory. 2. Attempt to import the exported-tar of default content-view from another org/satellite. Observation: ---------------- 1. The Default content view version export works as expected but the import is broken with error: # hammer content-view version import --export-tar export-Default_Organization_View-1.0.tar --organization-id 3 Could not import the content view: Error: The latest version (1.0) of the Content View 'Default Organization View' is greater or equal to the version you are trying to import (1.0) 2. I tried w/o of changing the versions in exported json. But again satellite throws an error for 'cannot publish default cv' as expected: ]# hammer content-view version import --export-tar export-Default_Organization_View-1.0.tar --organization-id 3 [.....................................................................................................................................................................................................................................] [100%] No new packages. Error: RPM1004: Error retrieving metadata: [Errno 2] No such file or directory: '//./export-Default_Organization_View-1.0/Default_Organization/Library/custom/export_prod/export_repo/repodata/repomd.xml' Could not import the content view: The default content view cannot be edited, published, or deleted. So is there a better way of importing the default CV exported tar?
*** Bug 1726457 has been marked as a duplicate of this bug. ***
Failed QA! Observation: ---------------------------- 1. Export tar name has UUID instead of Default Organization View. # ll -rw-r--r--. 1 root root 163840 Sep 18 11:50 export-8f9af724-affa-4194-8ed4-5c7ecc018c7e-1.0.tar 2. Importing the exported tar fails with error: # hammer content-view version import --export-tar export-8f9af724-affa-4194-8ed4-5c7ecc018c7e-1.0.tar --organization-id 114 [................................................................................................] [100%] No new packages. Error: RPM1004: Error retrieving metadata: [Errno 2] No such file or directory: '//./export-8f9af724-affa-4194-8ed4-5c7ecc018c7e-1.0/exportOrg/Library/custom/abp/abp_repo/repodata/repomd.xml'
Odd I did not see this when we worked on the PR and had someone test it. I will spin up a 6.6 box and report back with my findings
Export machine: [root@toledoexport ~]# hammer content-view version export --id 1 --export-dir /tmp [root@toledoexport ~]# ll /tmp/ -rw-r--r--. 1 root root 97740800 Sep 19 15:41 export-Default_Organization_View-1.0.tar Import machine: [root@toledoimport ~]# ll /var/lib/pulp/katello-export/ -rw-r--r--. 1 root root 97740800 Sep 19 17:43 export-Default_Organization_View-1.0.tar [root@toledoimport ~]# hammer content-view version import --organization-id 1 --export-tar /var/lib/pulp/katello-export/export-Default_Organization_View-1.0.tar [.................................................................................................................................................................................................................................................................................] [100%] New packages: 8 (74 MB). [.................................................................................................................................................................................................................................................................................] [100%] New packages: 32 (18.6 MB). [.................................................................................................................................................................................................................................................................................] [100%] New packages: 32 (76.7 KB). Works for me, was the box you tested this on a fresh install of the latest 6.6 snap or an upgrade? I am wondering if you had some leftover stuff on the box that didn't get properly updated correctly Moving back to ON_QA Happy to share the box info I used so you can test yourself on those if you would like.
Toledo, I tried on another system upgraded and also on a fresh setup, the sync between two orgs works. But still, the name of exported content tar doesn't have a name of Default Organization View. # # ll /var/lib/pulp/katello-export/ total 164 -rw-r--r--. 1 root root 163840 Sep 23 08:53 export-1b38f899-4784-4ae0-a510-0c8a9d3e64f8-1.0.tar Did you tried on a fresh setup? What foreman version do u have installed (mine is foreman-1.22.0.32-1.el7sat.noarch) ?
Chris, Anyhow the sync between two orgs/satellites is working fine and hence I am moving this to verify state. Will raise a new bug for tar name issue. So, as per comment 26 moving this bug to verified status.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2019:3172