246 Commits

Author SHA1 Message Date
Nicolas Vazquez
e86bb41e0e CLOUDSTACK-10146: Bypass Secondary Storage for KVM templates (#2379)
This feature allows using templates and ISOs avoiding secondary storage as intermediate cache on KVM. The virtual machine deployment process is enhanced to supported bypassed registered templates and ISOs, delegating the work of downloading them to primary storage to the KVM agent instead of the SSVM agent.

Template and ISO registration:
- When hypervisor is KVM, a checkbox is displayed with 'Direct Download' label.
- API methods registerTemplate and registerISO are both extended with this new parameter directdownload.
- On template or ISO registration, no download job is sent to SSVM agent, CloudStack would only persist an entry on template_store_ref indicating that template or ISO has been marked as 'Direct Download' (bypassing Secondary Storage). These entries are persisted as:
template_id = Template or ISO id on vm_template table
store_id NULL
download_state = BYPASSED
state = Ready
(Note: these entries allow users to deploy virtual machine from registered templates or ISOs)
- An URL validation command is sent to a random KVM host to check if template/ISO location can be reached. Metalink are also supported by this feature. In case of a metalink, it is fetched and URL check is performed on each of its URLs.
- Checksum should be provided as indicated on #2246: {ALGORITHM}CHKSUMHASH
- After template or ISO is registered, it would be displayed in the UI

Virtual machine deployment:
When a 'Direct Download' template is selected for deployment, CloudStack would delegate template downloading to destination storage pool via destination host by a new pluggable download manager.
Download manager would handle template downloading depending on URL protocol. In case of HTTP, request headers can be set by the user via vm_template_details. Those details should be persisted as:
Key: HTTP_HEADER
Value: HEADERNAME:HEADERVALUE

In case of HTTPS, a new API method is added uploadTemplateDirectDownloadCertificate to allow user importing a client certificate into all KVM hosts' keystore before deployment.
After template or ISO is downloaded to primary storage, usual entry would be persisted on template_spool_ref indicating the mapping between template/ISO and storage pool.
2018-01-09 12:22:18 +05:30
Rohit Yadav
0fedbdd7a9 CLOUDSTACK-9998: Prometheus Exporter for CloudStack (#2287)
This implements a CloudStack Prometheus exporter as a plugin, that serves
metrics on a HTTP port.

New global settings:

1. prometheus.exporter.enable - (default: false), Enable the prometheus
exporter plugin, management server restart needed.
2. prometheus.exporter.port - (default: 9595), The prometheus exporter
server port.
3. prometheus.exporter.allowed.ips - (default: 127.0.0.1), List of comma
separated prometheus server ips (with no spaces) that should be allowed to
access the URLs.

The following list  of  metrics are provided  per pop (zone)  with  the exporter:
• Per host:
o CPU cores:  used, total
o CPU usage:  used, total (in MHz)
o Memory  usage:  used, total (in MiBs)
o Total VMs running on  the host
• CPU cores:  allocated (per  zone)
• CPU usage:  allocated (per  zone, in  MHz)
• Memory  usage:  allocated (per  zone, in  MiBs)
• Hosts:  online, offline,  total
• VMs: in all states -- starting, running, stopping, stopped, destroyed,
       expunging, migrating,  error, unknown
• Volumes:  ready,  destroyed,  total
• Primary Storage Pool: (Disk size) used, allocated,  unallocated,  total (in GiBs)
• Secondary Storage Pool: (Disk size) used, allocated,  unallocated,  total (in GiBs)
• Private IPs:  allocated,  total
• Public  IPs:  allocated,  total
• Shared  Network IPs:  allocated,  total
• VLANs:  allocated,  total

Additional metrics for the environment:
• Summed  domain  (level=1) limit for CPU cores
• Summed  domain  (level=1) limit for memory/ram

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-10-11 17:24:22 +05:30
Rajani Karuturi
4bc7c270fa Updating pom.xml version numbers for release 4.11.0.0-SNAPSHOT
Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>
2017-07-12 12:09:38 +05:30
Rajani Karuturi
9d2893d44a Updating pom.xml version numbers for release 4.10.0.0
Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>
2017-07-03 10:06:43 +05:30
Rajani Karuturi
0fefc207f0 Merge pull request #1842 from anshul1886/CLOUDSTACK-9686
CLOUDSTACK-9686: Fixed multiple entires for builtin template in template
2017-05-17 10:39:45 +05:30
Anshul Gangwar
929595c114 CLOUDSTACK-9686: Fixed multiple entires for builtin template in template
store ref table so builtin template is never downloaded completely
 In handleSysTemplateDownload method creating template only if there exists no entry
handleTemplateSync will take care of other scenario
2016-12-21 10:08:33 +05:30
Rohit Yadav
0dce1c50c1 CLOUDSTACK-9456: Update Spring version in maven poms
- Bump spring-framework version to 4.x and Jetty to version that runs with JDK8
- Bump servet dependency version
- Migrate spring xmls to version 4, fixes schema locations that are 3.0
  dependent in various xmls.
- Fix failing tests due to spring upgrade
  (Thanks @marcaurele Marc-Aurèle Brothier for fixing them)
    * Fix test DeploymentPlanningManagerImplTest
    * Fix GloboDNS test

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-16 21:21:20 +05:30
Syed
5d274bba51 CLOUDSTACK-9627:Fix template sync for region store 2016-11-29 11:36:06 -05:00
Rohit Yadav
9555492b4d Merge branch '4.9' 2016-08-23 14:16:53 +05:30
Rohit Yadav
f13c224da1 Updating pom.xml version numbers for release 4.9.1.0-SNAPSHOT
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-08-19 13:53:39 +05:30
Will Stevens
62aa3b2bfa Updating pom.xml version numbers for release 4.10.0-SNAPSHOT
Signed-off-by: Will Stevens <williamstevens@gmail.com>
2016-07-29 10:11:34 -04:00
Will Stevens
227ff3884d Updating pom.xml version numbers for release 4.9.0
Signed-off-by: Will Stevens <williamstevens@gmail.com>
2016-07-25 16:56:04 -04:00
nvazquez
2d2819974e CLOUDSTACK-9368: Fix for Support configurable NFS version for Secondary Storage mounts 2016-05-20 07:31:16 -07:00
Mike Tutkowski
2bd035d199 Support for backend snapshots with XenServer 2016-05-13 01:02:04 -06:00
SudharmaJain
c3353257ef CLOUDSTACK-9100: ISO.CREATE/TEMPLATE.CREATE event missing for usage_event by template sync thread 2016-04-20 18:11:46 +05:30
nvazquez
64c6debf00 CLOUDSTACK-9252: Little refactor 2016-02-05 06:56:08 -08:00
nvazquez
3fb18bd494 CLOUDSTACK-9252: New refactor 2016-02-03 07:08:39 -08:00
nvazquez
cc50c20b4b CLOUDSTACK-9252: Remove static dependencies, refactor 2016-02-01 12:58:51 -08:00
nvazquez
76dc2705b7 CLOUDSTACK-9252: Remove duplicates getNfsVersion, refactor 2016-02-01 12:50:58 -08:00
nvazquez
0bc1b2727a CLOUDSTACK-9252: Add nfs version to commands 2016-02-01 12:50:58 -08:00
Remi Bergsma
43ab98d823 Updating pom.xml version numbers for release 4.9.0-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-26 15:12:20 +01:00
Remi Bergsma
32fcc47117 Updating pom.xml version numbers for release 4.8.1-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-26 09:39:00 +01:00
Remi Bergsma
62f218b7bd Updating pom.xml version numbers for release 4.8.0
Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-20 23:43:35 +01:00
Remi Bergsma
8f5a2920e8 Updating pom.xml version numbers for release 4.8.0-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-21 22:09:31 +01:00
Boris Schrijver
5c0366c99e CLOUDSTACK-9062: Improve S3 implementation.
The S3 implementation is far from finished, this commit focusses on the bases.

 - Upgrade AWS SDK to latest version.
 - Rewrite S3 Template downloader.
 - Rewrite S3Utils utility class.
 - Improve addImageStoreS3 API command.
 - Split various classes for convenience.
 - Various minor improvements and code optimalisations.

A side effect of the new AWS SDK is that it, by default, uses the V4 signature. Therefore I added an option to specify the Signer, so it stays compatible with previous versions.
2015-11-19 15:29:10 +01:00
Remi Bergsma
1f53f2a93e Updating pom.xml version numbers for release 4.7.0-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-15 18:54:13 +01:00
Sanjay Tripathi
9a35f87d37 CLOUDSTACK-8835: Added alerts incase of template download failure
Reviewed-By: Devdeep
2015-09-11 16:07:35 +05:30
Koushik Das
3be278ed5e CLOUDSTACK-8651: [Browser Based Upload Template] Partially uploaded templates doesn't get cleaned up after the SSVM handling it is destroyed
Fixed template sync code to include templates in 'NotUploaded' and 'UploadInProgress' states along with 'Active'.
2015-07-29 13:40:43 +05:30
Rajani Karuturi
0b8355920e Merge branch 'volume-upload' into master
This closes #206
2015-04-29 11:12:53 +05:30
Koushik Das
bc399b981f volume-upload: If SSVM is destroyed and started, then partially uploaded volumes/templates remain in
inconsistent state (NotUploaded or UploadInProgress) and doesn't transition to any terminal
state (Uploaded, Uploaded). As a result these volumes/templates cannot be removed. Fix is to handle such
volume/template entries correctly.
2015-04-22 19:28:51 +05:30
Sanjay Tripathi
30604e973a CLOUDSTACK-8386: CS is returning sec. storage even if it is full and there are other sec. storage with free space. 2015-04-14 16:10:40 +05:30
Rohit Yadav
694b723899 CLOUDSTACK-8312: Fix NPE regression, copy template can have NULL volume size
The copy command reply can have null size returned, so check and set values

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 53ca0b1861c743caf61ec04f776c87eac334f185)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-20 17:27:14 +05:30
Sanjay Tripathi
520d96724a CLOUDSTACK-8312: The storage usage of "Primary Storage Allocated" is incorrect. 2015-03-10 16:52:25 +05:30
Koushik Das
053c160b0f volume upload: management server polling and upload status from agent
MS polling logic to query status for templates that are uploaded
2015-01-16 18:03:36 +05:30
Mike Tutkowski
455ffc3342 Create a template from a SAN snapshot 2014-11-06 10:33:23 -07:00
Hugo Trippaers
4ebaf0a583 Bump master version to 4.6.0-SNAPSHOT after branching 4.5.0-SNAPSHOT 2014-10-29 14:54:23 +01:00
Hugo Trippaers
47ac3e4fd1 CLOUDSTACK-7665 File.separator shouldn't be used in this case, the
separator is fixed just like the rest of the path
2014-10-02 09:54:53 +02:00
Hugo Trippaers
dc3f0cbc63 Improve the handling of the findbug exclude files 2014-09-03 10:41:22 +02:00
Nitin Mehta
5393387bbd CLOUDSTACK-6599:
1. Adding the missing Template/Volume URLs expiration functionality
2. Improvement - While deleting the volume during expiration use rm -rf as vmware now contains directoy
3. Improvement - Use standard Answer so that the error gets logged in case deletion of expiration link didnt work fine.
4. Improvement - In case of domain change, expire the old urls
2014-05-30 10:48:42 -07:00
Daan Hoogland
8b62b2cb92 findbugs: exclude known spiffy hacks a.k.a. false positives 2014-03-28 14:28:10 +01:00
Daan Hoogland
8b510d2481 checkstyle: unused import 2014-03-18 13:18:57 +01:00
edison
ed9ed446c2 CLOUDSTACK-5432: potential bugs in case of stop mgt server while
template is downloading, template_store_ref has leftover not in ready
state, when create vm from that template, the code doesn't check either
zone id, nor template_store_ref state.

Conflicts:
	engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java
2014-03-18 12:20:14 +01:00
Min Chen
ae1d6a771b Remove IAMEntityType to use existing VO interface class to annotate
entityType.
2014-03-17 17:19:55 -07:00
Hugo Trippaers
4402685e11 Update master to 4.5.0-SNAPSHOT 2014-03-14 14:55:26 +01:00
Alena Prokharchyk
6c23e201ad 1) More fixes for the problems found by findBugs
2) Corrected some logging in  MidoNetPublicNetworkGuru - removed .toString method call on the objects in the log body as toString is called on the object by default when use log4j
2014-03-13 16:05:45 -07:00
John Kinsella
09c375379d CLOUDSTACK-6204: removing realhostip dependency
Moving default transport for console proxy, SSVM to http.

See
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Realhost+IP+changes
for more info.

jlk ported Amogh's patch for 4.3 to master - code base is different
enough that patch has multiple issues.

Author: Amogh Vasekar <Amogh Vasekar <amogh.vasekar@citrix.com>
Signed-off-by: John Kinsella <jlk@stratosec.co> 1394398017 -0700
2014-03-09 13:46:57 -07:00
Mike Tutkowski
b06e66c50a CLOUDSTACK-6170 2014-03-05 13:55:12 -07:00
Min Chen
d0ae4d9a9f CLOUDSTACK-5920:Add interface to ControlledEntity to return IAM
entity type.
2014-03-05 09:40:55 -08:00
Min Chen
16a9171f55 Fix trailing whitespace. 2014-01-28 14:53:18 -08:00
Min Chen
a26c81178b CLOUDSTACK-5971:Templates created from a snapshots can't be copied to
other zones.
2014-01-28 14:49:58 -08:00