Description of problem:retrying appliance_console setup fails after an intial setup disconnects from broken pipe session. Version-Release number of selected component (if applicable):5.6.4 How reproducible:100% Steps to Reproduce: 1.Get appliance 2.run appliance_console 3.setup db 4.close terminal during 'Initialize postgresql starting' 5.reconnect to appliance 6.run appliance_console 7.setup db again or option 4 'reset database' Actual results: setup = Initialize postgresql failed with error - service exit code: 1. reset db = Failed to reset database Expected results:database configuration should setup correctly, or be recoverable. Additional info: appliance_console.log shows ERROR: Data directory /var/opt/rh/rh-postgresql94/lib/pgsql/data is not empty! and I presume for db reset failed to detect some/all DB configuration http://pastebin.test.redhat.com/452116 A work around for this other than deploying a new appliance is if I manually clear out /var/opt/rh/rh-postgresql94/lib/pgsql/data I can then run appliance_cosole configure db again and it configures correctly.
Hi Luke, I can't reproduce it in the most recent appliance console. The part you mentioned was fixed in https://bugzilla.redhat.com/show_bug.cgi?id=1426769 by Nick Carboni. In Nick's fix, if the data directory mentioned by you is not empty, appliance console will rm -rf it's content first. The same as you did manually. See: https://github.com/ailisp/manageiq-gems-pending/blob/master/lib/gems/pending/util/postgres_admin.rb#L84 But there's still a problem: when db created successfully, but you close the terminal before database.yml created, appliance console will not allow us to create another internal db and ask us to reset first. If we reset db, it will show "Failed to reset database" and in appliance_console.log shows fail because of "database.yml doesn't exist". Should this be consider as the same BZ or create a new one? Since the error message and reason is different -- Even in your case, if you delete postgres data dir, you'll still (very likely) come to this "Failed to reset database because there's no database.yml" situation. Thank you. Regards, Bo
Hi Bo, I think this bz could be closed due to Nicks fix, and I opt for opening a new one for the database.yml if there is still another problem there. Thanks, Luke