Uh oh!
There was an error while loading. Please reload this page.
Default value of force should be false for template delete operation - #7731
Conversation
harikrishna-patnala
commented
Jul 7, 2023
@blueorangutan package |
blueorangutan
commented
Jul 7, 2023
@harikrishna-patnala a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
blueorangutan
commented
Jul 7, 2023
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6434 |
Codecov Report
@@ Coverage Diff @@## 4.18 #7731 +/- ##
===========================================
Coverage 13.02% 13.02% - Complexity 9032 9222 +190
===========================================
Files 2720 2720 Lines 257080 262616 +5536 Branches 40088 42312 +2224 ===========================================
+ Hits 33476 34211 +735 - Misses 219400 224114 +4714 - Partials 4204 4291 +87
... and 25 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
yadvr
commented
Jul 7, 2023
@blueorangutan test |
blueorangutan
commented
Jul 7, 2023
@rohityadavcloud a [SF] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
blueorangutan
commented
Jul 8, 2023
[SF] Trillian test result (tid-7025)
|
DaanHoogland
commented
Jul 10, 2023
@harikrishna-patnala can you add some testing information to the description? |
yadvr
commented
Jul 10, 2023
@blueorangutan package |
blueorangutan
commented
Jul 10, 2023
@rohityadavcloud a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
blueorangutan
commented
Jul 10, 2023
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6455 |
DaanHoogland
commented
Jul 11, 2023
@harikrishna-patnala can you have a look if it does make sense for the test_templates tests to now fail? |
harikrishna-patnala
commented
Jul 14, 2023
yes @DaanHoogland it seems to be related. I'll fix the tests too |
weizhouapache
commented
Jul 21, 2023
this parameter was introduced in PR #1773 changing the default value to |
weizhouapache
commented
Jul 25, 2023
a similar issue: |
kiranchavala
left a comment
There was a problem hiding this comment.
LGTM , tested manually with the api call
Also tested with project
Before the fix
2023-08-02 10:25:41,346 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (qtp1239807799-18:ctx-6c52ee9f ctx-71da430f ctx-dbb08cbb) (logid:2828153a) submit async job-113, details: AsyncJobVO: {id:113, userId: 2, accountId: 2, instanceType: Template, instanceId: 215, cmd: org.apache.cloudstack.api.command.user.template.DeleteTemplateCmd, cmdInfo: {"apiKey":"LIN6rqXuaJwMPfGYFh13qDwYz5VNNz1J2J6qIOWcd3oLQOq0WtD4CwRundBL6rzXToa3lQOC_vKjI3nkHtiD8Q","signature":"YiZXnlLsEqPiSiiMrEBLTiSJAlo\u003d","response":"json","ctxUserId":"2","httpmethod":"GET","ctxStartEventId":"267","id":"44bb4d22-c43c-4ce5-a9c0-fcf61aeb1775","ctxDetails":"{\"interface com.cloud.template.VirtualMachineTemplate\":\"44bb4d22-c43c-4ce5-a9c0-fcf61aeb1775\"}","ctxAccountId":"2","uuid":"44bb4d22-c43c-4ce5-a9c0-fcf61aeb1775","cmdEventType":"TEMPLATE.DELETE"}, cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: null, initMsid: 32986556793923, completeMsid: null, lastUpdated: null, lastPolled: null, created: null, removed: null}
After the fix
2023-08-02 10:21:24,306 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-41:ctx-f860df56 job-73) (logid:1cb54178) Executing AsyncJobVO: {id:73, userId: 2, accountId: 2, instanceType: Template, instanceId: 205, cmd: org.apache.cloudstack.api.command.user.template.DeleteTemplateCmd, cmdInfo: {"apiKey":"LIN6rqXuaJwMPfGYFh13qDwYz5VNNz1J2J6qIOWcd3oLQOq0WtD4CwRundBL6rzXToa3lQOC_vKjI3nkHtiD8Q","signature":"bdb7Zdkui9CZUoFAr7RMvEoIpm8\u003d","response":"json","ctxUserId":"2","httpmethod":"GET","ctxStartEventId":"161","id":"2bc0c528-55f8-4860-9b00-8f1b0f2acff8","ctxDetails":"{\"interface com.cloud.template.VirtualMachineTemplate\":\"2bc0c528-55f8-4860-9b00-8f1b0f2acff8\"}","ctxAccountId":"2","uuid":"2bc0c528-55f8-4860-9b00-8f1b0f2acff8","cmdEventType":"TEMPLATE.DELETE"}, cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: null, initMsid: 32988351955670, completeMsid: null, lastUpdated: null, lastPolled: null, created: null, removed: null}
2023-08-02 10:21:24,306 DEBUG [c.c.a.ApiServlet] (qtp1239807799-13:ctx-a0ba720f ctx-e324f833 ctx-89287e07) (logid:9ba795bc) ===END=== 10.0.3.251 -- GET apiKey=LIN6rqXuaJwMPfGYFh13qDwYz5VNNz1J2J6qIOWcd3oLQOq0WtD4CwRundBL6rzXToa3lQOC_vKjI3nkHtiD8Q&command=deleteTemplate&id=2bc0c528-55f8-4860-9b00-8f1b0f2acff8&response=json&signature=bdb7Zdkui9CZUoFAr7RMvEoIpm8%3D
2023-08-02 10:21:24,315 WARN [c.c.t.TemplateManagerImpl] (API-Job-Executor-41:ctx-f860df56 job-73 ctx-89c8cbb6) (logid:1cb54178) Unable to delete template with id: 205 because VM instances: [VM instance {"id":8,"instanceName":"i-2-8-VM","type":"User","uuid":"3dbd61ea-6608-4bf7-9144-ac510eec8358"}] are using it.
2023-08-02 10:21:24,320 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-41:ctx-f860df56 job-73) (logid:1cb54178) Complete async job-73, jobStatus: FAILED, resultCode: 431, result: org.apache.cloudstack.api.response.ExceptionResponse/null/{"uuidList":[],"errorcode":"431","errortext":"Unable to delete template with id: 205 because VM instances: [VM instance {"id":8,"instanceName":"i-2-8-VM","type":"User","uuid":"3dbd61ea-6608-4bf7-9144-ac510eec8358"}] are using it."
weizhouapache
commented
Aug 10, 2023
@rohityadavcloud@harikrishna-patnala@DaanHoogland@shwstppr@kiranchavala |
weizhouapache
commented
Aug 15, 2023
moved to 4.18.2.0 milestone |
29ac938 to
7b3cc99Compareharikrishna-patnala
commented
Aug 28, 2023
@blueorangutan package |
blueorangutan
commented
Aug 28, 2023
@harikrishna-patnala a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
blueorangutan
commented
Aug 28, 2023
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6907 |
harikrishna-patnala
commented
Aug 28, 2023
@blueorangutan test |
blueorangutan
commented
Aug 28, 2023
@harikrishna-patnala a [SF] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
blueorangutan
commented
Aug 28, 2023
[SF] Trillian test result (tid-7588)
|
DaanHoogland
commented
Oct 2, 2023
@harikrishna-patnala any resolution on this? cc @shwstppr |
DaanHoogland
commented
Oct 5, 2023
@shwstppr , I think we can merge this if we take @weizhouapache 's remark into account. What do you think? |
shwstppr
commented
Oct 6, 2023
@DaanHoogland I'm okay to merge this. |
harikrishna-patnala
commented
Oct 9, 2023
yes @DaanHoogland This can be merged cc @shwstppr |
DaanHoogland
commented
Oct 9, 2023
@harikrishna-patnala |
harikrishna-patnala
commented
Oct 10, 2023
@DaanHoogland I get that I'm breaking backward compatibility, in my opinion documenting this is not needed as we are not breaking anything that is correct or expected behaviour by someone. On the other hand I also dont know where exactly to document this if you can suggest that helps please. |
DaanHoogland
commented
Oct 10, 2023
as @weizhouapache sugested, it should be in the release notes in the breaking changes section. humans may expect this , but tools like ansible and terraform will not. |
harikrishna-patnala
commented
Oct 10, 2023
ah we have a breaking changes section, nice. Thanks @DaanHoogland I'll create one. |
…pache#7731) * default value of force should be false * Added force flag in tests (cherry picked from commit a9f3af8) Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Description
Default value of force should be false for the template delete operation
Types of changes
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?