Skip to content

Display vlan ip range for specified domainid#4634

Merged
sureshanaparti merged 2 commits intoapache:mainfrom
ravening:list-domain-vlan
Sep 20, 2021
Merged

Display vlan ip range for specified domainid#4634
sureshanaparti merged 2 commits intoapache:mainfrom
ravening:list-domain-vlan

Conversation

@ravening
Copy link
Copy Markdown
Member

@ravening ravening commented Feb 1, 2021

Description

Currently if we try to list vlan ip range by passing
domainid then it lists for all domain. Make sure that
it lists only for that domain

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

Before the changes

(local) 🐱 > list vlanipranges domainid=4aa4c-f694-45c0-8844-8d9a129
{
  "count": 14,
  "vlaniprange": [

After the changes

(local) 🐱 > list vlanipranges domainid=4560c-f694-45c0-8844-8d94129
{
  "count": 1,
  "vlaniprange": [

How Has This Been Tested?

@DaanHoogland
Copy link
Copy Markdown
Contributor

@ravening, do you intend this for master/4.16 only or do you want this on older versions?

@ravening
Copy link
Copy Markdown
Member Author

ravening commented Feb 1, 2021

@ravening, do you intend this for master/4.16 only or do you want this on older versions?

@DaanHoogland 4.16 is good

Copy link
Copy Markdown
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

no comment on this PR but all this DAO code really shouldn't be in the ManagementServer

@shwstppr shwstppr added this to the 4.16.0.0 milestone Feb 8, 2021
@yadvr
Copy link
Copy Markdown
Member

yadvr commented Jun 17, 2021

ping @ravening

@ravening
Copy link
Copy Markdown
Member Author

no comment on this PR but all this DAO code really shouldn't be in the ManagementServer

@DaanHoogland any idea where else I can add this ?

@DaanHoogland
Copy link
Copy Markdown
Contributor

no comment on this PR but all this DAO code really shouldn't be in the ManagementServer

@DaanHoogland any idea where else I can add this ?

DomainVlanMapDaoImpl, i'd say.

@DaanHoogland
Copy link
Copy Markdown
Contributor

@ravening you have a new conflict

@nvazquez
Copy link
Copy Markdown
Contributor

@ravening can you move the logic to the DAO layer and fix the conflicts?

@ravening
Copy link
Copy Markdown
Member Author

no comment on this PR but all this DAO code really shouldn't be in the ManagementServer

@DaanHoogland any idea where else I can add this ?

DomainVlanMapDaoImpl, i'd say.

@DaanHoogland Im using the same code which is used by account and pod also which are present above and below of this code. So even they needs to be moved away?

I searched in other places in the same file and they are also using the same logic. for eg: publicipaddress, loadbalancer, resourcetag, vlan, guestos

@DaanHoogland
Copy link
Copy Markdown
Contributor

no comment on this PR but all this DAO code really shouldn't be in the ManagementServer

@DaanHoogland any idea where else I can add this ?

DomainVlanMapDaoImpl, i'd say.

@DaanHoogland Im using the same code which is used by account and pod also which are present above and below of this code. So even they needs to be moved away?

I searched in other places in the same file and they are also using the same logic. for eg: publicipaddress, loadbalancer, resourcetag, vlan, guestos

@ravening the rest of the code is not perfect and should be in DAOs as well. I'm not asking that of you now as I don't expect you to fix everything in one go, just to not add to the technical debt we have.

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Sep 14, 2021

Ping @ravening can you address review and fix conflicts, thanks

@weizhouapache
Copy link
Copy Markdown
Member

no comment on this PR but all this DAO code really shouldn't be in the ManagementServer

@DaanHoogland any idea where else I can add this ?

DomainVlanMapDaoImpl, i'd say.

@DaanHoogland Im using the same code which is used by account and pod also which are present above and below of this code. So even they needs to be moved away?
I searched in other places in the same file and they are also using the same logic. for eg: publicipaddress, loadbalancer, resourcetag, vlan, guestos

@ravening the rest of the code is not perfect and should be in DAOs as well. I'm not asking that of you now as I don't expect you to fix everything in one go, just to not add to the technical debt we have.

@DaanHoogland

there are more than ten Dao.search() or Dao.searchAndCount() in ManagementServerImpl.java, and much more in QueryManagerImpl.java
we do not need to move everything into DAO, especially for the searches in multiple (more than 2) tables.

@ravening
Copy link
Copy Markdown
Member Author

Ping @ravening can you address review and fix conflicts, thanks

@rhtyd done

@DaanHoogland
Copy link
Copy Markdown
Contributor

no comment on this PR but all this DAO code really shouldn't be in the ManagementServer

@DaanHoogland any idea where else I can add this ?

DomainVlanMapDaoImpl, i'd say.

@DaanHoogland Im using the same code which is used by account and pod also which are present above and below of this code. So even they needs to be moved away?
I searched in other places in the same file and they are also using the same logic. for eg: publicipaddress, loadbalancer, resourcetag, vlan, guestos

@ravening the rest of the code is not perfect and should be in DAOs as well. I'm not asking that of you now as I don't expect you to fix everything in one go, just to not add to the technical debt we have.

@DaanHoogland

there are more than ten Dao.search() or Dao.searchAndCount() in ManagementServerImpl.java, and much more in QueryManagerImpl.java
we do not need to move everything into DAO, especially for the searches in multiple (more than 2) tables.

no, but those single table transactions that can we should.

@weizhouapache
Copy link
Copy Markdown
Member

no comment on this PR but all this DAO code really shouldn't be in the ManagementServer

@DaanHoogland any idea where else I can add this ?

DomainVlanMapDaoImpl, i'd say.

@DaanHoogland Im using the same code which is used by account and pod also which are present above and below of this code. So even they needs to be moved away?
I searched in other places in the same file and they are also using the same logic. for eg: publicipaddress, loadbalancer, resourcetag, vlan, guestos

@ravening the rest of the code is not perfect and should be in DAOs as well. I'm not asking that of you now as I don't expect you to fix everything in one go, just to not add to the technical debt we have.

@DaanHoogland
there are more than ten Dao.search() or Dao.searchAndCount() in ManagementServerImpl.java, and much more in QueryManagerImpl.java
we do not need to move everything into DAO, especially for the searches in multiple (more than 2) tables.

no, but those single table transactions that can we should.

@DaanHoogland agree .

as you can see in the code changes of this pr, the search on vlans has some join tables (DomainVlanMapDao, AccountVlanMapDao, PodVlanMapDao)

ravening and others added 2 commits September 15, 2021 12:31
Currently if we try to list vlan ip range by passing
domainid then it lists for all domain. Make sure that
it lists only for that domain
@nvazquez
Copy link
Copy Markdown
Contributor

@DaanHoogland @weizhouapache let's get a consensus on this PR to try moving it forward as it seems the requested changes may not be applied. Would that be a reason for a -1 on this PR for any of you?
@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@nvazquez a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Sep 16, 2021

If it's fixing a bug then +1 (sounds like you can't list Vlans for a domain?) but this would need testing

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✖️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 1282

@davidjumani
Copy link
Copy Markdown
Contributor

@blueorangutan test suse15 kvm-suse15

@blueorangutan
Copy link
Copy Markdown

@davidjumani a Trillian-Jenkins test job (suse15 mgmt + kvm-suse15) has been kicked to run smoke tests

Copy link
Copy Markdown
Contributor

@davidjumani davidjumani left a comment

Choose a reason for hiding this comment

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

Verified, only returns for the respective domainid if passed and empty set if not reserved

Copy link
Copy Markdown
Member

@weizhouapache weizhouapache left a comment

Choose a reason for hiding this comment

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

code lgtm

@nvazquez
Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@nvazquez a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 1291

@sureshanaparti
Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

@sureshanaparti a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

Copy link
Copy Markdown
Contributor

@nvazquez nvazquez left a comment

Choose a reason for hiding this comment

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

LGTM

@nvazquez
Copy link
Copy Markdown
Contributor

Manually tested + 2xLGTM - ready for merge after tests pass

@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-2098)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 35205 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4634-t2098-kvm-centos7.zip
Smoke tests completed. 84 look OK, 5 have errors
Only failed tests results shown below:

Test Result Time (s) Test File
test_01_nic Error 135.77 test_nic.py
test_01_add_primary_storage_disabled_host Error 0.57 test_primary_storage.py
test_01_primary_storage_nfs Error 0.12 test_primary_storage.py
ContextSuite context=TestStorageTags>:setup Error 0.21 test_primary_storage.py
test_02_list_snapshots_with_removed_data_store Error 1.17 test_snapshots.py
test_01_secure_vm_migration Error 156.38 test_vm_life_cycle.py
test_02_unsecure_vm_migration Error 271.97 test_vm_life_cycle.py
test_03_secured_to_nonsecured_vm_migration Error 148.02 test_vm_life_cycle.py
test_08_migrate_vm Error 43.69 test_vm_life_cycle.py
test_hostha_enable_ha_when_host_in_maintenance Error 305.13 test_hostha_kvm.py

@weizhouapache
Copy link
Copy Markdown
Member

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

@weizhouapache a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@DaanHoogland
Copy link
Copy Markdown
Contributor

-0 if we allow for a mix of concerns in manager implementations we will increase the number of code conflict we will get over time. We should strive for better separation as much as possible. I'm not going to block this simple fix over this but it is an increasing concern. Calls to DAOs could have been made.

@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-2107)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 35409 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4634-t2107-kvm-centos7.zip
Smoke tests completed. 89 look OK, 0 have errors
Only failed tests results shown below:

Test Result Time (s) Test File

@sureshanaparti
Copy link
Copy Markdown
Contributor

-0 if we allow for a mix of concerns in manager implementations we will increase the number of code conflict we will get over time. We should strive for better separation as much as possible. I'm not going to block this simple fix over this but it is an increasing concern. Calls to DAOs could have been made.

@DaanHoogland want to add this to cwiki / issues (as improvement) to track it later?

@sureshanaparti
Copy link
Copy Markdown
Contributor

Manually tested + 2xLGTM - ready for merge after tests pass

Merging based on LGTMs, and manual / smoke tests.

@sureshanaparti sureshanaparti merged commit 3b4523f into apache:main Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants