FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

undo removal of accessLogger and deal with some warnings by DaanHoogland · Pull Request #10567 · apache/cloudstack · GitHub

Repository navigation

undo removal of accessLogger and deal with some warnings - #10567

Merged
harikrishna-patnala merged 3 commits into
apache:4.20from
shapeblue:ghi10565-apiLogger
Apr 14, 2025
Merged

harikrishna-patnala merged 3 commits into
apache:4.20from
shapeblue:ghi10565-apiLogger

Conversation

DaanHoogland commented Mar 13, 2025 •
edited
Loading

Copy link
Copy Markdown
Contributor

Description

This PR

Fixes: #10565

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?

started an env and monitorred /var/log/cloudstack/management/apilog.log

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

DaanHoogland changed the title undo removval of accessLogger and deal with some warnings undo removal of accessLogger and deal with some warnings Mar 13, 2025
DaanHoogland linked an issue Mar 13, 2025 that may be closed by this pull request

codecov Bot commented Mar 13, 2025 •
edited
Loading

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 29.68750% with 45 lines in your changes missing coverage. Please review.

Project coverage is 16.01%. Comparing base (f8adedc) to head (b031d99).
Report is 31 commits behind head on 4.20.

Files with missing lines Patch % Lines
server/src/main/java/com/cloud/api/ApiServer.java 27.41% 45 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               4.20   #10567   +/-   ##
=========================================
  Coverage     16.00%   16.01%           
- Complexity    13104    13113    +9     
=========================================
  Files          5651     5651           
  Lines        495843   495853   +10     
  Branches      60045    60047    +2     
=========================================
+ Hits          79363    79409   +46     
+ Misses       407624   407581   -43     
- Partials       8856     8863    +7     
Flag Coverage Δ
uitests 4.00% <ø> (-0.01%) ⬇️
unittests 16.85% <29.68%> (+<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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

GutoVeronezi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

CLGTM

GutoVeronezi requested a review from JoaoJandre March 14, 2025 15:52

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

Copy link
Copy Markdown

@DaanHoogland 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.

Copy link
Copy Markdown

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

Pearl1594 requested a review from gp-santos March 17, 2025 12:47

Copy link
Copy Markdown
Contributor

@blueorangutan test

Copy link
Copy Markdown

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

gp-santos left a comment •
edited
Loading

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I'd probably call the logger ACCESS_LOGGER (or API_LOGGER) since it's a constant, but it's not really an issue. LGTM

Edit: Actually, nevermind since it's a reference.

Copy link
Copy Markdown
Contributor

Thanks for reviewing @gpordeus!

Copy link
Copy Markdown

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

Test Result Time (s) Test File
ContextSuite context=TestIpv4Routing>:setup Error 0.00 test_ipv4_routing.py
test_04_list_domains_level_filter Failure 0.05 test_list_domains.py
test_05_list_domains_no_filter Failure 0.04 test_list_domains.py
ContextSuite context=TestSharedNetworkWithConfigDrive>:setup Error 1520.66 test_network.py
test_01_sys_vm_start Failure 0.13 test_secondary_storage.py

DaanHoogland marked this pull request as ready for review March 19, 2025 16:31
DaanHoogland added this to the 4.20.1 milestone Mar 19, 2025

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

Copy link
Copy Markdown

@DaanHoogland 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.

Copy link
Copy Markdown

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

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

Copy link
Copy Markdown

@DaanHoogland 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.

Copy link
Copy Markdown

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

Copy link
Copy Markdown
Contributor Author

@blueorangutan test

Copy link
Copy Markdown

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

Copy link
Copy Markdown

[SF] Trillian Build Failed (tid-12830)

Copy link
Copy Markdown
Contributor Author

tested and does not work to satisfaction yet (empty /var/log/cloudstack/management/apilog.log)

DaanHoogland marked this pull request as draft March 27, 2025 09:37

Copy link
Copy Markdown
Contributor Author

tested and does not work to satisfaction yet (empty /var/log/cloudstack/management/apilog.log)

cc @Pearl1594 @JoaoJandre maybe a fluke but no cigar so far

gp-santos commented Mar 28, 2025 •
edited
Loading

Copy link
Copy Markdown
Collaborator

@DaanHoogland, I compared with the log4j2 PR and found the logger in ApiServlet is also missing.

As for the handle() method in ApiServer, its comment says it is used in requests from the integration port, but I haven't tested it.

(added the prints since opening the PR is a pain)

prints from #7131


Copy link
Copy Markdown
Contributor Author

@DaanHoogland, I compared with the log4j2 PR and found the logger in ApiServlet is also missing.

As for the handle() method in ApiServer, its comment says it is used in requests from the integration port, but I haven't tested it.

(added the prints since opening the PR is a pain)
prints from #7131

thanks for the heads-up @gpordeus , will re-add that as well.

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

Copy link
Copy Markdown

@DaanHoogland 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.

Copy link
Copy Markdown

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

Copy link
Copy Markdown

[SF] Trillian Build Failed (tid-12853)

DaanHoogland marked this pull request as ready for review March 29, 2025 18:27

yadvr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Needs QA, otherwise LGTM

yadvr commented Apr 7, 2025

Copy link
Copy Markdown
Member

@blueorangutan package

Copy link
Copy Markdown

@rohityadavcloud 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.

Copy link
Copy Markdown

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

Copy link
Copy Markdown
Contributor

@blueorangutan test

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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

Test Result Time (s) Test File

harikrishna-patnala left a comment •
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

tested and also code LGTM

[root@pr10567-t12975-kvm-ol8-mgmt1 management]# ls a*
access.log  apilog.log

[root@pr10567-t12975-kvm-ol8-mgmt1 management]# tail -n 5 access.log 
172.30.205.2 - - [14/Apr/2025:08:09:24 +0000] "GET /client/api/?command=listClusters&response=json&sessionkey=ONmBjAW4pzwCyVmLym1dWOIoD1Q HTTP/1.1" 200 339 "http://x.x.x.x:8080/client/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:137.0) Gecko/20100101 Firefox/137.0" 60
172.30.205.2 - - [14/Apr/2025:08:09:25 +0000] "GET /client/api/?command=listStoragePools&response=json&sessionkey=ONmBjAW4pzwCyVmLym1dWOIoD1Q HTTP/1.1" 200 528 "http://x.x.x.x:8080/client/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:137.0) Gecko/20100101 Firefox/137.0" 19
172.30.205.2 - - [14/Apr/2025:08:09:25 +0000] "GET /client/api/?listall=true&projectid=-1&command=listRouters&response=json&sessionkey=ONmBjAW4pzwCyVmLym1dWOIoD1Q HTTP/1.1" 200 26 "http://x.x.x.x:8080/client/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:137.0) Gecko/20100101 Firefox/137.0" 15
172.30.205.2 - - [14/Apr/2025:08:09:25 +0000] "GET /client/api/?command=listSystemVms&response=json&sessionkey=ONmBjAW4pzwCyVmLym1dWOIoD1Q HTTP/1.1" 200 783 "http://x.x.x.x:8080/client/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:137.0) Gecko/20100101 Firefox/137.0" 76
172.30.205.2 - - [14/Apr/2025:08:09:25 +0000] "GET /client/api/?listall=true&projectid=-1&details=min&page=1&pagesize=1&command=listVirtualMachines&response=json&sessionkey=ONmBjAW4pzwCyVmLym1dWOIoD1Q HTTP/1.1" 200 54 "http://x.x.x.x:8080/client/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:137.0) Gecko/20100101 Firefox/137.0" 17

[root@pr10567-t12975-kvm-ol8-mgmt1 management]# tail -n 5 apilog.log 
2025-04-14 08:09:25,202 INFO  [a.c.c.a.ApiServlet] (qtp1390913202-20:[ctx-a7447dba, ctx-f96449d7]) (logid:86631311) (userId=2 accountId=2 sessionId=node01l98g1lhhmtqb1qmj5j6e1nb7v2) 172.30.205.2 -- GET listall=true&projectid=-1&details=min&page=1&pagesize=1&command=listVirtualMachines&response=json&sessionkey=ONmBjAW4pzwCyVmLym1dWOIoD1Q 200 {"listvirtualmachinesresponse":{}}
2025-04-14 08:09:29,467 INFO  [a.c.c.a.ApiServlet] (qtp1390913202-23:[ctx-0d563675, ctx-864386e3]) (logid:82b480d5) (userId=2 accountId=2 sessionId=node01l98g1lhhmtqb1qmj5j6e1nb7v2) 172.30.205.2 -- GET command=readyForShutdown&response=json&sessionkey=ONmBjAW4pzwCyVmLym1dWOIoD1Q 200 {"readyforshutdownresponse":{"readyforshutdown":{"readyforshutdown":true,"shutdowntriggered":false,"pendingjobscount":0}}}

harikrishna-patnala merged commit dd1c32c into apache:4.20 Apr 14, 2025
github-project-automation Bot moved this from In Progress to Done in ACS 4.20.1 Apr 14, 2025
DaanHoogland deleted the ghi10565-apiLogger branch April 14, 2025 08:18
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Jun 19, 2025
* undo removval of accessLogger and deal with some warnings

* Apply suggestions from code review

* add accesslog to servlet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

API logs not generated in 4.20

8 participants


Back | FazBrowse Home | New Git URL