Bug 849101 - Use of uninitialized value in concatenation (.) or string at ./install.pl line 314, <STDIN> line 2. '' is not a valid response
Summary: Use of uninitialized value in concatenation (.) or string at ./install.pl lin...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Installer
Version: 550
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomas Lestach
QA Contact: Ondrej Cienciala
URL:
Whiteboard:
Depends On:
Blocks: 562287 sat550-lowbug
TreeView+ depends on / blocked
 
Reported: 2012-08-17 10:17 UTC by Ondrej Cienciala
Modified: 2014-06-18 07:01 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-09-21 09:34:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ondrej Cienciala 2012-08-17 10:17:10 UTC
Description of problem:
After running install.pl on unregistered system with enableProxy and httpProxy filled in /etc/sysconfig/rhn/up2date, installer shows following message:

Use of uninitialized value in concatenation (.) or string at ./install.pl line 314, <STDIN> line 2.
'' is not a valid response


Full log is following:

# ./install.pl 
* Starting the Red Hat Network Satellite installer.
* Performing pre-install checks.
* Pre-install checks complete.  Beginning installation.
* RHN Registration.
RHN Username? qa
RHN Password? 
Use of uninitialized value in concatenation (.) or string at ./install.pl line 314, <STDIN> line 2.
'' is not a valid response
The following proxy information was found in use by up2date:
Proxy Hostname: <FQDN>
Proxy Username: 
Proxy Password: Not displayed - see /etc/sysconfig/rhn/up2date:proxyPassword

Version-Release number of selected component (if applicable):
Satellite-5.5.0-RHEL6-re20120813.0-x86_64.iso

How reproducible:
always with this configuration

Steps to Reproduce:
1. RHEL system that is not registered to RHN
2. set these values in /etc/sysconfig/rhn/up2date:
       enableProxy=1
       httpProxy=<FQDN>
3. run install.pl and enter RHN credentials
4. read the message
  
Actual results:
Use of uninitialized value in concatenation (.) or string at ./install.pl line 314, <STDIN> line 2.
'' is not a valid response

Expected results:
The message is not showed.

Additional info:

Comment 1 Stephen Herr 2012-08-17 17:38:04 UTC
How is it that the httpProxy field is set but the proxyUser field is not?

Almost any program will crash if you give it a corrupted config file. If this is not a valid set of config options I don't think this is really a bug, however if it is possible that the config file can get in this state normally then that is a different matter.

Comment 2 Ondrej Cienciala 2012-08-21 08:55:34 UTC
I was trying an anonymous proxy without authentication so I did not set these:
enableProxyAuth=
proxyUser=
proxyPassword=

I did not known that Satellite is not supporting anonymous proxy.

Anyway there is still some error message even if I set following fields in up2date file:
enableProxy=1
enableProxyAuth=1
httpProxy=<http-proxy-fqdn>
proxyUser=<proxy-username>
proxyPassword=<proxy-password>

The message:
'' is not a valid response

Full log:
# ./install.pl 
* Starting the Red Hat Network Satellite installer.
* Performing pre-install checks.
* Pre-install checks complete.  Beginning installation.
* RHN Registration.
RHN Username? qa
RHN Password? 
'' is not a valid response
The following proxy information was found in use by up2date:
Proxy Hostname: <proxy-fqdn>
Proxy Username: <proxy-username>
Proxy Password: Not displayed - see /etc/sysconfig/rhn/up2date:proxyPassword

Import values to be used by Satellite [y/n]? y
(...)

Comment 3 Michael Mráka 2012-08-21 14:37:09 UTC
I can't see
 Use of uninitialized value in concatenation (.) or string at ./install.pl line  314, <STDIN> line 2.
even if I set only
 enableProxy=1
 httpProxy=proxy.localdomain
and let
 enableProxyAuth=
 proxyUser=
 proxyPassword=
empty. Could you attach /etc/sysconfig/rhn/up2date file?

# tail -2 /tmp/media.mnt-oJhbIP/.composeinfo 
name = Satellite-5.5.0-RHEL6-re20120813.0
# uname -m
x86_64
# /tmp/media.mnt-oJhbIP/install.pl 
* Starting the Red Hat Network Satellite installer.
* Performing pre-install checks.
* Pre-install checks complete.  Beginning installation.
* RHN Registration.
RHN Username? xx
RHN Password? 
'' is not a valid response
The following proxy information was found in use by up2date:
Proxy Hostname: proxy.localdomain
Proxy Username: 
Proxy Password: Not displayed - see /etc/sysconfig/rhn/up2date:proxyPassword

Import values to be used by Satellite [y/n]?

Comment 4 Michael Mráka 2012-08-21 14:50:52 UTC
Correct reproducer is:
* remove (comment out)  proxyUser= from /etc/sysconfig/rhn/up2date.

Comment 5 Stephen Herr 2012-08-21 15:01:28 UTC
(In reply to comment #3)
> I can't see
>  Use of uninitialized value in concatenation (.) or string at ./install.pl
> line  314, <STDIN> line 2.
> even if I set only
>  enableProxy=1
>  httpProxy=proxy.localdomain
> and let
>  enableProxyAuth=
>  proxyUser=
>  proxyPassword=
> empty. Could you attach /etc/sysconfig/rhn/up2date file?

Michael, 

I haven't tried it myself so I could be wrong but from looking at the code I believe the error is caused because the proxyUser= and proxyPassword= do not exist in the config file at all, not because they have no values. 

Ociencia, 

That is want I was trying to say before. It's not that we don't support anonymous proxy, an anonymous proxy would have blanks for the values of those two options. What I am saying is that a config file that has enableProxy=1 but does not also have at least "proxyUser= " is invalid. If that is not how your file looked when you were encountering the error then you can ignore my earlier comment. However, if that is how it looked, I was asking how it got that way. Was there some automatic process that did not set options properly in the file, or did you manually edit it and add new options without realizing that there were other required fields if you changed this particular thing?

Comment 6 Tomas Lestach 2012-08-21 15:14:55 UTC
With help of Ondrej I reproduced both issues. They're both valid.

Fixing them ...

spacewalk.git:
 a723e772dd82f7a4c8fba16fde51c7e6f161d6b0
 0272e75592f6d20b2c31b86d51e878c0f4c7f3e3

Comment 7 Ondrej Cienciala 2012-08-22 07:55:36 UTC
(In reply to comment #5)
> Ociencia, 
> 
> That is want I was trying to say before. It's not that we don't support
> anonymous proxy, an anonymous proxy would have blanks for the values of
> those two options. What I am saying is that a config file that has
> enableProxy=1 but does not also have at least "proxyUser= " is invalid. If
> that is not how your file looked when you were encountering the error then
> you can ignore my earlier comment. However, if that is how it looked, I was
> asking how it got that way. Was there some automatic process that did not
> set options properly in the file, or did you manually edit it and add new
> options without realizing that there were other required fields if you
> changed this particular thing?

Stephen,
you are right, I am sorry for misunderstanding. I used a clean install of system where the proxyUser= , proxyPassword=  and  enableProxyAuth= do not exist in /etc/sysconfig/rhn/up2date before installation of Satellite and I did not set them in the first case. I assumed that it is not needed if the proxy is anonymous.
Next time I will attach the whole config file for better clarification.
Also, I edited the up2date file manually.

Comment 9 Tomas Lestach 2012-08-23 12:10:32 UTC
Moving ON_QA, since we have a new compose ...

Comment 11 Tomas Lestach 2012-08-24 16:13:20 UTC
One more commit ...

spacewalk.git: fece557850e45102472f4a8c0c8e7a1041f396bb

Moving back to MODIFIED.

Comment 13 Tomas Lestach 2012-08-29 11:22:50 UTC
Moving ON_QA, since we have a new compose ...

Comment 15 Clifford Perry 2012-09-21 09:34:30 UTC
This issue is resolved with the release of RHN Satellite 5.5. 

As of September 20th 2012, RHN Satellite 5.5 has been generally available. 

Release Notes and other 5.5 documentation can be found here:

 https://access.redhat.com/knowledge/docs/Red_Hat_Network_Satellite/

The associated Errata for the 5.5 release are:

5.5 Satellite GA Errata
 - http://rhn.redhat.com/errata/RHEA-2012-1296.html

5.5 Upgrade Errata
 - http://rhn.redhat.com/errata/RHEA-2012-1298.html

5.5 RHN Proxy GA Errata
 - http://rhn.redhat.com/errata/RHEA-2012-1297.html

5.5 RHN Tools GA Errata
 - http://rhn.redhat.com/errata/RHEA-2012-1299.html

Regards,
Clifford
- Engineering Manager, Satellite


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