I’m experimenting with adjusting server attributes from the Rails console and I’m running into issues. Hopefully someone can shed some light on this.
Being able to do this has a lot of implications, but primarily, it would be neat to know how to turn the UI role back on in a standalone appliance that had it turned off. Long ago, there was a way to do this through config/settings.yml but that file hasn’t seemed to actually do anything for a while. So I tried a couple of other things. As an example let’s say I’m trying to enable the websocket role in an appliance that has it turned off.
I can see what roles are enabled by executing:
from the rails console. This gives me something like:
irb(main):001:0> MiqServer.my_server.role PostgreSQLAdapter#log_after_checkout, connection_pool: size: 5, connections: 1, in use: 1, waiting_in_queue: 0 => "automate,database_operations,database_owner,event,reporting,scheduler,user_interface,web_services"
I can make the websocket role show up in the rails console by executing:
or something like:
MiqServer.my_server.update_attributes(:role => "automate,database_operations,database_owner,event,reporting,scheduler,user_interface,web_services,websocket")
That change persists through rails console sessions, but does not survive an evmserverd restart. It also never shows up in the UI in the configuration menu, so for all intents and purposes I assume it’s not taking effect. Since that didn’t work I thought maybe the “save” method might work, so I tried this on both:
for good measure. But neither work. Nothing survives a process restart and nothing ever impacts the settings in the UI.
Anyone have any ideas?