Skip to content

storage: post process locally uploaded multi-disk ova template#3215

Merged
yadvr merged 1 commit intoapache:masterfrom
shapeblue:local-upload-mdisk-ova
Jun 5, 2019
Merged

storage: post process locally uploaded multi-disk ova template#3215
yadvr merged 1 commit intoapache:masterfrom
shapeblue:local-upload-mdisk-ova

Conversation

@yadvr
Copy link
Member

@yadvr yadvr commented Mar 12, 2019

Problem: When a multi-disk OVA template is uploaded, only the root disk is recognized and VMs deployed using such template only get the root disk provisioned.
Root Cause: The template processor for multi-disk OVA was not used in the template upload processor.
Solution: Added support for local multi-disk OVA template upload. After a multi-disk OVA template is
uploaded, the mechanism that worked on multi-disk OVA templates registered using URL is now also used to discovers and creates data-disk templates in cloud.vm_template table and on the secondary storage.

To enable SSL on SSVMs :
• Upload the certificates like you usually do via the API or UI->Infrastructure tab
• Set the global settings secstorage.encrypt.copy, secstorage.ssl.cert.domain to appropriate values
along with the CPVM ones
• Restart management server (no need to destroy/restart SSVM (or the ssvm agent))

Test cases:

  • Upload template and check it creates multi-disk folders on secondary
    storage and entries in cloud.vm_template table
  • Upload template and kill/shutdown management server. Then restart MS
    to check if template sync works
  • Copy template across zone of an uploaded template

Signed-off-by: Rohit Yadav rohit.yadav@shapeblue.com

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)

This processes and handles multi-disk ova templates, checks and creates
data disk templates on image storage pool and in DB.

Test cases:
- Upload template and check it creates multi-disk folders on secondary
  storage and entries in cloud.vm_template table
- Upload template and kill/shutdown management server. Then restart MS
  to check if template sync works
- Copy template across zone of an uploaded template

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
@yadvr yadvr added this to the 4.13.0.0 milestone Mar 12, 2019
@yadvr yadvr requested a review from borisstoyanov March 29, 2019 06:42
@yadvr yadvr changed the title storage: post process locally uploaded multi-disk ova template [WIP DO NOT MERGE] storage: post process locally uploaded multi-disk ova template Mar 29, 2019
@borisstoyanov
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@borisstoyanov a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2667

Copy link
Contributor

@borisstoyanov borisstoyanov left a comment

Choose a reason for hiding this comment

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

Tested locally, local upload of multi disk templates is possible, post upload template get properly parsed and all disks/iso are available

@borisstoyanov
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Trillian test result (tid-3459)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 29045 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr3215-t3459-kvm-centos7.zip
Smoke tests completed. 70 look OK, 0 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File

@yadvr yadvr requested a review from DagSonsteboSB May 10, 2019 18:16
@yadvr
Copy link
Member Author

yadvr commented May 23, 2019

@blueorangutan package

@blueorangutan
Copy link

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2773

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

looks good

VMTemplateVO templateUpdate = _templateDao.createForUpdate();
templateUpdate.setSize(answer.getVirtualSize());
_templateDao.update(tmpTemplate.getId(), templateUpdate);
// For multi-disk OVA, check and create data disk templates
Copy link
Contributor

Choose a reason for hiding this comment

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

i see the same commen t in three places. Is this eligible for a refactor as overloaded method?

@PaulAngus
Copy link
Member

The extended VMware fields are missing from the upload form
register template:
image

Upload Template:
image

@yadvr
Copy link
Member Author

yadvr commented May 27, 2019

@PaulAngus yes, it's by current implementation. Scope creep - the PR does not address that and possibly other UX enhancements.

@yadvr
Copy link
Member Author

yadvr commented May 30, 2019

@PaulAngus I've create a ticket for the additional UI enhancement here: #3363

@yadvr
Copy link
Member Author

yadvr commented May 31, 2019

@PaulAngus @shwstppr (Abhishek) has implemented the UI change here: #3367

@PaulAngus
Copy link
Member

LGTM - tested with a centos template with 1 data disk and a Windows template with 1 data disk.

@yadvr yadvr merged commit bbc0ae8 into apache:master Jun 5, 2019
@DaanHoogland
Copy link
Contributor

oops? merged with [WIP] in the name?

@yadvr yadvr changed the title [WIP DO NOT MERGE] storage: post process locally uploaded multi-disk ova template storage: post process locally uploaded multi-disk ova template Jun 6, 2019
@yadvr
Copy link
Member Author

yadvr commented Jun 6, 2019

Fixed @DaanHoogland - not an issue, we were waiting for Paul's LGTM.

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.

5 participants