Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: When providing a value to the worker configs for memory threshold (either via the Ops UI, or advanced config), values that aren't integers, or are no strings with a method attached (i.e. 200.megabytes) are not interpreted as byte integers properly. Version-Release number of selected component (if applicable): 5.10.0 How reproducible: 100% Steps to Reproduce: 1. Go to Configuration > Server > Advanced 2. Enter a value for a worker (:priority_worker: for example) that is a string integer ("524288000" for example, which is also "500.megabytes"). 3. Save. Actual results: The worker will not boot properly, since it doesn't set the memory threshold to something valid (usually leads to a continually restarting worker) Expected results: Workers boot normally and are properly monitored. Additional info: Related tickets - https://bugzilla.redhat.com/show_bug.cgi?id=1672437 - https://bugzilla.redhat.com/show_bug.cgi?id=1656873 This tackles issues from the backend to allow the issues from the frontend to not completely cripple the system, but does not fully address the issues found in the two above tickets.
This PR has been merged and addresses the issue: https://github.com/ManageIQ/manageiq/pull/18453
Verified in CFME 5.11.0.1.20190424210327_58b5dbd. Steps of verification: 1) Navigate to Configuration -> Advanced settings 2) Changed the memory threshold of e.g. "priority worker" to e.g. "1500000000" (with the quotes in the config yaml) 3) Observed the configuration sync in evm.log. I was able to see that the memory threshold was saved as: 1500000000 (without quotes) 4) Verified that the workers were not restarted in the process by watching them with the command "ps -f -p <PID>" where <PID> is the PID of the worker 5) I also checked with the "Generic Worker" and was able to see the same behavior. I am therefore marking this as verified. Snippet from evm.log: [----] I, [2019-04-30T16:02:32.343284 #47957:2b0cf676a5c4] INFO -- : MIQ(MiqPriorityWorker::Runner#message_sync_config) MIQ(MiqPriorityWorker::Runner) Synchronizing configuration complete... [----] I, [2019-04-30T16:02:32.396349 #44706:2b0cf676a5c4] INFO -- : MIQ(MiqPriorityWorker::Runner#sync_config) ID [76], PID [44706], GUID [20d7e4d3-dee2-4d6e-bd90-489b1dc1dac9], Zone [default], Active Roles [automate,database_operations,database_owner,ems_inventory,ems_metrics_collector,ems_metrics_processor,ems_operations,event,notifier,remote_console,reporting,scheduler,smartstate,user_interface,web_services], Assigned Roles [automate,database_operations,database_owner,ems_inventory,ems_metrics_collector,ems_metrics_processor,ems_operations,event,notifier,remote_console,reporting,scheduler,smartstate,user_interface,web_services], Configuration: [----] I, [2019-04-30T16:02:32.396830 #44706:2b0cf676a5c4] INFO -- : --- :count: 2 :gc_interval: 900 :heartbeat_freq: 10 :heartbeat_timeout: 120 :memory_threshold: 1500000000 :nice_delta: 1 :parent_time_threshold: 180 :poll: 1 :poll_escalate_max: 30 :poll_method: :normal :restart_interval: 0 :starting_timeout: 600 :stopping_timeout: 600 :cpu_usage_threshold: 100 :dequeue_method: :drb :queue_timeout: 600 [----] I, [2019-04-30T16:02:32.396890 #44706:2b0cf676a5c4] INFO -- : --- [----] I, [2019-04-30T16:02:32.397093 #44706:2b0cf676a5c4] INFO -- :