Added zone check for attach iso#3755
Conversation
|
@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-452 |
|
@blueorangutan test |
|
@Spaceman1984 this is a typical bug fix. i think want it in 4.13 as well |
|
HOLD ON this one until the branching is fixed |
|
@blueorangutan test |
|
@borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-617)
|
borisstoyanov
left a comment
There was a problem hiding this comment.
@Spaceman1984, I think Daan suggest this needs rebasing. Can you please do that so I can test it out.
439118e to
9c62dd1
Compare
|
Rebased to 4.13 |
|
@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-478 |
|
@blueorangutan package |
|
@borisstoyanov a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
@borisstoyanov can you approve? |
borisstoyanov
left a comment
There was a problem hiding this comment.
LGTM, manually checked
(localcloud) SBCM5> > attach iso virtualmachineid=340df668-a1a4-42df-b1db-8de5ef792568 id=577a2ec5-cf46-45cb-b6aa-18d577dcfee2
{
"accountid": "7933dbb6-2573-11ea-9212-1e00b3010780",
"cmd": "org.apache.cloudstack.api.command.admin.iso.AttachIsoCmdByAdmin",
"completed": "2019-12-23T12:18:42+0000",
"created": "2019-12-23T12:18:42+0000",
"jobid": "354ad12f-5af7-41ab-abd6-ca8bfdee3683",
"jobprocstatus": 0,
"jobresult": {
"errorcode": 431,
"errortext": "ISO is not available in the zone the VM is in."
},
"jobresultcode": 530,
"jobresulttype": "object",
"jobstatus": 2,
"userid": "7933e929-2573-11ea-9212-1e00b3010780"
}
🙈 Error: async API failed for job 354ad12f-5af7-41ab-abd6-ca8bfdee3683
* 4.13: Added zone check for attach iso (#3755) config: add isdynamic flag in configuration response (#3729) filter hosts to query on zone wide storage (#3733) convert protocal names to be found as labels (#3747) Once again allow a VM to be on multiple networks from VPCs (#3754) create template from snapshot regression (partly reverted) (#3767)
Description
This fix adds a check if the iso belongs to the zone the virtual machine is in
Fixes: #3588
Types of changes
Screenshots (if appropriate):
How Has This Been Tested?
This was tested using cloudmonkey using the attach iso command.
A Cloudstack installation with 2 zones is required.
I created an instance in the first zone and then uploaded an iso to the second zone.
When trying to attach the iso to the virtual machine in the first zone this error message is returned:
(localcloud) 🐱 > attach iso virtualmachineid=e1b6b77b-df84-4d5e-998a-d7283e5f4f21 id=326c0c96-db4f-4e01-924e-2eac50e0420e
{
"accountid": "4c71abb8-1a54-11ea-a067-000c29a1fe4f",
"cmd": "org.apache.cloudstack.api.command.admin.iso.AttachIsoCmdByAdmin",
"completed": "2019-12-09T12:02:43+0200",
"created": "2019-12-09T12:02:43+0200",
"jobid": "971ce126-7d8c-4ea0-ba3f-5cbbcdbf750f",
"jobprocstatus": 0,
"jobresult": {
"errorcode": 431,
"errortext": "ISO is not available in the zone the VM is in."
},
"jobresultcode": 530,
"jobresulttype": "object",
"jobstatus": 2,
"userid": "4c71db6e-1a54-11ea-a067-000c29a1fe4f"
}
🙈 Error: async API failed for job 971ce126-7d8c-4ea0-ba3f-5cbbcdbf750f