server: add global configuration for default router service offering#3946
Conversation
|
@ustcweizhou nice feature. |
|
We already have a provision to mention the service offering id while creating network offering which serves the same purpose right! |
@harikrishna-patnala it is an option, but it is complicated to change the offering of a VR : It is very simple with this PR. (1) change setting, (2) restart network with cleanup. |
|
I'm not against the new option, but wanted to know the main intention of adding this. |
|
@blueorangutan package |
|
@DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos6 ✔centos7 ✔debian. JID-1023 |
|
I need a test volunteer, other than |
|
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-1212)
|
I'll test this and post the results |
|
@harikrishna-patnala unsupported parameters provided. Supported mgmt server os are: |
|
Packaging result: ✖centos6 ✔centos7 ✔debian. JID-1042 |
@harikrishna-patnala gooood. if you need my assistance, let me know. |
|
Following are the test cases covered for both isolated and VPC networks.
In test case 4, irrespective of global config parameter VR deployed with default SO. If this behavior is expected a log message would help debugging. |
@harikrishna-patnala thanks for testing. I think it make more sense to use 'VRcustomCO1' instead of 'System Offering For Software Router' in case 4. I will update the PR. |
981c314 to
454f5aa
Compare
| if (serviceOffering != null && serviceOffering.isSystemUse()) { | ||
| boolean isLocalStorage = ConfigurationManagerImpl.SystemVMUseLocalStorage.valueIn(dest.getDataCenter().getId()); | ||
| if (isLocalStorage == serviceOffering.isUseLocalStorage()) { | ||
| logger.debug("service offering " + serviceOffering.getId() + " will be used on virtual router"); |
There was a problem hiding this comment.
offeringUuid would be better than id in the log message. with that LGTM
|
updated based on @harikrishna-patnala 's comment |
| if (accountRouterOffering != null) { | ||
| verifyServiceOfferingByUuid(accountRouterOffering); | ||
| } | ||
| if (serviceOfferingId == null && globalRouterOffering != accountRouterOffering) { |
There was a problem hiding this comment.
Wouldn't we want globalRouterOffering to take precedence over serviceOfferingId, @weizhouapache?
There was a problem hiding this comment.
@DaanHoogland serviceOfferingId is the final offering which will be used on virtual router.
There was a problem hiding this comment.
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.
@DaanHoogland correct. it checks following offerings
- Router service Offering of network/vpc offering
- Account route service offering
- Global route service offering
- Default route offering
If 1 or 2 is set and validated, global setting will not be used.
There was a problem hiding this comment.
@weizhouapache if (serviceOffering != null), which should be always, globalRouterOffering will not be checked, whether or not globalRouterOffering == 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 serviceOfferingId before globalRouterOffering when it is the last resort and is only relevant after globalRouterOffering?
There was a problem hiding this comment.
@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 andverifyServiceOfferingByUuid(globalRouterOffering)will never be executed.
So, why check forserviceOfferingIdbeforeglobalRouterOfferingwhen it is the last resort and is only relevant afterglobalRouterOffering?
@DaanHoogland it is serviceOfferingId , not serviceOffering.
the check procedure
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 )
hope it helps you understanding all changes in PR.
There was a problem hiding this comment.
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 the findAccountServiceOfferingId()?
|
@blueorangutan package |
|
@shwstppr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos7 ✖centos8 ✖debian. JID-1959 |
|
Packaging result: ✖centos7 ✖centos8 ✖debian. JID-1961 |
|
@blueorangutan package |
|
@weizhouapache a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✔centos8 ✔debian. JID-1965 |
|
@blueorangutan test |
|
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-2787)
|
|
@shwstppr do you 👍 this, based on your tests? |
shwstppr
left a comment
There was a problem hiding this comment.
LGTM. Tested in a local env.
- Adding new compute offering and setting it in new global setting results in VR using default offering
- Adding new system service offering for routers and setting it in new global setting results in VR using new offering
- Setting global setting empty results in VR using default offering as expected
Test failures don't seem related. Will be great if we can have corresponding doc PR for user documentation if not there already @weizhouapache
@shwstppr thanks for testing. Will add doc if this is merged. |
|
@weizhouapache is this still up to date? |
@DaanHoogland yes. |
|
@weizhouapache I see consistent smoke test errors for redundant VPCs since this weekend and this is the only related PR I have found so far. can you have a look e.g. at #4200 (comment) |
|
@DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
…ffering (apache#3946)" This reverts commit 2661ce8.
|
Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2244 |
@DaanHoogland |
|
@weizhouapache a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
thanks @weizhouapache , i saw it happening a lot suddenly overnight and got a little worried I had merged something overhastely, sorry, never mind. |
|
Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2248 |
Description
This adds a global setting router.service.offering, which can be uuid of a system offering.
the service offering will be used by virtual routers;
if it is not set, default system offering will be used.
This is a account-scope setting, so it can be set in Account setting as well.
Types of changes
Screenshots (if appropriate):
How Has This Been Tested?
create a system offering
change global setting

restart network with cleanup
new VRs will be created with new offering
