Skip to content

Quota master - #689

Closed
abhinandanprateek wants to merge 3 commits into
apache:masterfrom
shapeblue:quota-master
Closed

Quota master#689
abhinandanprateek wants to merge 3 commits into
apache:masterfrom
shapeblue:quota-master

Conversation

@abhinandanprateek

Copy link
Copy Markdown
Contributor

This pull request is for quota service implementation, divided into following two commits:

  1. Quota server side implementation
    a. Quota Framework plugin containing Daos
    b. Quota database plugin for quota APIs
    c. Quota Usage server enhancements
  2. Quota UI plugin

@asfbot

asfbot commented Aug 13, 2015

Copy link
Copy Markdown

cloudstack-pull-rats #281 SUCCESS
This pull request looks good

@asfbot

asfbot commented Aug 13, 2015

Copy link
Copy Markdown

cloudstack-pull-requests #978 SUCCESS
This pull request looks good

@asfbot

asfbot commented Aug 13, 2015

Copy link
Copy Markdown

cloudstack-pull-analysis #214 SUCCESS
This pull request looks good

@DaanHoogland

Copy link
Copy Markdown
Contributor

one big chunk of work Abhi, I have skimmed it and the structure looks good. I must have missed some minor issues in these 7000+ lines of code, though.
One major issue is that there is no single test in there, nor a test instruction/- description. I am sure I will break it if I poke at the other end of the system a bit.

@yadvr

yadvr commented Aug 13, 2015

Copy link
Copy Markdown
Member

@DaanHoogland I think the aim here is to bring the work out for everyone to review early on, Abhi tells me he's already working on unit and marvin tests.

@DaanHoogland

Copy link
Copy Markdown
Contributor

@bhaisaab well it looks promising.

@asfbot

asfbot commented Aug 17, 2015

Copy link
Copy Markdown

cloudstack-pull-rats #318 FAILURE
Looks like there's a problem with this pull request

@asfbot

asfbot commented Aug 17, 2015

Copy link
Copy Markdown

cloudstack-pull-requests #1014 FAILURE
Looks like there's a problem with this pull request

@asfbot

asfbot commented Aug 17, 2015

Copy link
Copy Markdown

cloudstack-pull-rats #321 ABORTED

@asfbot

asfbot commented Aug 17, 2015

Copy link
Copy Markdown

cloudstack-pull-requests #1017 ABORTED

@asfbot

asfbot commented Aug 17, 2015

Copy link
Copy Markdown

cloudstack-pull-analysis #250 FAILURE
Looks like there's a problem with this pull request

@asfbot

asfbot commented Aug 17, 2015

Copy link
Copy Markdown

cloudstack-pull-analysis #253 ABORTED

@abhinandanprateek

Copy link
Copy Markdown
Contributor Author

@DaanHoogland @kishankavala @jburwell The documentation to run and check the plugin are in this pull request: apache/cloudstack-docs-admin#30

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Debug logging statements should be wrapped in a if (s_logger.isDebugEnabled()) check to avoid the overhead of string concatenation when debug logging is not enabled.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Accepted.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please remove commented code as it builds up cruft.

@abhinandanprateek

Copy link
Copy Markdown
Contributor Author

The Transaction open and close causing churn in database connection is based on the notion that these methods somehow open and close db connections.
As far as I see from code they do not deal in DB connection and are only used to initialise the database structures when a DB switch needs to be undertaken or a new transaction context needs to be created.
The suggestion to change this model and the pros and cons should be discussed on mailing list and is clearly separate work than the Usage/Quota Service.

@asfbot

asfbot commented Aug 27, 2015

Copy link
Copy Markdown

cloudstack-pull-rats #416 SUCCESS
This pull request looks good

@asfbot

asfbot commented Aug 27, 2015

Copy link
Copy Markdown

cloudstack-pull-analysis #349 SUCCESS
This pull request looks good

@asfbot

asfbot commented Aug 27, 2015

Copy link
Copy Markdown

cloudstack-pull-rats #424 SUCCESS
This pull request looks good

@asfbot

asfbot commented Aug 27, 2015

Copy link
Copy Markdown

cloudstack-pull-analysis #357 ABORTED

abhinandanprateek and others added 3 commits August 31, 2015 15:38
Quota service while allowing for scalability will make sure that the cloud is
not exploited by attacks, careless use and program errors. To address this
problem, we propose to employ a quota-enforcement service that allows resource
usage within certain bounds as defined by policies and available quotas for
various entities.  Quota service extends the functionality of usage server to
provide a measurement for the resources used by the accounts and domains using a
common unit referred to as cloud currency in this document. It can be configured
to ensure that your usage won’t exceed the budget allocated to accounts/domain
in cloud currency.  It will let user know how much of the cloud resources he is
using. It will help the cloud admins, if they want, to ensure that a user does
not go beyond his allocated quota. Per usage cycle if a account is found to be
exceeding its quota then it is locked. Locking an account means that it will not
be able to initiat e a new resource allocation request, whether it is more
storage or an additional ip. Needless to say quota service as well as any action
on the account is configurable.

FS: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Quota+Service+-+FS

Signed-off-by: Rohit Yadav <[email protected]>
- added marvin test for quota plugin API
- removed unused commented code
- debug messages in debug enabled check
- checks for nulls, fixed access to member variables and feature
- changes based on PR comments
@yadvr

yadvr commented Aug 31, 2015

Copy link
Copy Markdown
Member

Changes included from the PR, branch rebased from latest master.

Please help review - @karuturi @jburwell @DaanHoogland @remibergsma @kishankavala and others

@asfbot

asfbot commented Aug 31, 2015

Copy link
Copy Markdown

cloudstack-pull-rats #452 SUCCESS
This pull request looks good

@jburwell

Copy link
Copy Markdown
Contributor

I will re-review later today (31 August 2015).

@karuturi

Copy link
Copy Markdown
Member

@bhaisaab lot of code :) .. I will review tomorrow.
Can you review 755 if possible? ;)

@DaanHoogland

Copy link
Copy Markdown
Contributor

7.5kloc would justify 15klotc (kilo-lines of test code) I am not very worried about the quality of this code or the zeal of some bluely shaped programmers to maintain it but it will have to be maintainable by others! over 10 lines of code is an hazard to review if there is not twice as much test-code there, give or take.

@asfbot

asfbot commented Aug 31, 2015

Copy link
Copy Markdown

cloudstack-pull-analysis #385 ABORTED

@yadvr

yadvr commented Sep 1, 2015

Copy link
Copy Markdown
Member

New PR here: #768

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants