Bug 2036222

Summary: Changing puma workers via satellite-installer forgets to restart foreman service to apply the change
Product: Red Hat Satellite Reporter: Pavel Moravec <pmoravec>
Component: InstallationAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Omkar Khatavkar <okhatavk>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.10.0CC: egolov, gtalreja, pmendezh, saydas
Target Milestone: 6.11.0Keywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-01-27 12:43:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pavel Moravec 2021-12-30 15:54:10 UTC
Description of problem:
Attempting to change the number of Puma workers, an execution of satellite-installer has no immediate effect. The execution of

satellite-installer --foreman-foreman-service-puma-workers=8

does update FOREMAN_PUMA_WORKERS in /etc/systemd/system/foreman.service.d/installer.conf properly, but 'foreman' service is not restarted afterwards, keeping the old number of workers running.


Version-Release number of selected component (if applicable):
Sat 6.10 (also 6.9)


How reproducible:
100%


Steps to Reproduce:
1. Check currently set number of Puma workers and running Puma worker processes:
grep WORKERS /etc/systemd/system/foreman.service.d/installer.conf
ps aux | grep puma | grep worker | nl

2. Change that (ensure you use a different value than the current # of workers):
satellite-installer --foreman-foreman-service-puma-workers=8

3. Check 1. again

4. restart foreman service

5. check 1. again


Actual results:
1. shows same number of FOREMAN_PUMA_WORKERS like # of those processes:
Environment=FOREMAN_PUMA_WORKERS=6
     1	foreman  28025  0.1  1.3 974404 449932 ?       Sl   16:23   0:00 puma: cluster worker 0: 27954 [foreman]
     2	foreman  28031  0.1  1.3 974404 450008 ?       Sl   16:23   0:00 puma: cluster worker 1: 27954 [foreman]
     3	foreman  28037  0.1  1.3 976456 450328 ?       Sl   16:23   0:00 puma: cluster worker 2: 27954 [foreman]
     4	foreman  28042  0.1  1.3 974404 449892 ?       Sl   16:23   0:00 puma: cluster worker 3: 27954 [foreman]
     5	foreman  28046  2.9  1.9 1155700 623236 ?      Sl   16:23   0:04 puma: cluster worker 4: 27954 [foreman]
     6	foreman  28049  0.1  1.3 976456 450116 ?       Sl   16:23   0:00 puma: cluster worker 5: 27954 [foreman]

3. shows config change but same processes:
Environment=FOREMAN_PUMA_WORKERS=8
     1	foreman  28025  0.1  1.3 974404 449932 ?       Sl   16:23   0:00 puma: cluster worker 0: 27954 [foreman]
     2	foreman  28031  0.1  1.3 974404 450008 ?       Sl   16:23   0:00 puma: cluster worker 1: 27954 [foreman]
     3	foreman  28037  0.1  1.3 976456 450328 ?       Sl   16:23   0:00 puma: cluster worker 2: 27954 [foreman]
     4	foreman  28042  0.1  1.3 974404 449892 ?       Sl   16:23   0:00 puma: cluster worker 3: 27954 [foreman]
     5	foreman  28046  2.9  1.9 1155700 623236 ?      Sl   16:23   0:04 puma: cluster worker 4: 27954 [foreman]
     6	foreman  28049  0.1  1.3 976456 450116 ?       Sl   16:23   0:00 puma: cluster worker 5: 27954 [foreman]

5. even after the service restart, we do see the change applied:
Environment=FOREMAN_PUMA_WORKERS=8
     1	foreman  29007  1.0  1.3 976380 449632 ?       Sl   16:46   0:00 puma: cluster worker 0: 28979 [foreman]
     2	foreman  29012  1.1  1.3 974328 449704 ?       Sl   16:46   0:00 puma: cluster worker 1: 28979 [foreman]
     3	foreman  29018  1.0  1.3 976380 449580 ?       Sl   16:46   0:00 puma: cluster worker 2: 28979 [foreman]
     4	foreman  29025  1.0  1.3 976380 449880 ?       Sl   16:46   0:00 puma: cluster worker 3: 28979 [foreman]
     5	foreman  29028  1.0  1.3 976380 449776 ?       Sl   16:46   0:00 puma: cluster worker 4: 28979 [foreman]
     6	foreman  29032  1.1  1.3 976380 449668 ?       Sl   16:46   0:00 puma: cluster worker 5: 28979 [foreman]
     7	foreman  29037  1.0  1.3 976380 449696 ?       Sl   16:46   0:00 puma: cluster worker 6: 28979 [foreman]
     8	foreman  29044  1.1  1.3 976380 449692 ?       Sl   16:46   0:00 puma: cluster worker 7: 28979 [foreman]


Expected results:
Even 3. should show 8 worker processes


Additional info:

Comment 1 Pavel Moravec 2022-01-10 19:06:36 UTC
Also Sat6.9 is affected the same.

Comment 3 Evgeni Golov 2022-01-27 12:39:48 UTC
This is a duplicate of BZ#2025760 which is fixed in 7.0 (but the fix can't be trivially backported as it relies on changes to a 3rd party puppet module)

Comment 4 Evgeni Golov 2022-01-27 12:43:45 UTC

*** This bug has been marked as a duplicate of bug 2025760 ***