Look for active templates for VR deployment#4047
Conversation
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.
|
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 |
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✔debian. JID-1542 |
|
@blueorangutan test |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-2054)
|
|
as per your description @ravening, "If the template from which VR is created got deleted, the state |
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 |
|
@nvazquez do you have an opinion as well on this? |
|
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 |
nvazquez
left a comment
There was a problem hiding this comment.
Code LGTM, have not tested it
|
ok tnx @nvazquez . As said I do have my doubt as I think we might be hiding the issue, but will not 👎 . |
|
@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-2707 |
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos7 ✖centos8 ✖debian. JID-2746 |
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✖centos8 ✖debian. JID-2760 |
|
@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-2779 |
|
Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2784 |
|
@blueorangutan test |
|
@shwstppr a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-3596)
|
|
@blueorangutan test |
|
@shwstppr a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-3609)
|
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
Screenshots (if appropriate):
How Has This Been Tested?