Description of problem: Changes to server attributes in the rails console do not persist through evmserverd restarts, and take no effect on the appliance. An example of why this would be useful is if someone has turned on the UI role on a standalone appliance and needs to enable it again. Version-Release number of selected component (if applicable): 5.7.0.17.20161219135818_725f92f How reproducible: 100% Steps to Reproduce: 1. Navigate to the rails console 2. change a server role (either by executing MiqServer.my_server.update_attributes(:name => 'testname') or MiqServer.my_server.name="testname" 3.Execute MiqServer.my_server.save 4. View the new value by executing MiqServer.my_server.name, the value "testname" is shown. Exit the rails console and start a new session. The value persists rails console sessions. 5. The value does not change in the configuration menu in the UI, and no record of the change is made in evm.log 6. Restart the cloudforms process with either rake evm:restart or systemctl restart evmserverd 7. Inspect the value of the changed variable in both the UI and the rails console. Actual results: The value has reverted back to the previous value. Expected results: Changing the value in the rails console should actually change the value. Additional info: talk.manageiq question on this is available here for reference: http://talk.manageiq.org/t/persistently-change-server-attributes-in-the-rails-console/2034
There is PR: https://github.com/ManageIQ/manageiq/pull/11204 introducing script to update settings:tools/configure_server_settings.rb. You can grab configure_server_settings.rb from PR, let us know if it is working for you. Also, there is direct way to add role to server: MiqServer.my_server(true).assign_role("user_interface").