Skip to content

Conversation

@DaanHoogland
Copy link
Contributor

@DaanHoogland DaanHoogland commented Dec 4, 2024

Description

This PR fixes #9872

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

Also see original ticket, set the contents of /etc/systemd/system/cloudstack-management.service.d/filelimit.conf

# vi /etc/systemd/system/cloudstack-management.service.d/filelimit.conf 
# systemctl daemon-reload
# systemctl restart cloudstack-management
# cat /proc/$(ps aux |grep cloudstack-management|grep -v grep |awk '{print $2}')/limits

@weizhouapache
Copy link
Member

@DaanHoogland

  • is there some changes for debian ?

  • I checked my env

# cat /proc/$(ps aux |grep cloudstack-management|grep -v grep |awk '{print $2}')/limits
Limit                     Soft Limit           Hard Limit           Units     
...
Max open files            524288               524288               files     
...

after applying the changes, run systemctl daemon-reload and restarted mgmt server,

# cat /proc/$(ps aux |grep cloudstack-management|grep -v grep |awk '{print $2}')/limits
Limit                     Soft Limit           Hard Limit           Units     
...
Max open files            500000               500000               files     
...

it works. but what should be the best value ?

@codecov
Copy link

codecov bot commented Dec 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 15.13%. Comparing base (47f6019) to head (8c1ef25).
Report is 10 commits behind head on 4.19.

Additional details and impacted files
@@            Coverage Diff            @@
##               4.19   #10040   +/-   ##
=========================================
  Coverage     15.13%   15.13%           
- Complexity    11261    11268    +7     
=========================================
  Files          5408     5408           
  Lines        473842   473890   +48     
  Branches      57771    57787   +16     
=========================================
+ Hits          71696    71704    +8     
- Misses       394145   394182   +37     
- Partials       8001     8004    +3     
Flag Coverage Δ
uitests 4.30% <ø> (ø)
unittests 15.85% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@DaanHoogland
Copy link
Contributor Author

@weizhouapache I think the best value is installation dependant. If it works on debian-likes, there is nothing to do there. This was reported by a user on centos7 and does not pertain to the default value but to the mechs of changing it that didn't work. We can change the value before merging to contain the default. I hadn't looked at that yet. It was just a guestimate.

@weizhouapache
Copy link
Member

@weizhouapache I think the best value is installation dependant. If it works on debian-likes, there is nothing to do there. This was reported by a user on centos7 and does not pertain to the default value but to the mechs of changing it that didn't work. We can change the value before merging to contain the default. I hadn't looked at that yet. It was just a guestimate.

it looks like there is no such file for debian/ubuntu. we can skip it for now (better to have).

currently the value for rhel is 4096 which is too small.

$ cat packaging/el8/cloud.limits
cloud hard nofile 4096
cloud soft nofile 4096

Copy link
Member

@weizhouapache weizhouapache left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code lgtm
not tested yet

the only concern is the value of open file descriptors

@DaanHoogland DaanHoogland linked an issue Dec 5, 2024 that may be closed by this pull request
@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 11761

@apache apache deleted a comment from vishesh92 Dec 9, 2024
@apache apache deleted a comment from blueorangutan Dec 9, 2024
@apache apache deleted a comment from blueorangutan Dec 9, 2024
@DaanHoogland
Copy link
Contributor Author

@blueorangutan test keepEnv

@blueorangutan
Copy link

@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-11874)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 48279 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10040-t11874-kvm-ol8.zip
Smoke tests completed. 133 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@DaanHoogland DaanHoogland marked this pull request as ready for review December 10, 2024 14:55
@DaanHoogland
Copy link
Contributor Author

ping @vishesh92 , I think this is ready (if you agree)

@vishesh92
Copy link
Member

We also need to set LimitNPROC for the management server to update max number of processes.

@vishesh92
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

@vishesh92 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 11840

@DaanHoogland
Copy link
Contributor Author

@blueorangutan test

@blueorangutan
Copy link

@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-11939)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 47228 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10040-t11939-kvm-ol8.zip
Smoke tests completed. 133 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

Copy link
Member

@vishesh92 vishesh92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm. didn't test.

@vishesh92
Copy link
Member

Tested. after the change

...
Max processes             unlimited            unlimited            processes
...

@vishesh92 vishesh92 merged commit 0944fa1 into apache:4.19 Dec 19, 2024
26 checks passed
@vishesh92 vishesh92 deleted the ghi9872-ulimits branch December 19, 2024 11:07
@weizhouapache
Copy link
Member

is setting for LimitNOFILE needed ?
@DaanHoogland @vishesh92

@DaanHoogland
Copy link
Contributor Author

I think none of the sessions are needed @weizhouapache , just the facility for operators to do it. The old method/file did not work with systemd, hence the new one.

@weizhouapache
Copy link
Member

I think none of the sessions are needed @weizhouapache , just the facility for operators to do it. The old method/file did not work with systemd, hence the new one.

thanks @DaanHoogland

the file name filelimit.conf is a bit out-of-date.
never mind, let's keep it

@DaanHoogland
Copy link
Contributor Author

the file name filelimit.conf is a bit out-of-date. never mind, let's keep it

ai, you are right. I'll create a rename PR soon.

DaanHoogland added a commit that referenced this pull request Dec 20, 2024
* 4.20:
  VR: apply iptables rules when add/remove static routes (#10064)
  Certificate and VM hostname validation improvements (#10051)
  set ulimit for server according to redhat spec (#10040)
  kvm-storage: provide isVMMigrate information to storage plugins (#10093)
  Allow config drive deletion of migrated VM, on host maintenance (#10045)
  linstor: improve heartbeat check with also asking linstor (#10105)
  server: simplify role change validation (#9173)
  UI: create VPC network offering with conserve mode (#10082)
  server: fix typo removeaccessvpn in VirtualRouterElement (#10086)
  UI: remove duplicated Instance Name in Public IP details page (#10087)
  UI: Fixes in the Usage UI (#10000)
  SAML2: add cookie with HttpOnly too #10013 (#10047)
  ui: Allow font-awesome icon usage and optimise icon size inconsistency (#9744)
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ulimits are ignored for systemd processes

4 participants