Bug 500151

Summary: configure-proxy.sh --non-interactive should not ask for user interaction
Product: Red Hat Satellite Proxy 5 Reporter: Michael Mráka <mmraka>
Component: InstallerAssignee: Miroslav Suchý <msuchy>
Status: CLOSED CURRENTRELEASE QA Contact: Michael Mráka <mmraka>
Severity: low Docs Contact:
Priority: low    
Version: 530CC: jpazdziora
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: sat530 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 522018 (view as bug list) Environment:
Last Closed: 2009-09-10 14:38:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 456999, 486216, 522018    

Description Michael Mráka 2009-05-11 12:48:24 UTC
Description of problem:
configure-proxy.sh --non-interactive asks for user interaction.

Version-Release number of selected component (if applicable):
spacewalk-proxy-installer-0.5.25-4.el5sat

How reproducible:
always

Steps to Reproduce:
1. install new system
2. register in to webqa
3. /usr/sbin/configure-proxy.sh --answer-file=proxy-answer.txt --non-interactive
  
Actual results:
Proxy version to activate [5.3]: 5.3
RHN Parent [xmlrpc.rhn.webqa.redhat.com]: xmlrpc.rhn.webqa.redhat.com
Traceback email [michael.mraka]: michael.mraka
Use SSL [Y]: Y
CA Chain [/usr/share/rhn/RHNS-CA-CERT]: /usr/share/rhn/RHNS-CA-CERT
Please do copy your CA key and public certificate from xmlrpc.rhn.webqa.redhat.com to 
/root/ssl-build directory. You may want to execute this command:
 scp 'root.webqa.redhat.com:/root/ssl-build/RHN-ORG-{PRIVATE-SSL-KEY,TRUSTED-SSL-CERT}' /root/ssl-build


Expected results:
succesful non-interactive installation

Additional info:

Comment 1 Miroslav Suchý 2009-05-12 13:46:01 UTC
Commited as 756b5d1a08f9ba147621f14087cf371c0f6c448d
Will be fixed in spacewalk-proxy-installer-0.5.25-5-sat

Comment 2 Michael Mráka 2009-05-26 12:07:40 UTC
FAILS_QA
https://rhts.redhat.com/cgi-bin/rhts/test_log.cgi?id=8291654

:: [   FAIL   ] :: Running 'runcon  -u root -r system_r -t unconfined_t  -- /usr/sbin/configure-proxy.sh --answer-file=proxy-answer.txt --non-interactive --force-own-ca' (Expected 0, got 1)

Proxy version to activate [5.3]: 5.3
RHN Parent [xmlrpc.rhn.webqa.redhat.com]: xmlrpc.rhn.webqa.redhat.com
Traceback email [root@localhost]: root@localhost
Use SSL [Y]: Y
CA Chain [/usr/share/rhn/RHNS-CA-CERT]: /usr/share/rhn/RHNS-CA-CERT
Please do copy your CA key and public certificate from xmlrpc.rhn.webqa.redhat.com to 
/root/ssl-build directory. You may want to execute this command:
 mkdir ; scp 'root.webqa.redhat.com:/root/ssl-build/RHN-ORG-{PRIVATE-SSL-KEY,TRUSTED-SSL-CERT,rhn-ca-openssl.cnf}' 

+ '[' 01 -gt 0 ']'
+ diff /usr/share/rhn/RHNS-CA-CERT /root/ssl-build/RHN-ORG-TRUSTED-SSL-KEY
+ cat
Please do copy your CA key and public certificate from xmlrpc.rhn.webqa.redhat.com to
/root/ssl-build directory. You may want to execute this command:
 mkdir ; scp 'root.webqa.redhat.com:/root/ssl-build/RHN-ORG-{PRIVATE-SSL-KEY,TRUSTED-SSL-CERT,rhn-ca-openssl.cnf}'
+ exit 1

Comment 3 Miroslav Suchý 2009-05-26 14:07:53 UTC
Flipped the condition in commit 907cbb03e5c9e26218ee0ea2b9174cf96fb3e60c

Comment 4 Michael Mráka 2009-06-02 14:05:27 UTC
http://rhts.redhat.com/cgi-bin/rhts/test_log.cgi?id=8375802

Error: ssl build directory /root/ssl-build do not exist.

:: [   FAIL   ] :: Running 'runcon  -u root -r system_r -t unconfined_t  -- /usr/sbin/configure-proxy.sh --answer-file=proxy-answer.txt --non-interactive --force-own-ca' (Expected 0, got 1)

Comment 5 Miroslav Suchý 2009-06-03 12:11:56 UTC
Commited as ebaf09fdf4ec7a6ce56bce38d3cbe3329ce48264

Comment 6 Miroslav Suchý 2009-06-05 12:57:33 UTC
Moving ON_QA
QA Build: 20090529

Comment 7 Miroslav Suchý 2009-06-05 14:19:47 UTC
err of course QA build 20090605

Comment 8 Michael Mráka 2009-06-17 22:48:41 UTC
Verified. RHN-Proxy-5.3.0-RHEL4-re200906016.1

Comment 9 Jan Pazdziora 2009-09-08 14:58:59 UTC
Stage validated with RHN Proxy 5.3.0 Gold. No questions were asked -- installation either failed (missing /root/ssl-build) or run through. Moving to RELEASE_PENDING.

Comment 10 Jan Pazdziora 2009-09-09 06:23:41 UTC
Hmmm, ough.

When I have

POPULATE_CONFIG_CHANNEL="y"

in my answer file, the

/usr/sbin/configure-proxy.sh --answer-file=/tmp/proxy-answer.txt --non-interactive

command actually stops waiting for interactive prompt:

Configuring monitoring.
Monitoring parent [xen62.englab.brq.redhat.com]: xen62.englab.brq.redhat.com
Monitoring parent IP [10.34.34.62]: 10.34.34.62
Enable monitoring scout [Y/n]: Y/n
Using CA key at /root/ssl-build/RHN-ORG-PRIVATE-SSL-KEY.
Generating distributable RPM for CA public certificate:
Copying CA public certificate to /var/www/html/pub for distribution to clients:
Generating SSL key and public certificate:
Installing SSL certificate for Apache and Jabberd:
Preparing packages for installation...
rhn-org-httpd-ssl-key-pair-vmware139.englab.brq-1.0-1
Create and populate configuration channel rhn_proxy_config_1000010146? [y]: y
Using server name xen62.englab.brq.redhat.com
Red Hat Network username: 

instead of either proceeding or failing. So this bugzilla is not fully fixed. Adding it to sat600-triage. Please decide if we will address this as part of this bug, or whether I should file a new one.

Comment 11 Miroslav Suchý 2009-09-09 07:08:30 UTC
I cloned this corner case to BZ 522018.

Comment 12 Brandon Perkins 2009-09-10 14:38:49 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-1433.html