-
Notifications
You must be signed in to change notification settings - Fork 1.3k
server: add global configuration for default router service offering #3946
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
Merged
DaanHoogland
merged 5 commits into
apache:master
from
ustcweizhou:4.14-add-default-router-offering
Oct 20, 2020
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
3f5a989
server: add global configuration for default router service offering
ustcweizhou a39c3e6
server: use router offering on vpc vr
ustcweizhou 454f5aa
server: verify global setting if account setting is invalid
ustcweizhou 3783a09
server: change debug info
ustcweizhou 576bd89
Merge remote-tracking branch 'apache/master' into 4.14-add-default-ro…
ustcweizhou File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Wouldn't we want
globalRouterOfferingto take precedence overserviceOfferingId, @weizhouapache?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.
@DaanHoogland serviceOfferingId is the final offering which will be used on virtual router.
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, but if we configured a global router offering wouldn't we prefer that even if serviceOfferingId is not 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.
@DaanHoogland correct. it checks following offerings
If 1 or 2 is set and validated, global setting will not be used.
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.
@weizhouapache
if (serviceOffering != null), which should be always,globalRouterOfferingwill not be checked, whether or notglobalRouterOffering==accountRouterOffering.so I don't think your 3 and 4 are correct but this condition will never be met and
verifyServiceOfferingByUuid(globalRouterOffering)will never be executed.So, why check for
serviceOfferingIdbeforeglobalRouterOfferingwhen it is the last resort and is only relevant afterglobalRouterOffering?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.
@DaanHoogland it is serviceOfferingId , not serviceOffering.
cloudstack/server/src/main/java/org/cloud/network/router/deployment/RouterDeploymentDefinition.java
Line 109 in 3783a09
the check procedure
cloudstack/server/src/main/java/org/cloud/network/router/deployment/RouterDeploymentDefinition.java
Lines 416 to 424 in 3783a09
in the account part, considering the uuid might be invalid, so check account setting at first, then global setting if account setting is invalid. (if account setting is not set, accountRouterOffering is actually the global setting, so skip the check if accountRouterOffering equals to globalRouterOffering )
cloudstack/server/src/main/java/org/cloud/network/router/deployment/RouterDeploymentDefinition.java
Lines 393 to 414 in 3783a09
hope it helps you understanding all changes in 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.
ah, i missed the side effect of
verifyServiceOfferingByUuid(), where the id is set, thanks.Maybe to make this more obvious for stupid people like me we can make
verifyServiceOfferingByUuid()return a uuid or null and set it in thefindAccountServiceOfferingId()?