Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upload template enhancement #331

Merged
merged 10 commits into from
Nov 23, 2020
Merged

Conversation

guo1017138
Copy link

@guo1017138 guo1017138 commented Aug 25, 2020

Support upload ovf which has no ovf:size specified for each dependency file
ShowUploadProgress can exit whenever task stop, such like cancelled on GUI

Issue still exists: if ovf:size is bigger than real vmdk file size, upload task will hung there and never stop. I don't know how to fix

Close #328

Signed-off-by: Guo, Larry (NSB - CN/Qingdao) [email protected]

Guo, Larry (NSB - CN/Qingdao) added 2 commits August 25, 2020 14:44
Support upload ovf which has no ovf:size specified for each dependency file
ShowUploadProgress can exit whenever task stop, such like cancelled on GUI
Return status directly for reponse which has no body, such like 416, 400

Signed-off-by: Guo, Larry (NSB - CN/Qingdao) <[email protected]>
Signed-off-by: Guo, Larry (NSB - CN/Qingdao) <[email protected]>
Guo, Larry (NSB - CN/Qingdao) added 3 commits September 28, 2020 11:06
Support upload ovf which has no ovf:size specified for each dependency file
ShowUploadProgress can exit whenever task stop, such like cancelled on GUI
Return status directly for reponse which has no body, such like 416, 400

Signed-off-by: Guo, Larry (NSB - CN/Qingdao) <[email protected]>
Signed-off-by: Guo, Larry (NSB - CN/Qingdao) <[email protected]>
Signed-off-by: Guo, Larry (NSB - CN/Qingdao) <[email protected]>
@Didainius
Copy link
Collaborator

@guo1017138 ,
Sorry for ignoring you - we have been busy releasing terraform-provider-vcd 3.0.0.
Could you give an attempt to merge latest master and we will try to work through it to get it merged. Although it shows only changelog conflict - in fact it is quite hard to review as the diff is big.

Thanks!

Merge remote-tracking branch 'upstream/master' into upload-enhance

Signed-off-by: Guo, Larry (NSB - CN/Qingdao) <[email protected]>
@guo1017138
Copy link
Author

@Didainius , Thank you. I merged with latest code and there is no conflict now. Please help to review.

Signed-off-by: Guo, Larry (NSB - CN/Qingdao) <[email protected]>
@Didainius
Copy link
Collaborator

One more:

START: catalog_test.go:298: TestVCD.Test_UploadOvf_withoutVMDKSize
Running: TestVCD.Test_UploadOvf_withoutVMDKSize
catalog_test.go:302:
    checkUploadOvf(vcd, check, vcd.config.OVA.OvaWithoutSizePath, vcd.config.VCD.Catalog.Name, TestUploadOvf+"8")
catalog_test.go:323:
    check.Assert(err, IsNil)
... value *errors.errorString = &errors.errorString{s:"file size didn't match described in ovf: /var/folders/h2/c60z324s6219c3hc_w28hbx80000gp/T/govcd237219830/vm-20b41fa7-3212-4faf-9295-045d0bc49783-disk-0.vmdk. Unpacked files for checking are accessible in: /var/folders/h2/c60z324s6219c3hc_w28hbx80000gp/T/govcd237219830"} ("file size didn't match described in ovf: /var/folders/h2/c60z324s6219c3hc_w28hbx80000gp/T/govcd237219830/vm-20b41fa7-3212-4faf-9295-045d0bc49783-disk-0.vmdk. Unpacked files for checking are accessible in: /var/folders/h2/c60z324s6219c3hc_w28hbx80000gp/T/govcd237219830")

FAIL: catalog_test.go:298: TestVCD.Test_UploadOvf_withoutVMDKSize

OVA config:

ova:
  ovaPath: ../test-resources/test_vapp_template.ova
  ovaChunkedPath: ../test-resources/template_with_custom_chunk_size.ova
  ovaMultiVmPath: ../test-resources/vapp_with_3_vms.ova
  ovaWithoutSizePath: ../test-resources/template_without_vmdk_size.ova
``

@guo1017138
Copy link
Author

One more:

START: catalog_test.go:298: TestVCD.Test_UploadOvf_withoutVMDKSize
Running: TestVCD.Test_UploadOvf_withoutVMDKSize
catalog_test.go:302:
    checkUploadOvf(vcd, check, vcd.config.OVA.OvaWithoutSizePath, vcd.config.VCD.Catalog.Name, TestUploadOvf+"8")
catalog_test.go:323:
    check.Assert(err, IsNil)
... value *errors.errorString = &errors.errorString{s:"file size didn't match described in ovf: /var/folders/h2/c60z324s6219c3hc_w28hbx80000gp/T/govcd237219830/vm-20b41fa7-3212-4faf-9295-045d0bc49783-disk-0.vmdk. Unpacked files for checking are accessible in: /var/folders/h2/c60z324s6219c3hc_w28hbx80000gp/T/govcd237219830"} ("file size didn't match described in ovf: /var/folders/h2/c60z324s6219c3hc_w28hbx80000gp/T/govcd237219830/vm-20b41fa7-3212-4faf-9295-045d0bc49783-disk-0.vmdk. Unpacked files for checking are accessible in: /var/folders/h2/c60z324s6219c3hc_w28hbx80000gp/T/govcd237219830")

FAIL: catalog_test.go:298: TestVCD.Test_UploadOvf_withoutVMDKSize

OVA config:

ova:
  ovaPath: ../test-resources/test_vapp_template.ova
  ovaChunkedPath: ../test-resources/template_with_custom_chunk_size.ova
  ovaMultiVmPath: ../test-resources/vapp_with_3_vms.ova
  ovaWithoutSizePath: ../test-resources/template_without_vmdk_size.ova
``

Thank you. It breaks in ova upload while my local ENV are using OVF file only.
But I am wondering why the travis-ci can pass each time? I supposed it shall run the test cased defined one by one.

@Didainius
Copy link
Collaborator

One more:

START: catalog_test.go:298: TestVCD.Test_UploadOvf_withoutVMDKSize
Running: TestVCD.Test_UploadOvf_withoutVMDKSize
catalog_test.go:302:
    checkUploadOvf(vcd, check, vcd.config.OVA.OvaWithoutSizePath, vcd.config.VCD.Catalog.Name, TestUploadOvf+"8")
catalog_test.go:323:
    check.Assert(err, IsNil)
... value *errors.errorString = &errors.errorString{s:"file size didn't match described in ovf: /var/folders/h2/c60z324s6219c3hc_w28hbx80000gp/T/govcd237219830/vm-20b41fa7-3212-4faf-9295-045d0bc49783-disk-0.vmdk. Unpacked files for checking are accessible in: /var/folders/h2/c60z324s6219c3hc_w28hbx80000gp/T/govcd237219830"} ("file size didn't match described in ovf: /var/folders/h2/c60z324s6219c3hc_w28hbx80000gp/T/govcd237219830/vm-20b41fa7-3212-4faf-9295-045d0bc49783-disk-0.vmdk. Unpacked files for checking are accessible in: /var/folders/h2/c60z324s6219c3hc_w28hbx80000gp/T/govcd237219830")

FAIL: catalog_test.go:298: TestVCD.Test_UploadOvf_withoutVMDKSize

OVA config:

ova:
  ovaPath: ../test-resources/test_vapp_template.ova
  ovaChunkedPath: ../test-resources/template_with_custom_chunk_size.ova
  ovaMultiVmPath: ../test-resources/vapp_with_3_vms.ova
  ovaWithoutSizePath: ../test-resources/template_without_vmdk_size.ova
``

Thank you. It breaks in ova upload while my local ENV are using OVF file only.
But I am wondering why the travis-ci can pass each time? I supposed it shall run the test cased defined one by one.

Sadly travis does not run tests on real env (integration or whatever you call it) because there is on publicly available environment f VCD. It only does some static checks.

@guo1017138
Copy link
Author

@Didainius Thanks. Got it.

@lvirbalas
Copy link
Collaborator

@guo1017138 are you planning to come back with an update, need to know what to do with this PR. Thanks!

@guo1017138
Copy link
Author

@guo1017138 are you planning to come back with an update, need to know what to do with this PR. Thanks!

Hi @lvirbalas , I didn't notice it conflict again. Now I resolved the conflict and please help to review.

Copy link
Collaborator

@Didainius Didainius left a comment

Choose a reason for hiding this comment

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

My testing passed. Thanks

Copy link
Contributor

@dataclouder dataclouder left a comment

Choose a reason for hiding this comment

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

Some minor changes needed

Copy link
Collaborator

@lvirbalas lvirbalas left a comment

Choose a reason for hiding this comment

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

LGTM, thank you for your effort!

Signed-off-by: Guo, Larry (NSB - CN/Qingdao) <[email protected]>
Copy link
Contributor

@vbauzys vbauzys left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you

@Didainius Didainius merged commit 4ab150b into vmware:master Nov 23, 2020
@Didainius
Copy link
Collaborator

@guo1017138 ,
Thanks for PR. It is now merged and has a tag of v2.10.0-alpha.3 before we release official one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upload OVF enhancement for known issues
5 participants