-
Notifications
You must be signed in to change notification settings - Fork 14
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
Improve accounting scripts #95
Conversation
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.
Partial review
OpenStack-accounting/usr/local/sbin/manila_extract_accounting.py
Outdated
Show resolved
Hide resolved
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.
I've done a first-pass - I've raised some suggestions - these will apply to all scripts - I've just chosen a few to comment on
You should also add unit-tests to these scripts - though we can leave this for another PR 😄
OpenStack-accounting/usr/local/sbin/cinder_extract_accounting.py
Outdated
Show resolved
Hide resolved
OpenStack-accounting/usr/local/sbin/cinder_extract_accounting.py
Outdated
Show resolved
Hide resolved
OpenStack-accounting/usr/local/sbin/glance_extract_accounting.py
Outdated
Show resolved
Hide resolved
OpenStack-accounting/usr/local/sbin/glance_extract_accounting.py
Outdated
Show resolved
Hide resolved
@anish-mudaraddi @meoflynn @DavidFair I believe I've addressed your feedback on this. |
I think this is ready now |
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.
Looks good to me, I just had a question about the glance accounting query
This procedure generates accounting data for cinder | ||
*/ | ||
SELECT | ||
IFNULL(v.availability_zone, 'nova') AS AvailabilityZone, |
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.
Just to double check, here is it only selecting nova
as the availability zone if there isn't an availability zone for a given volume (e.g. volume doesn't have a ceph availability zone and is just 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.
Yes, that is what that's doing
Convert to Python3
Use dedicated accounting database user
Improvements to the accounting suite
Add accounting for other components