Skip to content

Look for active templates for VR deployment#4047

Merged
yadvr merged 1 commit into
apache:4.15from
ravening:vr_template
Feb 25, 2021
Merged

Look for active templates for VR deployment#4047
yadvr merged 1 commit into
apache:4.15from
ravening:vr_template

Conversation

@ravening
Copy link
Copy Markdown
Member

Description

If the template from which VR is created got deleted, the state
is set to inactive and removed to null.
Since the template is already deleted, the VR can't be created
using this template again.

If someone restarts network with cleanup then it will try to
deploy the vr from the old non existing template again.
So search only for active template which are not yet deleted.

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)

Screenshots (if appropriate):

How Has This Been Tested?

  1. Create a network and this will in turn create VR's
  2. Note down the template from which the VR was created
  3. Delete that template
  4. Now restart the network with cleanup option
  5. The new router deployment should be successful using another active template from the platform

If the template from which VR is created got deleted, the state
is set to inactive and removed to null.
Since the template is already deleted, the VR can't be created
using this template again.

If someone restarts network with cleanup then it will try to
deploy the vr from the old non existing template again.
So search only for active template which are not yet deleted.
@svenvogel
Copy link
Copy Markdown
Contributor

Hi @ravening small question. 🙏 how do you delete the template? api or ui?

@ravening
Copy link
Copy Markdown
Member Author

ravening commented May 1, 2020

Hi @ravening small question. 🙏 how do you delete the template? api or ui?

Hello @svenvogel , its mostly through UI but can be done through api as well I guess but I have not tried using api

@yadvr yadvr added this to the 4.15.0.0 milestone Jul 4, 2020
@yadvr
Copy link
Copy Markdown
Member

yadvr commented Jul 7, 2020

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@rhtyd 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: ✔centos7 ✔debian. JID-1542

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Jul 7, 2020

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

@yadvr yadvr requested review from DaanHoogland and nvazquez July 8, 2020 06:01
@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-2054)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 44443 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4047-t2054-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_clusters.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
Smoke tests completed. 81 look OK, 2 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_02_deploy_kubernetes_ha_cluster Error 3612.81 test_kubernetes_clusters.py
test_04_deploy_and_upgrade_kubernetes_cluster Error 0.04 test_kubernetes_clusters.py
test_05_deploy_and_upgrade_kubernetes_ha_cluster Error 0.04 test_kubernetes_clusters.py
test_06_deploy_and_invalid_upgrade_kubernetes_cluster Error 0.03 test_kubernetes_clusters.py
test_07_deploy_and_scale_kubernetes_cluster Error 0.03 test_kubernetes_clusters.py
ContextSuite context=TestKubernetesCluster>:teardown Error 35.52 test_kubernetes_clusters.py
test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers Failure 306.26 test_vpc_redundant.py

@DaanHoogland
Copy link
Copy Markdown
Contributor

as per your description @ravening, "If the template from which VR is created got deleted, the state
is set to inactive and removed to null.", it seems the 'real' bug is that removed is set to null whilst it should be set to the time of deletion. Your code will work, but is it not hiding this 'real' problem? Being very defensive, we might want to address both issues.

@ravening
Copy link
Copy Markdown
Member Author

as per your description @ravening, "If the template from which VR is created got deleted, the state
is set to inactive and removed to null.", it seems the 'real' bug is that removed is set to null whilst it should be set to the time of deletion. Your code will work, but is it not hiding this 'real' problem? Being very defensive, we might want to address both issues.

I will see if I can reproduce the issue to check which part of the code is setting it to null instead of removed timestamp

@DaanHoogland
Copy link
Copy Markdown
Contributor

@nvazquez do you have an opinion as well on this?

@nvazquez
Copy link
Copy Markdown
Contributor

I think the fix makes sense as it is now. I don't know the reason why we set the template to Inactive but not removed instead of removing it (timestamp on the removed column) as we normally do with other entities, probably it is not a bug but the expected behaviour by design

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.

Code LGTM, have not tested it

@DaanHoogland
Copy link
Copy Markdown
Contributor

ok tnx @nvazquez . As said I do have my doubt as I think we might be hiding the issue, but will not 👎 .

@DaanHoogland DaanHoogland requested review from GabrielBrascher and yadvr and removed request for DaanHoogland November 17, 2020 19:05
Copy link
Copy Markdown
Member

@GabrielBrascher GabrielBrascher 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

@yadvr yadvr modified the milestones: 4.15.0.0, 4.15.1.0 Dec 8, 2020
@shwstppr
Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@shwstppr 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: ✔centos7 ✔centos8 ✔debian. JID-2707

@yadvr yadvr changed the base branch from master to 4.15 February 19, 2021 08:32
@yadvr yadvr closed this Feb 19, 2021
@yadvr yadvr reopened this Feb 19, 2021
@yadvr
Copy link
Copy Markdown
Member

yadvr commented Feb 19, 2021

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@rhtyd 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: ✖centos7 ✖centos8 ✖debian. JID-2746

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Feb 19, 2021

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@rhtyd 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: ✔centos7 ✖centos8 ✖debian. JID-2760

@shwstppr
Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@shwstppr 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: ✖centos7 ✖centos8 ✖debian. JID-2779

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2784

@shwstppr
Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-3596)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 40164 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4047-t3596-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_clusters.py
Intermittent failure detected: /marvin/tests/smoke/test_outofbandmanagement_nestedplugin.py
Intermittent failure detected: /marvin/tests/smoke/test_primary_storage.py
Intermittent failure detected: /marvin/tests/smoke/test_secondary_storage.py
Intermittent failure detected: /marvin/tests/smoke/test_service_offerings.py
Intermittent failure detected: /marvin/tests/smoke/test_vm_deployment_planner.py
Intermittent failure detected: /marvin/tests/smoke/test_vm_life_cycle.py
Intermittent failure detected: /marvin/tests/smoke/test_hostha_kvm.py
Smoke tests completed. 79 look OK, 7 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_01_add_primary_storage_disabled_host Error 34.14 test_primary_storage.py
test_04_deploy_and_scale_kubernetes_cluster Failure 44.48 test_kubernetes_clusters.py
test_07_deploy_kubernetes_ha_cluster Failure 3612.32 test_kubernetes_clusters.py
test_08_deploy_and_upgrade_kubernetes_ha_cluster Failure 0.08 test_kubernetes_clusters.py
test_09_delete_kubernetes_ha_cluster Failure 0.07 test_kubernetes_clusters.py
ContextSuite context=TestKubernetesCluster>:teardown Error 112.33 test_kubernetes_clusters.py
test_01_sys_vm_start Failure 0.08 test_secondary_storage.py
ContextSuite context=TestCpuCapServiceOfferings>:setup Error 0.00 test_service_offerings.py
test_01_deploy_vm_on_specific_host Error 20.99 test_vm_deployment_planner.py
test_04_deploy_vm_on_host_override_pod_and_cluster Error 4.43 test_vm_deployment_planner.py
test_11_migrate_vm Error 4.39 test_vm_life_cycle.py
test_hostha_enable_ha_when_host_in_maintenance Error 303.83 test_hostha_kvm.py

@shwstppr
Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-3609)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 32372 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4047-t3609-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
Smoke tests completed. 86 look OK, 0 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File

Copy link
Copy Markdown
Contributor

@shwstppr shwstppr left a comment

Choose a reason for hiding this comment

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

lgtm

@yadvr yadvr closed this Feb 24, 2021
@yadvr yadvr reopened this Feb 24, 2021
@yadvr yadvr merged commit 7874918 into apache:4.15 Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants