Project

General

Profile

Bug #20921

katello-change-hostname tries to change the wrong default proxy if default proxy id has multiple digits

Added by Evgeni Golov about 4 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Tooling
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

k-c-h currently uses the following to get the ID of the default proxy:

    default_capsule_id = `hammer -u #{@options[:username]} -p #{@options[:password]} capsule list | grep #{old_hostname} | awk '{ print $1 }'`[0]

this only works for IDs that have a single digit, otherwise the `[0]` cuts all the remaining digits silently.

While I see no reason for the default proxy to be anything than ID 1, the code should cope for any number.

Associated revisions

Revision f7db11e5 (diff)
Added by Evgeni Golov about 4 years ago

Fixes #20921 - use String.chomp, not slice to remove newlines

History

#1 Updated by The Foreman Bot about 4 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello-packaging/pull/527 added

#2 Updated by Evgeni Golov about 4 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#3 Updated by Justin Sherrill about 4 years ago

  • Legacy Backlogs Release (now unused) set to 250

Also available in: Atom PDF