Bug 500151 - configure-proxy.sh --non-interactive should not ask for user interaction
configure-proxy.sh --non-interactive should not ask for user interaction
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite Proxy 5
Classification: Red Hat
Component: Installer (Show other bugs)
530
All Linux
low Severity low
: ---
: ---
Assigned To: Miroslav Suchý
Michael Mráka
:
Depends On:
Blocks: 456999 486216 522018
  Show dependency treegraph
 
Reported: 2009-05-11 08:48 EDT by Michael Mráka
Modified: 2009-09-10 10:38 EDT (History)
1 user (show)

See Also:
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 10:38:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michael Mráka 2009-05-11 08:48:24 EDT
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@redhat.com]: michael.mraka@redhat.com
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@xmlrpc.rhn.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 09:46:01 EDT
Commited as 756b5d1a08f9ba147621f14087cf371c0f6c448d
Will be fixed in spacewalk-proxy-installer-0.5.25-5-sat
Comment 2 Michael Mráka 2009-05-26 08:07:40 EDT
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@xmlrpc.rhn.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@xmlrpc.rhn.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 10:07:53 EDT
Flipped the condition in commit 907cbb03e5c9e26218ee0ea2b9174cf96fb3e60c
Comment 4 Michael Mráka 2009-06-02 10:05:27 EDT
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 08:11:56 EDT
Commited as ebaf09fdf4ec7a6ce56bce38d3cbe3329ce48264
Comment 6 Miroslav Suchý 2009-06-05 08:57:33 EDT
Moving ON_QA
QA Build: 20090529
Comment 7 Miroslav Suchý 2009-06-05 10:19:47 EDT
err of course QA build 20090605
Comment 8 Michael Mráka 2009-06-17 18:48:41 EDT
Verified. RHN-Proxy-5.3.0-RHEL4-re200906016.1
Comment 9 Jan Pazdziora 2009-09-08 10:58:59 EDT
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 02:23:41 EDT
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 03:08:30 EDT
I cloned this corner case to BZ 522018.
Comment 12 Brandon Perkins 2009-09-10 10:38:49 EDT
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

Note You need to log in before you can comment on or make changes to this bug.