Hide Forgot
Description of problem: el6 has ruby 1.8, `exist?' method is not available in ruby-1.8 Version-Release number of selected component (if applicable): 6.2 How reproducible: 100% Steps to Reproduce: 1. katello-backup --incremental 2. 3. Actual results: "NoMethodError" Expected results: To work Additional info:
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/16927 has been resolved.
Unable to do incremental update on el7 as well (Sat 6.3 snap 5, katello-3.2.0-2.rc2.el7.noarch, ruby-2.0.0.598-25.el7_1.x86_64), but TypeError in this case: ~]# katello-backup /appl/sat-db-save3 --incremental /usr/bin/katello-backup:17:in `exist?': no implicit conversion of nil into String (TypeError) from /usr/bin/katello-backup:17:in `block (2 levels) in <main>' from /usr/share/ruby/optparse.rb:1364:in `call' from /usr/share/ruby/optparse.rb:1364:in `block in parse_in_order' from /usr/share/ruby/optparse.rb:1351:in `catch' from /usr/share/ruby/optparse.rb:1351:in `parse_in_order' from /usr/share/ruby/optparse.rb:1345:in `order!' from /usr/share/ruby/optparse.rb:1437:in `permute!' from /usr/share/ruby/optparse.rb:1459:in `parse!' from /usr/bin/katello-backup:29:in `block in <main>' from /usr/share/ruby/optparse.rb:885:in `initialize' from /usr/bin/katello-backup:9:in `new' from /usr/bin/katello-backup:9:in `<main>'
*** Bug 1390355 has been marked as a duplicate of this bug. ***
I still get type error when combining --incremental with other option, e.g. ~]# katello-backup test-b-dir --incremental --skip-pulp-content test-b-dir/katello-backup-2017-02-09T10:53:21-05:00 /usr/bin/katello-backup:18:in `directory?': can't convert nil into String (TypeError) from /usr/bin/katello-backup:18 from /usr/lib/ruby/1.8/optparse.rb:1267:in `call' from /usr/lib/ruby/1.8/optparse.rb:1267:in `parse_in_order' from /usr/lib/ruby/1.8/optparse.rb:1254:in `catch' from /usr/lib/ruby/1.8/optparse.rb:1254:in `parse_in_order' from /usr/lib/ruby/1.8/optparse.rb:1248:in `order!' from /usr/lib/ruby/1.8/optparse.rb:1339:in `permute!' from /usr/lib/ruby/1.8/optparse.rb:1360:in `parse!' from /usr/bin/katello-backup:30 from /usr/lib/ruby/1.8/optparse.rb:791:in `initialize' from /usr/bin/katello-backup:10:in `new' from /usr/bin/katello-backup:10
(In reply to Peter Ondrejka from comment #6) > I still get type error when combining --incremental with other option, e.g. > > ~]# katello-backup test-b-dir --incremental --skip-pulp-content > test-b-dir/katello-backup-2017-02-09T10:53:21-05:00 > /usr/bin/katello-backup:18:in `directory?': can't convert nil into String > (TypeError) > from /usr/bin/katello-backup:18 > from /usr/lib/ruby/1.8/optparse.rb:1267:in `call' > from /usr/lib/ruby/1.8/optparse.rb:1267:in `parse_in_order' > from /usr/lib/ruby/1.8/optparse.rb:1254:in `catch' > from /usr/lib/ruby/1.8/optparse.rb:1254:in `parse_in_order' > from /usr/lib/ruby/1.8/optparse.rb:1248:in `order!' > from /usr/lib/ruby/1.8/optparse.rb:1339:in `permute!' > from /usr/lib/ruby/1.8/optparse.rb:1360:in `parse!' > from /usr/bin/katello-backup:30 > from /usr/lib/ruby/1.8/optparse.rb:791:in `initialize' > from /usr/bin/katello-backup:10:in `new' > from /usr/bin/katello-backup:10 You're entering the command line incorrectly, it should be: # katello-backup <backup directory> --incremental <previous backup directory> --skip-pulp-content I can get a better error message for an incorrectly formed command line entry, but wondering if that is outside of the context for the bug reported?
In my opinion, it is relevant to fix in this bug. Some user-friendly message would be nice, e.g. "Please specify the previous backup directory" or something like that
we can close this out as current release , fixed in 6.2.9