Bug 1198648 - Config options in the fusor installer should have validation
Summary: Config options in the fusor installer should have validation
Keywords:
Status: VERIFIED
Alias: None
Product: Red Hat Quickstart Cloud Installer
Classification: Red Hat
Component: Installation - Satellite
Version: 1.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: TP3
: 1.0
Assignee: Jason Montleon
QA Contact: Sudhir Mallamprabhakara
Dan Macpherson
URL:
Whiteboard:
: 1247404 (view as bug list)
Depends On:
Blocks: rhci-sprint-14
TreeView+ depends on / blocked
 
Reported: 2015-03-04 15:13 UTC by Dave Johnson
Modified: 2019-08-31 21:30 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Screenshot showing the invalid IP address and blank NTP host (377.63 KB, image/png)
2016-04-21 12:41 UTC, bmorriso
no flags Details
stack trace that appears after starting the installer with invalid inputs (131.59 KB, image/png)
2016-04-21 12:44 UTC, bmorriso
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1306032 0 unspecified CLOSED [TripleO] Config options in the fusor undercloud installer should have validation 2021-02-22 00:41:40 UTC

Internal Links: 1306032

Description Dave Johnson 2015-03-04 15:13:53 UTC
Description of problem:
==============================
Config options in the fusor installer should have validation.  Fields currently accept any and everything


Version-Release number of selected component (if applicable):
===============================================================
RHCI_Sat6_1_Beta_1_compose_20150210.0___2015_02_20_1509.iso


How reproducible:
===============
100%


Steps to Reproduce:
1.  Install RHEL with the ISO
2.  Reboot
3.  Allow fusor-installer to start
4.  Change timezone to empty value
5.  Change IP address to 'A'


Actual results:
======================
Bad values accepted


Expected results:
======================
Bad values should not be accepted

Comment 1 John Matthews 2015-08-12 15:46:28 UTC
*** Bug 1247404 has been marked as a duplicate of this bug. ***

Comment 2 Thom Carlin 2015-08-19 13:10:11 UTC
Still occurs in tech preview rc-1

Comment 3 Antonin Pagac 2016-02-05 13:48:57 UTC
Still occurs in TP2 RC7: RHCI-6.0-RHEL-7-20160204.0-RHCI-x86_64-dvd1.iso

fusor-installer will throw an error with a traceback when proceeding with empty vaules:

/usr/share/ruby/ipaddr.rb:475:in `initialize': address family must be specified (IPAddr::AddressFamilyError)
	from /usr/share/katello-installer/hooks/lib/provisioning_wizard.rb:190:in `new'
	from /usr/share/katello-installer/hooks/lib/provisioning_wizard.rb:190:in `validate_own_gateway'
	from /usr/share/katello-installer/hooks/lib/base_wizard.rb:63:in `block in validate'
	from /usr/share/katello-installer/hooks/lib/base_wizard.rb:61:in `map'
	from /usr/share/katello-installer/hooks/lib/base_wizard.rb:61:in `validate'
	from /usr/share/katello-installer/hooks/lib/base_wizard.rb:38:in `start'
	from /usr/share/katello-installer/hooks/lib/provisioning_wizard.rb:52:in `start'
	from /usr/share/katello-installer/hooks/pre_validations/10-gather_and_set_fusor_values.rb:5:in `block (4 levels) in load'
	from /usr/share/gems/gems/kafo-0.6.5.9/lib/kafo/hooking.rb:32:in `instance_eval'
	from /usr/share/gems/gems/kafo-0.6.5.9/lib/kafo/hooking.rb:32:in `block (4 levels) in load'
	from /usr/share/gems/gems/kafo-0.6.5.9/lib/kafo/hook_context.rb:13:in `instance_exec'
	from /usr/share/gems/gems/kafo-0.6.5.9/lib/kafo/hook_context.rb:13:in `execute'
	from /usr/share/gems/gems/kafo-0.6.5.9/lib/kafo/hooking.rb:49:in `block in execute'
	from /usr/share/gems/gems/kafo-0.6.5.9/lib/kafo/hooking.rb:47:in `each'
	from /usr/share/gems/gems/kafo-0.6.5.9/lib/kafo/hooking.rb:47:in `execute'
	from /usr/share/gems/gems/kafo-0.6.5.9/lib/kafo/kafo_configure.rb:92:in `execute'
	from /usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
	from /usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `run'
	from /usr/share/gems/gems/kafo-0.6.5.9/lib/kafo/kafo_configure.rb:116:in `run'
	from /usr/sbin/fusor-installer:63:in `<main>'

Comment 4 Thom Carlin 2016-02-08 19:23:03 UTC
Still occurs in TP RC8

Comment 5 Thom Carlin 2016-03-17 16:15:46 UTC
Stil occurs in TP3_RC1

Comment 6 Jason Montleon 2016-03-18 15:45:38 UTC
What is still occurring? What values are you leaving bad/empty and able to proceed with?

Comment 7 Thom Carlin 2016-03-18 16:14:52 UTC
I followed Dave's steps in https://bugzilla.redhat.com/show_bug.cgi?id=1198648#c0

Comment 8 Jason Montleon 2016-03-21 15:30:03 UTC
Unable to proceed because of following errors:
  NTP sync host must be specified

NTP host cannot be blank anymore. This is related to the IP address being an invalid ip because the hostname and ip checks are rolled together.

Please give this a try (full path of file on system is /usr/share/katello-installer/hooks/lib/provisioning_wizard.rb) if you have some time to verify better behavior.


https://github.com/fusor/fusor-installer/pull/53/files

Comment 9 John Matthews 2016-04-11 20:41:23 UTC
Addressed in TP3 RC3

Comment 10 bmorriso 2016-04-21 12:41:25 UTC
Created attachment 1149457 [details]
Screenshot showing the invalid IP address and blank NTP host

Comment 11 bmorriso 2016-04-21 12:44:31 UTC
Created attachment 1149459 [details]
stack trace that appears after starting the installer with invalid inputs

Comment 12 bmorriso 2016-04-21 12:51:59 UTC
Tested with TP3 RC4. This issue is still present.

Following the reproduction steps in the description, I entered the IP address as "A" and left the NTP server blank. I entered "1" to proceed with the installation. Then a stack trace prints out and the installer exits. The attached screenshots show the values entered and the resulting stack trace.

Comment 13 Jason Montleon 2016-04-21 15:22:40 UTC
I see, it's the combined bad/empty input. https://github.com/fusor/fusor-installer/pull/56/files

Comment 14 John Matthews 2016-04-22 17:17:34 UTC
Built in QCI-1.0-RHEL-7-20160422.t.0-QCI-x86_64-dvd1.iso

Comment 15 bmorriso 2016-04-25 17:10:07 UTC
Verified as working in TP3_RC5

I followed the reproduction steps in the description and once I tried to start the installation, I received a message and was returned to the settings screen to correct my errors. The message was:

Unable to proceed because of following errors:
  IP address is invalid
  You must specify a netmask
  Network address - Invalid IP address
  DHCP Gateway - Invalid IP address
  Time zone is not a valid IANA time zone identifier


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