Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

Ensure proper quota is imposed when moving gears across node profiles #6172

Merged
merged 1 commit into from Aug 14, 2015

Conversation

tiwillia
Copy link
Member

Bug 1229300
https://bugzilla.redhat.com/show_bug.cgi?id=1229300
When moving gears across node profiles, ensure that the quota for the new node profile is imposed on the gear during the move.

@tiwillia
Copy link
Member Author

[test]

@brenton
Copy link
Contributor

brenton commented Jul 1, 2015

This looks good to me. I couldn't find any oo-admin-move related tests (which sort of makes sense given that the tests run on a single system). I guess we'd just have to have QE test this as part of their suite.

@a13m
Copy link
Contributor

a13m commented Jul 1, 2015

@tiwillia , this patch does not appear to consider the case where a user has elected to add extra storage to the gear, as they are allowed to do in OpenShift Online.

@tiwillia
Copy link
Member Author

@a13m , thanks for pointing that out. I've made changes so that any additional storage is taken into consideration. Could you review one more time?

@openshift-bot
Copy link

@tiwillia
Copy link
Member Author

@abhgupta I got the 'OK' from @a13m several days ago. Could you review/merge?

# subtract source container quota from source node quota
# add the difference to destination quota
additional_blocks = Integer(gear_quota[3]) - get_quota_blocks
additional_files = Integer(gear_quota[6]) - get_quota_files
Copy link
Member

Choose a reason for hiding this comment

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

I'd be more comfortable if we used source_container.get_quota_blocks and source_container.get_quota_files in the lines above. While the source container is implied to be the current container, it is best not to make this assumption, especially since the source_container is available and explicitly specified in line 1999 above.

@abhgupta
Copy link
Member

@tiwillia LGTM, other than the one comment I made

Bug 1229300
https://bugzilla.redhat.com/show_bug.cgi?id=1229300
When moving gears across node profiles, ensure that the quota for the new node profile is imposed on the gear during the move.
@tiwillia
Copy link
Member Author

@abhgupta thanks for the excellent suggestion. I've made the recommended change. Could you review again and merge if it is acceptable?

@openshift-bot
Copy link

Evaluated for online test up to 4908a10

@abhgupta
Copy link
Member

[merge]

@openshift-bot
Copy link

Online Merge Results: SUCCESS (https://ci.dev.openshift.redhat.com/jenkins/job/merge_pull_requests/6498/) (Image: devenv_5603)

@tiwillia
Copy link
Member Author

@abhgupta can you re-merge? Looks like an example of the merge queue failures.

@tiwillia
Copy link
Member Author

re-[merge] test failures are due to timeouts and are unrelated to this PR

@openshift-bot
Copy link

Evaluated for online merge up to 4908a10

openshift-bot pushed a commit that referenced this pull request Aug 14, 2015
@openshift-bot openshift-bot merged commit b239381 into openshift:master Aug 14, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants