Bug 1498479

Summary: katello-proxy-* values in satellite-answers.yaml no longer support empty quoted entries
Product: Red Hat Satellite Reporter: Sachin Ghai <sghai>
Component: InstallerAssignee: Ewoud Kohl van Wijngaarden <ekohlvan>
Status: CLOSED ERRATA QA Contact: Sachin Ghai <sghai>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: bbuckingham, bkearney, ehelms, ekohlvan, inecas, mbacovsk, mmccune
Target Milestone: UnspecifiedKeywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:59:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
foreman-debug none

Description Sachin Ghai 2017-10-04 12:28:58 UTC
Created attachment 1334216 [details]
foreman-debug

Description of problem:

DB was restored successfully and while upgrade w/ 6.3 found following issue:

]# satellite-installer --scenario satellite --upgrade
Parameter katello-proxy-url invalid:  must match one of (?-mix:^https?:\/\/)
Parameter katello-proxy-port invalid: "" is not a valid integer


when I checked the set value for above parameters, found empty value there:

]# satellite-installer --scenario satellite --upgrade --help | grep katello-proxy
    --katello-proxy-password      Proxy password for authentication (current: "")
    --katello-proxy-port          Port the proxy is running on (current: "")
    --katello-proxy-url           URL of the proxy server (current: "")
    --katello-proxy-username      Proxy username for authentication (current: "")


Version-Release number of selected component (if applicable):
6.2 -> 6.3 snap18

How reproducible:


Steps to Reproduce:
1. satellite-installer --scenario satellite --upgrade
2.
3.

Actual results:
installer failed w/ error:
out: Parameter katello-proxy-url invalid:  must match one of (?-mix:^https?:\/\/Parameter katello-proxy-port invalid: "" is not a valid integer

Expected results:


Additional info:

Comment 2 Mike McCune 2017-10-05 12:50:52 UTC
The issue is the values in the satellite-answers.yaml, the following is valid in 6.2 but fails in 6.3:


/etc/foreman-installer/scenarios.d/satellite-answers.yaml

katello:
 ...
  proxy_url: ''
  proxy_port: ''
  proxy_username: ''
  proxy_password: '' 

a workaround is to use blank:


  proxy_url:
  proxy_port:
  proxy_username:
  proxy_password:

but we need to either support blank values or reset these to blank if found so the upgrades won't fail as many customers had these set to "" or '' in 6.2 to reset to blank values

Comment 3 Ewoud Kohl van Wijngaarden 2017-10-05 13:52:46 UTC
There are 2 options to solve this:
1) Create a migration in the installer to automatically fix the answers file
2) Modify the installer to properly handle empty strings

The first is the easiest and would have my preference but the second might be desired from a user perspective since users might expect that to work.

For the short term I'm going to implement 1 since it's a valid solution and allows us to quickly unblock on the beta but let me know if I should look into option 2.

Comment 4 Ewoud Kohl van Wijngaarden 2017-10-05 15:16:59 UTC
Created redmine issue http://projects.theforeman.org/issues/21217 from this bug

Comment 5 Satellite Program 2017-10-09 14:33:43 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/21217 has been resolved.

Comment 6 Sachin Ghai 2017-10-16 11:52:31 UTC
Verified w/ sat6.3 snap20 and didn't hit the reported issue. I used the same db with which I found the reported issue.

Comment 7 Bryan Kearney 2018-02-21 16:59:35 UTC
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-2018:0336