Hide Forgot
Description of problem: Hammer transition cvs from the Satellite 5 to Satellite 6 is failing Customer followed the below solution to resovle the issue then it failed with the below error: How to resolve the "Unable to import, first import content view with id xxx" error when importing content hosts into Satellite6? https://access.redhat.com/solutions/1993363 aught NoMethodError:undefined method `clear' for nil:NilClass while processing CSV line: {"server_id"=>"1000324754", "profile_name"=>"test.test.test", "hostname"=>"test.test.test", "description"=>"Initial Registration Parameters:\nOS: redhat-release-server\nRelease: 7Server\nCPU Arch: x86_64", "organization_id"=>"1", "base_channel_id"=>nil, "base_channel_label"=>"rhel-x86_64-server-7", "child_channel_id"=>nil, "system_group_id"=>nil, "release"=>"7Server", "architecture"=>"x86_64", "virtual_host"=>nil, "virtual_guest"=>nil} Caught NoMethodError:undefined method `clear' for nil:NilClass while processing Version-Release number of selected component (if applicable): Satellite 6.2.4 How reproducible: I tried to reproduce but the solution did fix the issue form me: On satellite 5: # spacewalk-export On satellite 6: hammer import content-host --csv-file /tmp/exports/system-profiles.csv --export-directory /root/content-hosts Importing from /tmp/exports/system-profiles.csv Unable to import, first import content view with id 101 Unable to import, first import organization with id 1 Unable to import, first import organization with id 1 Unable to import, first import organization with id 1 Unable to import, first import content view with id 101 Unable to import, first import organization with id 1 Unable to import, first import organization with id 1 Unable to import, first import organization with id 1 Summary No action taken.
Brad, comment #6 says that it is broken only if credentials are provided by yaml. When credentials are provided as cmdline params then it works.
I possibly figured out what it causes - It was broken by fix for BZ #1325497 See https://github.com/Katello/hammer-cli-import/pull/26/files#r89281771
Refining my comment #8 - It fails only if you are asked for password. # hammer -u admin import content-host --debug --csv-file system-profiles.csv --export-directory . [Foreman] Password for admin: Importing from system-profiles.csv Creating new host: profile1 Caught NoMethodError:undefined method `clear' for nil:NilClass while processing CSV line: {"server_id"=>"1000010009", "profile_name"=>"profile1", "hostname"=>"tyan-gt24-01.example.com", "description"=>nil, "organization_id"=>"1", "base_channel_id"=>nil, "base_channel_label"=>nil, "child_channel_id"=>nil, "system_group_id"=>nil, "release"=>"7Server", "architecture"=>"x86_64", "virtual_host"=>nil, "virtual_guest"=>nil} Summary No action taken. While with credentials in yaml or as cmdline params it works: # hammer -u admin -p changeme import content-host --debug --csv-file system-profiles.csv --export-directory . Importing from system-profiles.csv Creating new host: profile1 To build the system-profile-transition rpm, run: cd /root/SPECS && rpmbuild -ba --define "_topdir /root" system-profile-transition-<SATFQDN>-1479896313-0.0.1.spec Then find your system-profile-transition-<SATFQDN>-1479896313 package in /root/RPMS/noarch/ directory. Summary Created 1 host.
What do we want to track here? Unable to import, first import content view with id 101 (probably not a bug) vs. Caught NoMethodError:undefined method `clear' (hit only if asked for password)
Thank you for your interest in Satellite 6. We have evaluated this bug, and we do not expect this to be implemented in product in the forseeable future. We are therefore closing this out as WONTFIX. If you have any concerns about this, please feel free to contact Rich Jerrido or Bryan Kearney. Thank you.