Bug 1677009 - Worker Config Memory Threshold does not respect "string numbers"
Summary: Worker Config Memory Threshold does not respect "string numbers"
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.10.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.11.0
Assignee: Nick LaMuro
QA Contact: John Dupuy
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks: 1677409
TreeView+ depends on / blocked
 
Reported: 2019-02-13 18:46 UTC by Nick LaMuro
Modified: 2019-12-13 15:16 UTC (History)
5 users (show)

Fixed In Version: 5.11.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1677409 (view as bug list)
Environment:
Last Closed: 2019-12-13 15:16:38 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Nick LaMuro 2019-02-13 18:46:31 UTC
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.

Comment 1 Nick LaMuro 2019-02-13 18:47:36 UTC
This PR has been merged and addresses the issue:

https://github.com/ManageIQ/manageiq/pull/18453

Comment 4 John Dupuy 2019-04-30 20:06:32 UTC
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 -- :


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