Bug 1222968 - RHCI does not validate password length, leads to failed deployment
Summary: RHCI does not validate password length, leads to failed deployment
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Quickstart Cloud Installer
Classification: Red Hat
Component: Installation - RHCI
Version: 1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ga
: 1.0
Assignee: Jesus M. Rodriguez
QA Contact: Tasos Papaioannou
Dan Macpherson
URL:
Whiteboard:
Depends On:
Blocks: rhci-sprint-14
TreeView+ depends on / blocked
 
Reported: 2015-05-19 13:58 UTC by Stephen Herr
Modified: 2016-09-13 16:25 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-13 16:25:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2016:1862 0 normal SHIPPED_LIVE Red Hat Quickstart Installer 1.0 2016-09-13 20:18:48 UTC

Description Stephen Herr 2015-05-19 13:58:32 UTC
Description of problem:
RHCI's wizard does not validate root password length, but the deploy action does (eventually). If you start a deploy with a password shorter than 8 characters the deploy will be scheduled and the syncs will happen, but then the deploy will fail do to invalid root password.

How reproducible:
always

Steps to Reproduce:
1. Schedule a deploy with a short root password, say 'redhat'

Actual results:
deploy action fails with:
Validation failed: Root password should be 8 characters or more

Expected results:
The wizard should not accept an invalid root password

Comment 1 Stephen Herr 2015-05-19 14:06:14 UTC
Full error info:

Action:

Actions::Fusor::ConfigureHostGroups

Input:

{"deployment_id"=>2,
 "product_type"=>"rhev",
 "organization_id"=>1,
 "lifecycle_environment_id"=>2,
 "hostgroup_settings"=>
  {"root_name"=>"Fusor Base",
   "host_groups"=>
    [{"parent"=>"Fusor Base"},
     {"name"=>"RHEV-Engine",
      "parent"=>"root_deployment",
      "puppet_classes"=>
       [{"name"=>"ovirt",
         "parameters"=>[{"name"=>"product", "override"=>"RHEV"}]},
        {"name"=>"ovirt::engine::config"},
        {"name"=>"ovirt::engine::packages"},
        {"name"=>"ovirt::engine::setup",
         "parameters"=>
          [{"name"=>"firewall_manager", "override"=>"iptables"}]}]},
     {"name"=>"RHEV-Hypervisor",
      "parent"=>"root_deployment",
      "puppet_classes"=>
       [{"name"=>"ovirt",
         "parameters"=>[{"name"=>"product", "override"=>"RHEV"}]},
        {"name"=>"ovirt::hypervisor::packages"}]}]},
 "user_id"=>3,
 "locale"=>"en"}

Output:

{}

Exception:

ActiveRecord::RecordInvalid: Validation failed: Root password should be 8 characters or more

Backtrace:

/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/validations.rb:56:in `save!'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/attribute_methods/dirty.rb:33:in `save!'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:246:in `block in save!'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:295:in `block in with_transaction_returning_status'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:208:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:293:in `with_transaction_returning_status'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:246:in `save!'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/validations.rb:41:in `create!'
/opt/rh/ruby193/root/usr/share/gems/gems/fusor_server-0.0.1/app/lib/actions/fusor/configure_host_groups.rb:125:in `find_or_ensure_hostgroup'
/opt/rh/ruby193/root/usr/share/gems/gems/fusor_server-0.0.1/app/lib/actions/fusor/configure_host_groups.rb:41:in `block in finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/fusor_server-0.0.1/app/lib/actions/fusor/configure_host_groups.rb:40:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/fusor_server-0.0.1/app/lib/actions/fusor/configure_host_groups.rb:40:in `finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/action.rb:498:in `block (2 levels) in execute_finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/middleware/stack.rb:26:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/middleware.rb:16:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/action/progress.rb:30:in `with_progress_calculation'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/action/progress.rb:22:in `finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/middleware.rb:16:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.39/app/lib/actions/middleware/keep_locale.rb:27:in `block in finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.39/app/lib/actions/middleware/keep_locale.rb:34:in `with_locale'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.39/app/lib/actions/middleware/keep_locale.rb:27:in `finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/middleware/world.rb:30:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/action.rb:497:in `block in execute_finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/action.rb:391:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/action.rb:391:in `block in with_error_handling'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/action.rb:391:in `catch'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/action.rb:391:in `with_error_handling'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/action.rb:496:in `execute_finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/action.rb:256:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:9:in `block (2 levels) in execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/execution_plan/steps/abstract.rb:155:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/execution_plan/steps/abstract.rb:155:in `with_meta_calculation'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:8:in `block in execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:22:in `open_action'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:7:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/executors/parallel/sequential_manager.rb:72:in `run_step'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/executors/parallel/sequential_manager.rb:57:in `dispatch'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/executors/parallel/sequential_manager.rb:64:in `block in run_in_sequence'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/executors/parallel/sequential_manager.rb:64:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/executors/parallel/sequential_manager.rb:64:in `all?'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/executors/parallel/sequential_manager.rb:64:in `run_in_sequence'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/executors/parallel/sequential_manager.rb:53:in `dispatch'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/executors/parallel/sequential_manager.rb:28:in `block (2 levels) in finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/middleware/stack.rb:26:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/middleware.rb:16:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/middleware.rb:41:in `finalize_phase'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/middleware.rb:16:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/middleware.rb:41:in `finalize_phase'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/middleware.rb:16:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/middleware.rb:41:in `finalize_phase'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/middleware/world.rb:30:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/executors/parallel/sequential_manager.rb:27:in `block in finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:208:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/transaction_adapters/active_record.rb:5:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/executors/parallel/sequential_manager.rb:24:in `finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/executors/parallel/worker.rb:23:in `block in on_message'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:859:in `block in assigns'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:858:in `tap'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:858:in `assigns'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:138:in `match_value'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:116:in `block in match'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:115:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:115:in `match'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/executors/parallel/worker.rb:17:in `on_message'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/micro_actor.rb:82:in `on_envelope'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/micro_actor.rb:72:in `receive'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/micro_actor.rb:99:in `block (2 levels) in run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/micro_actor.rb:99:in `loop'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/micro_actor.rb:99:in `block in run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/micro_actor.rb:99:in `catch'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/micro_actor.rb:99:in `run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/micro_actor.rb:13:in `block in initialize'
/opt/rh/ruby193/root/usr/share/gems/gems/logging-1.8.1/lib/logging/diagnostic_context.rb:323:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/logging-1.8.1/lib/logging/diagnostic_context.rb:323:in `block in create_with_logging_context'

Comment 2 John Matthews 2015-05-19 14:10:24 UTC
Foreman is imposing a validation on the root password:
https://github.com/theforeman/foreman/blob/develop/app/models/hostgroup.rb#L16

Comment 4 Jesus M. Rodriguez 2016-03-28 17:06:19 UTC
Fixed in latest release

Comment 5 Tasos Papaioannou 2016-03-28 20:47:56 UTC
Verified on QCI-1.0-RHEL-7-20160323.t.0.

Comment 11 errata-xmlrpc 2016-09-13 16:25:28 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/RHEA-2016:1862


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