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

Enhance logging around snapshot create/delete #56

Merged

Conversation

agrare
Copy link
Member

@agrare agrare commented Feb 27, 2018

Log the snapshot ref to INFO for both create and delete

https://bugzilla.redhat.com/show_bug.cgi?id=1549299

@agrare
Copy link
Member Author

agrare commented Feb 27, 2018

@miq-bot assign @roliveri

@miq-bot
Copy link
Member

miq-bot commented Feb 27, 2018

Checked commit agrare@5b615bc with ruby 2.3.3, rubocop 0.52.0, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 8 offenses detected

lib/VolumeManager/VolMgrPlatformSupportLinux.rb

else
$log.debug "VolMgrPlatformSupportLinux.postMount: removing snapshot snMor = \"#{@snMor}\""
$log.debug "#{log_prefix}: removing snapshot snMor = \"#{@snMor}\""
Copy link
Member

Choose a reason for hiding this comment

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

Make this at least info to coincide with the call in preMount.

Copy link
Member Author

Choose a reason for hiding this comment

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

I was thinking the pre/post symmetry was that they both logged to info the result after the operation:
$log.info "VolMgrPlatformSupportLinux.preMount: VM snapshot [#{@snMor}] created in [#{Time.now - st}] seconds"
and
$log.info "#{log_prefix}: VM snapshot [#{@snMor}] removed"
But I can just make this info.

Copy link
Member Author

Choose a reason for hiding this comment

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

Or we can add a INFO -- Creating snapshot to preMount, thoughts?

Copy link
Member

Choose a reason for hiding this comment

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

Oh you're right @agrare I didn't see the second line.

@agrare
Copy link
Member Author

agrare commented Feb 27, 2018

@roliveri just amended the commit to include the BZ link

@roliveri roliveri merged commit 24f925e into ManageIQ:master Feb 27, 2018
@agrare agrare deleted the additional_create_delete_snapshot_logging branch February 27, 2018 18:08
@simaishi
Copy link
Contributor

Fine backport (to manageiq-gems-pending repo) details:

$ git log -1
commit 32876723bd9de189e87cc7b5927aa38ac55843d7
Author: Richard Oliveri <oliveri.richard.github@gmail.com>
Date:   Tue Feb 27 13:07:00 2018 -0500

    Merge pull request #56 from agrare/additional_create_delete_snapshot_logging
    
    Enhance logging around snapshot create/delete
    (cherry picked from commit 24f925e9a7b8feb6c87fcd8542b7dd2e63ba1bb6)

@simaishi
Copy link
Contributor

@miq-bot add_label fine/backported

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.

5 participants