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

ceph: fixing ClientID of log-collector for RGW instance #8889

Merged
merged 1 commit into from Oct 8, 2021

Conversation

parth-gr
Copy link
Member

@parth-gr parth-gr commented Sep 30, 2021

Description of your changes:

The Client_ID generated by operator was
different from the log rotate file created
The Clinet_ID= rgwceph.client.rook.ceph.rgw.my.store.a
and log file name= ceph-client.rgw.my.store.a.log
So changed the CLient_ID to ceph-client.rgw.my.store.a for
correct working and this follow the patterns how other modules
Client_ID is generated

Closes: https://github.com/rook/rook/issues/8692
Signed-off-by: parth-gr <paarora@redhat.com>

Which issue is resolved by this Pull Request:
Resolves # #8692

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the developer guide.
  • Skip Tests for Docs: Add the flag for skipping the build if this is only a documentation change. See here for the flag.
  • Skip Unrelated Tests: Add a flag to run tests for a specific storage provider. See test options.
  • Reviewed the developer guide on Submitting a Pull Request
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.
  • Pending release notes updated with breaking and/or notable changes, if necessary.
  • Upgrade from previous release is tested and upgrade user guide is updated, if necessary.
  • Code generation (make codegen) has been run to update object specifications, if necessary.

@parth-gr parth-gr requested a review from leseb September 30, 2021 12:21
@parth-gr parth-gr changed the title Logrotate object ceph: fixing ClientID of log-collector for RGW instance Sep 30, 2021
@parth-gr
Copy link
Member Author

sed -i "s|*.log|$CEPH_CLIENT_ID.log|" "$LOG_ROTATE_CEPH_FILE"
this will point to the correct file now.

Copy link
Member

@leseb leseb left a comment

Choose a reason for hiding this comment

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

There is definitely a bug in the current implementation.
Please write a helper to return the name and unit test it.

Thanks.

ResourceName: resourceName,
}
daemon := getDaemonName(rgwConfig)
assert.Equal(t, "ceph-client.rgw.default", daemon)
Copy link
Member

Choose a reason for hiding this comment

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

The daemon log also has the daemon ID which is missing in the example, e,g: ceph-client.rgw.my.store.a.log. Let's make this example more realistic.

Copy link
Member

Choose a reason for hiding this comment

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

I would also suggest that we should have 2 test cases for the unit test to make sure that it works as expected for different inputs.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

The Client_ID generated by operator was
different from the log rotate file created
The Clinet_ID= rgwceph.client.rook.ceph.rgw.my.store.a
and log file name= ceph-client.rgw.my.store.a.log
So changed the CLient_ID to ceph-client.rgw.my.store.a for
correct working and this follow the patterns how other modules
Client_ID is generated

Closes: rook#8692
Signed-off-by: parth-gr <paarora@redhat.com>
@leseb leseb merged commit 0e40d6d into rook:master Oct 8, 2021
mergify bot added a commit that referenced this pull request Oct 11, 2021
 ceph: fixing ClientID of log-collector for RGW instance (backport #8889)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants