Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mgr/cephadm: improving logging to send errors to stderr #45685

Merged
merged 1 commit into from Apr 11, 2022

Conversation

rkachach
Copy link
Contributor

@rkachach rkachach commented Mar 29, 2022

Adding logic to use a special logging configuration during bootstrap operation. Basically in this case we will use
a normal behavior:

  • stdout: for debug and info
  • stderr: for errors and warnings

During all other operations (when cephadm is called from the mgr) we will continue using the current configuration:

  • stdout: for JSON output only
  • stderr: for error, debug, info, etc

This way we don't break the current/default functionality and we improve the logging during the bootstrap operation following a normal behavior to handle debug/error messages that any Linux/Unix user may expect.

Fixes: https://tracker.ceph.com/issues/47905

Signed-off-by: Redouane Kachach rkachach@redhat.com

Related PRs:
#41216
#37712

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

@rkachach rkachach requested a review from a team as a code owner March 29, 2022 12:21
@sebastian-philipp
Copy link
Contributor

sebastian-philipp commented Mar 29, 2022

Please refer to #41216 and #37712 and #38995

@rkachach
Copy link
Contributor Author

rkachach commented Mar 29, 2022

Please refer to #41216 and #37712 and #38995

Do you mean add references to these PRs in the description of my PR?

@sebastian-philipp
Copy link
Contributor

Please refer to #41216 and #37712 and #38995

Do you mean add references to these PRs in the description of my PR?

I'd read those linked PRs.

@rkachach
Copy link
Contributor Author

Please refer to #41216 and #37712 and #38995

Do you mean add references to these PRs in the description of my PR?

I'd read those linked PRs.

I see, thanks for mentioning them. Before implementing my PR I have already read one of the PRs you referenced (#37712) so I was aware of the issues related with JSON output. My PR fixes are meant to fix the case of bootstrap without impacting the normal cephadm behavior (at least that's the intention behind the changes).

@rkachach
Copy link
Contributor Author

jenkins test api

1 similar comment
@adk3798
Copy link
Contributor

adk3798 commented Apr 8, 2022

jenkins test api

Copy link
Contributor

@adk3798 adk3798 left a comment

Choose a reason for hiding this comment

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

Definitely completes the ask laid out in the tracker. One open question

src/cephadm/cephadm Outdated Show resolved Hide resolved
Fixes: https://tracker.ceph.com/issues/47905

Signed-off-by: Redouane Kachach <rkachach@redhat.com>
@adk3798
Copy link
Contributor

adk3798 commented Apr 8, 2022

jenkins test api

@adk3798
Copy link
Contributor

adk3798 commented Apr 11, 2022

http://pulpito.front.sepia.ceph.com/adking-2022-04-08_22:17:12-orch:cephadm-wip-adk-testing-2022-04-08-1434-distro-basic-smithi/

2 failures:

@adk3798 adk3798 merged commit b8d25e0 into ceph:master Apr 11, 2022
@rkachach rkachach deleted the fix_issue_47905 branch April 12, 2022 10:44
@adk3798 adk3798 mentioned this pull request Apr 27, 2022
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants