Bug 1445819 - appliance_console crash when setting up standby node with no route to host
Summary: appliance_console crash when setting up standby node with no route to host
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.8.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: GA
: 5.9.0
Assignee: Gregg Tanzillo
QA Contact: luke couzens
URL:
Whiteboard: HA:black
Depends On:
Blocks: 1496900
TreeView+ depends on / blocked
 
Reported: 2017-04-26 15:03 UTC by luke couzens
Modified: 2018-03-06 15:11 UTC (History)
7 users (show)

Fixed In Version: 5.9.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1496900 (view as bug list)
Environment:
Last Closed: 2018-03-06 15:11:40 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description luke couzens 2017-04-26 15:03:25 UTC
Description of problem:appliance_console crash when setting up standby node with no route to host


Version-Release number of selected component (if applicable):5.8.0.12


How reproducible:100%


Steps to Reproduce:
1.provision appliance
2.setup standby node
3.pass in bogus primary node ip

Actual results:
Establish Replication Standby Server
Appliance database found under: /var/opt/rh/rh-postgresql95/lib/pgsql/data
Replication standby server can not be configured if the database already exists
Would you like to remove the existing database before configuring as a standby
server?
  WARNING: This is destructive. This will remove all previous data from this
server
Continue? (Y/N): y
No partition found for Standby database disk. You probably want to add an
unpartitioned disk and try again.
Are you sure you don't want to partition the Standby database disk? (Y/N): y
Enter the number uniquely identifying this node in the replication cluster: 1
Enter the cluster database name: |vmdb_production| 
Enter the cluster database username: |root| 
Enter the cluster database password: *******
Enter the cluster database password: *******
Enter the primary database hostname or IP address: ******
Enter the Standby Server hostname or IP address: |******| ******
Configure Replication Manager (repmgrd) for automatic failover? (Y/N): y
/opt/rh/cfme-gemset/bundler/gems/manageiq-gems-pending-12fcafd08821/lib/gems/pending/appliance_console/database_replication_standby.rb:132:in `initialize': could not connect to server: No route to host (PG::ConnectionBad)
	Is the server running on host "*******" and accepting
	TCP/IP connections on port 5432?
	from /opt/rh/cfme-gemset/bundler/gems/manageiq-gems-pending-12fcafd08821/lib/gems/pending/appliance_console/database_replication_standby.rb:132:in `new'
	from /opt/rh/cfme-gemset/bundler/gems/manageiq-gems-pending-12fcafd08821/lib/gems/pending/appliance_console/database_replication_standby.rb:132:in `record_for_node_number'
	from /opt/rh/cfme-gemset/bundler/gems/manageiq-gems-pending-12fcafd08821/lib/gems/pending/appliance_console/database_replication_standby.rb:120:in `node_number_valid?'
	from /opt/rh/cfme-gemset/bundler/gems/manageiq-gems-pending-12fcafd08821/lib/gems/pending/appliance_console/database_replication_standby.rb:38:in `ask_questions'
	from /opt/rh/cfme-gemset/bundler/gems/manageiq-gems-pending-12fcafd08821/lib/gems/pending/appliance_console.rb:555:in `block in <module:ApplianceConsole>'
	from /opt/rh/cfme-gemset/bundler/gems/manageiq-gems-pending-12fcafd08821/lib/gems/pending/appliance_console.rb:108:in `loop'
	from /opt/rh/cfme-gemset/bundler/gems/manageiq-gems-pending-12fcafd08821/lib/gems/pending/appliance_console.rb:108:in `<module:ApplianceConsole>'
	from /opt/rh/cfme-gemset/bundler/gems/manageiq-gems-pending-12fcafd08821/lib/gems/pending/appliance_console.rb:99:in `<top (required)>'
	from /usr/bin/appliance_console:10:in `require'
	from /usr/bin/appliance_console:10:in `<main>'

Expected results: Error message such as, 'No route to host, please check and retype ip address'


Additional info:

Comment 3 CFME Bot 2017-07-06 22:13:09 UTC
New commit detected on ManageIQ/manageiq-gems-pending/master:
https://github.com/ManageIQ/manageiq-gems-pending/commit/ecfa5bb02c1ffa531e3fdfcbe8347901b43ef644

commit ecfa5bb02c1ffa531e3fdfcbe8347901b43ef644
Author:     Bo Yao <boyao>
AuthorDate: Wed Jul 5 17:06:16 2017 -0400
Commit:     Bo Yao <boyao>
CommitDate: Thu Jul 6 16:33:21 2017 -0400

    handle PG::ConnectionBad for database_replication_standby
    https://bugzilla.redhat.com/show_bug.cgi?id=1445819

 lib/gems/pending/appliance_console/database_replication_standby.rb | 6 ++++++
 1 file changed, 6 insertions(+)

Comment 7 luke couzens 2017-10-12 12:01:40 UTC
Verified in 5.9.0.2


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