Skip to content

add date to usage server logs#2884

Merged
PaulAngus merged 1 commit into
apache:4.11from
shapeblue:usage-server-timstamp
Oct 8, 2018
Merged

add date to usage server logs#2884
PaulAngus merged 1 commit into
apache:4.11from
shapeblue:usage-server-timstamp

Conversation

@PaulAngus
Copy link
Copy Markdown
Member

@PaulAngus PaulAngus commented Oct 7, 2018

Description

When logging operations of the usage server, a timestamp is not included, making the usage logs hard to interpret.
The same timestamp as used by them management log has been added to the usage server logging output.

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)

GitHub Issue/PRs

Timestamp added to the log4j.xml description of output.
Output now looks like:

2018-10-07 00:15:00,001 INFO [cloud.usage.UsageManagerImpl] (Usage-Job-1:null) (logid:) starting usage job...
2018-10-07 00:15:00,016 INFO [cloud.usage.UsageManagerImpl] (Usage-Job-1:null) (logid:) Parsing usage records between Sat Oct 06 00:00:00 UTC 2018 and Sat Oct 06 23:59:59 UTC 2018
2018-10-07 00:15:00,151 DEBUG [event.dao.UsageEventDaoImpl] (Usage-Job-1:null) (logid:) no recent event date, copying all events

Screenshots (if appropriate):

How Has This Been Tested?

This has been tested by building RPMs, installing the usage service and checking the log output.

Checklist:

  • I have read the CONTRIBUTING document.
  • [ x ] My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
    Testing
  • I have added tests to cover my changes.
  • [ x ] All relevant new and existing integration tests have passed.
  • [ x ] A full integration testsuite with all test that can run on my environment has passed.

@PaulAngus PaulAngus added this to the 4.11.2.0 milestone Oct 7, 2018
@PaulAngus PaulAngus self-assigned this Oct 7, 2018
@yadvr
Copy link
Copy Markdown
Member

yadvr commented Oct 7, 2018

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✔centos6 ✔centos7 ✖debian. JID-2333

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Oct 7, 2018

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-3061)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 38897 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr2884-t3061-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_privategw_acl.py
Intermittent failure detected: /marvin/tests/smoke/test_public_ip_range.py
Intermittent failure detected: /marvin/tests/smoke/test_templates.py
Intermittent failure detected: /marvin/tests/smoke/test_usage.py
Intermittent failure detected: /marvin/tests/smoke/test_vm_life_cycle.py
Intermittent failure detected: /marvin/tests/smoke/test_volumes.py
Intermittent failure detected: /marvin/tests/smoke/test_hostha_kvm.py
Smoke tests completed. 61 look OK, 6 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_03_vpc_privategw_restart_vpc_cleanup Failure 1168.62 test_privategw_acl.py
test_04_extract_template Failure 128.41 test_templates.py
ContextSuite context=TestISOUsage>:setup Error 0.00 test_usage.py
test_04_nonsecured_to_secured_vm_migration Error 226.32 test_vm_life_cycle.py
test_06_download_detached_volume Failure 138.61 test_volumes.py
test_hostha_enable_ha_when_host_in_maintenance Error 3.62 test_hostha_kvm.py

@yadvr yadvr requested a review from nvazquez October 8, 2018 07:20
Copy link
Copy Markdown
Contributor

@nvazquez nvazquez left a comment

Choose a reason for hiding this comment

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

LGTM

@PaulAngus PaulAngus merged commit 37ecfe2 into apache:4.11 Oct 8, 2018
@yadvr
Copy link
Copy Markdown
Member

yadvr commented Oct 9, 2018

@PaulAngus please use the squash and merge option in future while merging PRs, and if possible please also forward merge to master branch, thanks.
screenshot from 2018-10-09 05-34-51

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.

4 participants