-
Notifications
You must be signed in to change notification settings - Fork 80
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
Bucket Logging: BG worker to upload bucket logs #7816
Conversation
@dannyzaken , @romayalon, @liranmauda |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few comment:
- When we use dbg, we don't need to specify the file name.
for example: instead of writingdbg.log0('Bucket_log_uploader: system_store did not finish initial load');
we should write:dbg.log0('system_store did not finish initial load');
- please add javadoc for typescript on every function.
dac9516
to
feea1ec
Compare
required: ['name', 'log_bucket', 'log_prefix'], | ||
properties: { | ||
name: { | ||
$ref: 'common_api#/definitions/bucket_name', | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's take it out into a different PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
let log_objects = null; | ||
let log_file_path = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
decleration of variable does not require to be initiated with null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
b903cff
to
4295ad4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Bucket logs will be collected and placed on /log/noobaa_bucket_logs/ directory. The BG worker, BucketLogUploader, will keep scanning this directory and upload the object on a log bucket. This log bucket name will be fetched from the log object name. Signed-off-by: Ashish Pandey <aspandey@redhat.com>
4295ad4
to
cb0857e
Compare
Bucket logs will be collected and placed on /log/noobaa_bucket_logs/ directory. The BG worker, BucketLogUploader, will keep scanning this directory and upload the object on a log bucket.
This log bucket name will be fetched from the log object name.
Testing Instructions:
Once the core pod is UP and running , exec into it and create /log/noobaa_bucket_logs/ directory.
Create some files with bucket name which we have created using nb command.
if you have created bucket like this -
nb api bucket_api create_bucket '{
"name": "log.bucket"
}'
Then create files as follows -
echo "Bucket logging " >> /log/noobaa_bucket_logs/log.bucket-1.log
After some time - config.BUCKET_LOG_UPLOADER_DELAY = 5 * 60 * 100; -
This log will be uploaded to log.bucket.