31048 Commits

Author SHA1 Message Date
Rohit Yadav
eda3b35bfa CLOUDSTACK-10012: Migrate to Embedded Jetty
- Migrate to embedded Jetty server.
- Improve ServerDaemon implementation.
- Introduce a new server.properties file for easier configuration.
- Have a single /etc/default/cloudstack-management to configure env.
- Reduce shaded jar file, removing unnecessary dependencies.
- Upgrade to Spring 5.x, upgrade several jar dependencies.
- Does not shade and include mysql-connector, used from classpath instead.
- Upgrade and use bountcastle as a separate un-shaded jar dependency.
- Remove tomcat related configuration and files.
- Have both embedded UI assets in uber jar and separate webapp directory.
- Refactor systemd and init scripts, cleanup packaging.
- Made cloudstack-setup-databases faster, using `urandom`.
- Remove unmaintained distro packagings.
- Moves creation and usage of server keystore in CA manager, this
  deprecates the need to create/store cloud.jks in conf folder and
  the db.cloud.keyStorePassphrase in db.properties file. This also
  remove the need of the --keystore-passphrase in the
  cloudstack-setup-encryption script.
- GZip contents dynamically in embedded Jetty

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-11-03 23:57:25 +05:30
Marc-Aurèle Brothier
e9f29c787d CLOUDSTACK-10012: Introduce Embedded Jetty with shaded jar
- Changes packaging to shaded jar
- Introduced embedded jetty
- Updates jetty dependencies version 9.2 (java 7+)
- Initial changes to debian config files
- Initial removal of tomcat dependency
- Introduce ServerDaemon class with customizations
2017-11-03 23:57:25 +05:30
Rafael Weingärtner
c6b808fd33 CLOUDSTACK-10111: Fix validation for parameter "vm.password.length" (#2291)
The description of the parameter was saying that the parameter has to be bigger than 6, however, in the code we were only accepting values bigger than 10. This PR changes the validation method to accept any number >= 6. We also change other inconsistencies in error messages presented to users. in near by validations.
2017-11-03 20:35:33 +05:30
Nicolas Vazquez
1315c947c0 CLOUDSTACK-10122: Unrelated error message (#2302)
Simply remove unrelated text from error message
2017-11-03 20:33:33 +05:30
Nitesh Sarda
a50a461c8e CLOUDSTACK-10085 : Upload volume from local fails when global config max.account.seconday.storage is set to -1 2017-11-03 08:43:09 +01:00
Nitesh Sarda
1d36b7288a CLOUDSTACK-10120 : Allow migration of VM's from Cloudstack UI between the hosts with different version 2017-11-03 08:37:20 +01:00
Frank Maximus
d077b3efc6
Merge pull request #2004 from nuagenetworks/feature/vr_without_public_ip
CLOUDSTACK-9832: Do not assign public IP NIC to the VPC VR when the VPC offering does not contain VpcVirtualRouter as a SourceNat provider
2017-11-02 11:56:05 +01:00
Frank Maximus
2139dbe803
Merge pull request #2238 from nuagenetworks/feature/caching_and_statistics
[CLOUDSTACK-10053] Performance improvement: caching of NuageVsp ID
2017-11-02 11:13:15 +01:00
Sigert Goeminne
0871ff9eda CLOUDSTACK-10053: Performance improvement: caching of NuageVsp ID
* VSP ID Caching
* VSP call Statistics
* 5.0 Support

Co-Authored-By: Frank Maximus <frank.maximus@nuagenetworks.net>
Co-Authored-By: Raf Smeets <raf.smeets@nuagenetworks.net>
2017-10-31 17:03:11 +01:00
Sigert Goeminne
587b66db71 CLOUDSTACK-10057: listNetworkOfferings now returns the correct number of offerings (#2250)
Fix paginated response to send correct total resource counts.
2017-10-31 15:05:29 +05:30
Frank Maximus
ca130488c0
Merge pull request #2268 from nuagenetworks/bugfix/CLOUDSTACK-10081
CLOUDSTACK-10081: getDevInfo now returns correct value
2017-10-30 13:25:42 +01:00
Sigert Goeminne
9c7cd8c248 CLOUDSTACK-10081: CloudUtils getDevInfo function will now return "bridge" instead of "dev" when the name of a ovs bridge is passed. 2017-10-30 11:53:04 +01:00
Rohit Yadav
41fdb88970 CLOUDSTACK-10047: DVSwitch fixes and improvements (#2293)
Allow security policies to apply on port groups:
- Accepts security policies while creating network offering
- Deployed network will have security policies from the network offering
  applied on the port group (in vmware environment)
- Global settings as fallback when security policies are not defined for a network
  offering
- Default promiscuous mode security policy set to REJECT as it's the default
  for standard/default vswitch

Portgroup vlan-trunking options for dvswitch: This allows admins to define
a network with comma separated vlan id and vlan
range such as vlan://200-400,21,30-50 and use the provided vlan range to
configure vlan-trunking for a portgroup in dvswitch based environment.

VLAN overlap checks are performed for:
- isolated network against existing shared and isolated networks
- dedicated vlan ranges for the physical/public network for the zone
- shared network against existing isolated network

Allow shared networks to bypass vlan overlap checks: This allows admins
to create shared networks with a `bypassvlanoverlapcheck` API flag
which when set to 'true' will create a shared network without
performing vlan overlap checks against isolated network and against
the vlans allocated to the datacenter's physical network (vlan ranges).

Notes:
- No vlan-range overlap checks are performed when creating shared networks
- Multiple vlan id/ranges should include the vlan:// scheme prefix

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-10-25 15:14:42 +05:30
Daan Hoogland
4d19373d36 Merge release branch 4.10 to master
* 4.10:
  CLOUDSTACK-10113 password resets only one at the time
2017-10-25 09:54:30 +02:00
Daan Hoogland
4f6b91d958 Merge release branch 4.9 to 4.10
* 4.9:
  CLOUDSTACK-10113 password resets only one at the time
2017-10-25 09:51:58 +02:00
Daan Hoogland
382d458f43 CLOUDSTACK-10113 password resets only one at the time 2017-10-25 09:29:35 +02:00
Rohit Yadav
b6dc40faef CLOUDSTACK-10103: Cloudian Connector for CloudStack (#2284)
Several organizations use Cloudian as S3 provider, this implements the
Cloudian Management Console connector for CloudStack that can do the
following:

- Provide ease in connector configuration using CloudStack global
  settings
- Perform SSO from CloudStack UI into Cloudian Management Console (CMC)
  when the connector is enabled
- Automatic provisioning and de-provisioning of CloudStack accounts and
  domains as Cloudian users and groups respectively
- During CloudStack UI logout, logout user from CMC
- CloudStack account will be mapped to Cloudian Users, and CloudStack
  domain will be mapped to Cloudian Groups.
- The CloudStack admin account is mapped to Cloudian admin (user name
  configurable).
- The user/group provisioning will be from CloudStack to Cloudian only,
  i.e. user/group addition/removal/updation/deactivation in Cloudian
  portal (CMC) won't propagate the changes to CloudStack.

FS: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Cloudian+Connector+for+CloudStack

New APIs:
- `cloudianIsEnabled`: API to check whether Cloudian Connector is enabled.
- `cloudianSsoLogin`: Performs SSO for the logged-in, requesting user
                      and returns the URL that can be used to perform
                      SSO and log into CMC.

New Global Settings:
- cloudian.connector.enabled  (false)
If set to true, this enables the Cloudian Connector for CloudStack.
Restarting management server(s) is required.
- cloudian.admin.host (s3-admin.cloudian.com)
The host where Cloudian Admin services are accessible.
- cloudian.admin.port (19443)
The admin service port.
- cloudian.admin.protocol (https)
The admin service API scheme/protocol.
- cloudian.validate.ssl (true)
 When set to true, this validates the certificate of the https-enabled
admin API service.
- cloudian.admin.user (sysadmin)
The admin user's name when making (admin) API calls.
- cloudian.admin.password (public)
The admin password used when making (admin) API calls.
- cloudian.api.request.timeout (5)
The API request timeout in seconds used by the internal HTTP/s client.
- cloudian.cmc.admin.user (admin)
The CMC admin user's name.
- cloudian.cmc.host (cmc.cloudian.com)
The CMC host.
- cloudian.cmc.port (8443)
The CMC service port.
- cloudian.cmc.protocol (https)
 The CMC service scheme/protocol.
- cloudian.sso.key (ss0sh5r3dk3y)
The Single-Sign-On shared key.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-10-25 10:49:45 +05:30
Rohit Yadav
bd953d811f CLOUDSTACK-10107: For VMware VMs add devices without unit number (#2288)
When VMs are deployed or nics are plugged, using a static unit number
may cause device configuration errors. This fixes a previous limitation
that more than 7 nics/networks could not be added to a VM.

Per the API docs, `unitNumber` need not be set:
https://www.vmware.com/support/developer/converter-sdk/conv55_apireference/vim.vm.device.VirtualDevice.html

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-10-25 09:56:44 +05:30
dahn
285fd77674 CLOUDSTACK-9957 test fix (#2297)
* tyopos in test
* unittest to prove interface
* test logic flaw fixed
2017-10-19 08:57:47 +02:00
Mike Tutkowski
4c89b5b97a Merge branch 'pr-2081' 2017-10-18 14:25:45 -06:00
dahn
3985c68bc5 CLOUDSTACK-10007 no isolationmethod check for directpodbase basic zone nets (#2296) 2017-10-15 09:06:04 +02:00
dahn
a379230e8e CLOUDSTACK-9957 Annotations (#2181)
* annotations on hosts

* Adding marvin tests

* rebase error

* review comments

* context for owner

* review

* illegal entity test

* entityType check on input

* Annotation events

* rebase issues
2017-10-13 11:55:26 +02:00
PranaliM
189b0e4487 CLOUDSTACK-10060: ListUsage API always displays the Virtual size as '0' for Usage type=9 (snapshot) (#2257)
Bug Description:
In the listUsage API, the Virtual Size of Snapshot is always displayed as '0'.

Root Cause:
In case of snapshots, the usage is accounted for depending on the value of the global parameter, 'usage.snapshot.virtualsize.select'. If set to 'true', the usage calculation is done based on the Virtual Size, and if set to false, it is done based on the Physical size. In the Usage API, this value, (i.e. virtual or physical) is displayed as 'Size' field correctly, but the field 'VirtualSize' is always displayed as 0. This is misleading.

Expected Output:
Since this is a Usage API, ideally only that size should be displayed which is used for billing, depending on the value of 'usage.snapshot.virtualsize.select'.
There is another API - the ListSnapshot API that displays both, the physical as well as Virtual size and can be used to know both the sizes.

Fix Implemented:
Skipped showing the 'VirtualSize' Field for type=snapshot
2017-10-12 18:17:18 +05:30
Rohit Yadav
c3ed1b38e5 CLOUDSTACK-9993: Have basic constraint in CA certificate (#2286)
- Refactors V3 x509 cert generator to put basic constraint and key usage
  extensions when CA cert is created
- Refactors root CA provider to use V3 generator to generate CA cert

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-10-11 17:41:37 +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
dahn
ed7811a9a2 CLOUDSTACK-10046 checksum validation for any java supported Digests-type (#2246)
* CLOUDSTACK-10046 digest helper for calculating checksums

* CLOUDSTACK-10046 cleanup unused checksum code

* CLOUDSTACK-10046 padding method proof of concept

* CLOUDSTACK-10046 only compare checksums if old value is valid

* Adding positive and negative tests for md5, sha-1 and sha-256, for xen, vmware and kvm hypervisors.
KVM Results:

 Negative Test Passed - Exception Occurred Under template download ['Traceback (most recent call last):\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py", line 189, in test_02_1_create_template_with_checksum_sha1_negative\n    self.download(self.apiclient, template.id)\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py", line 260, in download\n    template.status)\n', 'Exception: Failed to download template: status - Failed post download script: checksum "{sha-1}bf580a13f791d86acf3449a7b457a91a14389264" didn\'t match the given value, "{sha-1}someInvalidValue"\n']
=== TestName: test_02_1_create_template_with_checksum_sha1_negative | Status : SUCCESS ===
=== TestName: test_02_create_template_with_checksum_sha1 | Status : SUCCESS ===.
 Negative Test Passed - Exception Occurred Under template download ['Traceback (most recent call last):\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py", line 203, in test_03_1_create_template_with_checksum_sha256_negative\n    self.download(self.apiclient, template.id)\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py", line 260, in download\n    template.status)\n', 'Exception: Failed to download template: status - Failed post download script: checksum "{SHA-256}efc03633f2b8f5db08acbcc5dc1be9028572dfd8f1c6c8ea663f0ef94b458c5" didn\'t match the given value, "{SHA-256}someInvalidValue"\n']
=== TestName: test_03_1_create_template_with_checksum_sha256_negative | Status : SUCCESS ===
=== TestName: test_03_create_template_with_checksum_sha256 | Status : SUCCESS ===
 Negative Test Passed - Exception Occurred Under template download ['Traceback (most recent call last):\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py", line 217, in test_04_1_create_template_with_checksum_md5_negative\n    self.download(self.apiclient, template.id)\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py", line 260, in download\n    template.status)\n', 'Exception: Failed to download template: status - Failed post download script: checksum "{md5}ada77653dcf1e59495a9e1ac670ad95f" didn\'t match the given value, "{md5}someInvalidValue"\n']
=== TestName: test_04_1_create_template_with_checksum_md5_negative | Status : SUCCESS ===
=== TestName: test_04_create_template_with_checksum_md5 | Status : SUCCESS ===

* CLOUDSTACK-10046 digest helper for calculating checksums

* CLOUDSTACK-10046 cleanup unused checksum code

* CLOUDSTACK-10046 padding method proof of concept

* CLOUDSTACK-10046 only compare checksums if old value is valid

* Adding positive and negative tests for md5, sha-1 and sha-256, for xen, vmware and kvm hypervisors.
KVM Results:

 Negative Test Passed - Exception Occurred Under template download ['Traceback (most recent call last):\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py", line 189, in test_02_1_create_template_with_checksum_sha1_negative\n    self.download(self.apiclient, template.id)\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py", line 260, in download\n    template.status)\n', 'Exception: Failed to download template: status - Failed post download script: checksum "{sha-1}bf580a13f791d86acf3449a7b457a91a14389264" didn\'t match the given value, "{sha-1}someInvalidValue"\n']
=== TestName: test_02_1_create_template_with_checksum_sha1_negative | Status : SUCCESS ===
=== TestName: test_02_create_template_with_checksum_sha1 | Status : SUCCESS ===.
 Negative Test Passed - Exception Occurred Under template download ['Traceback (most recent call last):\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py", line 203, in test_03_1_create_template_with_checksum_sha256_negative\n    self.download(self.apiclient, template.id)\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py", line 260, in download\n    template.status)\n', 'Exception: Failed to download template: status - Failed post download script: checksum "{SHA-256}efc03633f2b8f5db08acbcc5dc1be9028572dfd8f1c6c8ea663f0ef94b458c5" didn\'t match the given value, "{SHA-256}someInvalidValue"\n']
=== TestName: test_03_1_create_template_with_checksum_sha256_negative | Status : SUCCESS ===
=== TestName: test_03_create_template_with_checksum_sha256 | Status : SUCCESS ===
 Negative Test Passed - Exception Occurred Under template download ['Traceback (most recent call last):\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py", line 217, in test_04_1_create_template_with_checksum_md5_negative\n    self.download(self.apiclient, template.id)\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py", line 260, in download\n    template.status)\n', 'Exception: Failed to download template: status - Failed post download script: checksum "{md5}ada77653dcf1e59495a9e1ac670ad95f" didn\'t match the given value, "{md5}someInvalidValue"\n']
=== TestName: test_04_1_create_template_with_checksum_md5_negative | Status : SUCCESS ===
=== TestName: test_04_create_template_with_checksum_md5 | Status : SUCCESS ===

* Adding additional test with no checksum added when registering template
Result:
test_05_create_template_with_no_checksum (integration.smoke.test_templates.TestCreateTemplateWithChecksum) ... === TestName: test_05_create_template_with_no_checksum | Status : SUCCESS ===
ok

----------------------------------------------------------------------
Ran 1 test in 42.320s

OK

* Fixing negative tests exception handling

* Adding tests for ISO checksum validation and fixing a zero prefix failure test in templates

* CLOUDSTACK-10046 padding

* CLOUDSTACK-10046 usability additions

* yet another IDE artifact hindering checkstyle
2017-10-11 11:49:06 +02:00
Frank Maximus
1d382e0cb4 CLOUDSTACK-9832: Remove public interface from VPC Virtual Router
Co-Authored-By: Prashanth Manthena <prashanth.manthena@nuagenetworks.net>
Co-Authored-By: Sigert Goeminne <sigert.goeminne@nuagenetworks.net>

Bug: https://issues.apache.org/jira/browse/CLOUDSTACK-9832

Detail:
When the VPC offering does not contain VpcVirtualRouter as a SourceNat provider,
then we will not add the interface in the public network to the VpcVR.

CLOUDSTACK-9832: Move isSrcNat check to VpcManager
2017-10-11 11:35:53 +02:00
dahn
7ca5b535a4 CLOUDSTACK-9899 Url validation disabling (#2074)
* CLOUDSTACK-9899 adding a global setting for not checking URLs from the MS

* CLOUDSTACK-9899 refactor HttpTemplateDownloader contructor cleanup

* CLOUDSTACK-9899 refactor HttpTemplateDownloader.download() cleanup

* CLOUDSTACK-9899 add the new config key to configurable

* CLOUDSTACK-9899 refactor download method

* CLOUDSTACK-9899 less verbose setting comment

* CLOUDSTACK-9899 debug message to indicate checking happened

* CLOUDSTACK-9899 typi flase -> false
2017-10-10 19:56:00 +02:00
Daan Hoogland
5636c9bcae CLOUDSTACK-8308 automation test for Delta Snapshot 2017-10-10 19:52:49 +02:00
Gabriel Beims Bräscher
f1c01a5fa2 CLOUDSTACK-10101: Present the full domain name when listing user's domains in SAML2 plugin (#2280)
This commit is related to the Saml2 user authentication plugin.

The user can list its domains. His/Her domains are presented as the
following example:
username/subdomainA
username/subdomainB

However, if a user has two subdomains of the same name Dom1/subdomainA
and Dom2/subdomainA, the list is presented as follows:
username/subdomainA
username/subdomainA

With this commit it shows the full domain name to avoid such cases.
Thus, the domains will be presented as follows:
username/Dom1/subdomainA
username/Dom2/subdomainA
2017-10-10 10:12:03 +05:30
Rafael Weingärtner
b044f1bc96 CLOUDSTACK-9859: Retirement of midonet plugin (final removal) (#2285)
Following the component retirement process defined in [1], a vote thread was started in [2]. The community decided to retire this Midonet plugin. This task represents the final step of the retirement, which is the removal of the plugin from CloudStacks code base.

[1] https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=68720798
[2] http://markmail.org/message/qigrtfirwnmct4hr
2017-10-10 10:08:23 +05:30
Harika Punna
6bb0ca2f85 This feature separates the snapshot creation on primary and its backing up on secondary.
As part of this, a new parameter, which is optional, is added to CreateSnapshotCmd, which seperates the creation and backup.

More details in the FS-
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Separate+creation+and+backup+operations+for+a+volume+snapshot
2017-10-04 14:39:03 +05:30
Rohit Yadav
0dfdbe064c CLOUDSTACK-9993: With auth strictness stop SSL handshake for rogue clients (#2278)
When auth strictness is set to true, terminate SSH handshake for clients
that do not present valid certificates.

This uses the `setNeedClientAuth`, where if the option is set and the
client chooses not to provide authentication information about itself,
the negotiations will stop and the engine will begin its closure
procedure:
https://docs.oracle.com/javase/7/docs/api/javax/net/ssl/SSLEngine.html#setNeedClientAuth(boolean)

During systemvm reboot, the conf folder is removed and certificate
re-setup is not done. This may cause the agent to not connect, this
fixes the case by backing up and restoring keystore and other config
files when re-patching is done after rebooting of a systemvm (cpvm, ssvm).

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-10-04 09:53:49 +05:30
Rohit Yadav
74ec9cefca CLOUDSTACK-9584: Re-arrange failing project_limits test (#2279)
This rearranges a project related component that is likely failing due
to env/state changes by other project related tests groupped in the
same job.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-09-30 11:03:03 +05:30
Mike Tutkowski
19706b94ff CLOUDSTACK-10099: Fix migrateVirtualMachineWithVolume UI failure (#2277)
Fix UI issue, which concerns the GUI not invoking the migrateVirtualMachineWithVolume API command when it should.
2017-09-29 16:32:55 +05:30
Bitworks Software, Ltd
3381c38cc7 CLOUDSTACK-10073: KVM host RAM overprovisioning (#2266)
Commit enables a new feature for KVM hypervisor which purpose is to increase virtually amount of RAM available beyond the actual limit.
There is a new parameter in agent.properties: host.overcommit.mem.mb which enables adding specified amount of RAM to actually available. It is necessary to utilize KSM and ZSwap features which extend RAM with deduplication and compression.
2017-09-29 11:46:09 +05:30
dahn
a06530ddd8 CLOUDSTACK-10007 Isolation method claim (#2249)
CLOUDSTACK-10007 isolationMethod claiming
2017-09-28 11:07:48 +02:00
Wido den Hollander
b130e55088 CLOUDSTACK-9397: Add Watchdog timer to KVM Instance (#1707)
The watchdog timer adds functionality where the Hypervisor can detect if an
instance has crashed or stopped functioning.
The watchdog timer adds functionality where the Hypervisor can detect if an
instance has crashed or stopped functioning.

When the Instance has the 'watchdog' daemon running it will send heartbeats
to the /dev/watchdog device.

If these heartbeats are no longer received by the HV it will reset the Instance.

If the Instance never sends the heartbeats the HV does not take action. It only
takes action if it stops sending heartbeats.

This is supported since Libvirt 0.7.3 and can be defined in the XML format as
described in the docs: https://libvirt.org/formatdomain.html#elementsWatchdog

To the 'devices' section this will be added:

In the agent.properties the action to be taken can be defined:

vm.watchdog.action=reset

The same goes for the model. The Intel i6300esb is however the most commonly used.

vm.watchdog.model=i6300esb

When the Instance has the 'watchdog' daemon running it will send heartbeats
to the /dev/watchdog device.

If these heartbeats are no longer received by the HV it will reset the Instance.

If the Instance never sends the heartbeats the HV does not take action. It only
takes action if it stops sending heartbeats.

This is supported since Libvirt 0.7.3 and can be defined in the XML format as
described in the docs: https://libvirt.org/formatdomain.html#elementsWatchdog

To the 'devices' section this will be added:

  <watchdog model='i6300esb' action='reset'/>

In the agent.properties the action to be taken can be defined:

  vm.watchdog.action=reset

The same goes for the model. The Intel i6300esb is however the most commonly used.

  vm.watchdog.model=i6300esb

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2017-09-28 13:56:15 +05:30
Marc-Aurèle Brothier
e1cff7d435 CLOUDSTACK-10083: Allow ModifySshKeys to be forwarded to the agent in maintenance mode (#2269)
Signed-off-by: Marc-Aurèle Brothier <m@brothier.org>
2017-09-28 12:39:46 +05:30
SudharmaJain
c670691bfb CLOUDSTACK-8865: Adding SR doesn't create Storage_pool_host_ref entry for disabled host (#876)
This causes VM deployment failure on the host that was disabled while adding the storage repository.
In the attachCluster function of the PrimaryDataStoreLifeCycle, we were only selecting hosts that are up and are in enabled state. Here if we select all up hosts, it will populate the DB properly and will fix this issue. Also added a unit test for attachCluster function.
2017-09-21 10:49:11 +05:30
sureshanaparti
f2584bb9e7 CLOUDSTACK-9182: Some running VMs turned off on manual migration when auto migration failed while host preparing for maintenance. (#1252)
Fix: Block VMOperations if Host in PrepareForMaintenance mode. VM operations (Stop, Reboot, Destroy, Migrate to host) are not allowed when Host in PrepareForMaintenance mode.
2017-09-20 16:23:24 +05:30
SudharmaJain
3f69c83f96 CLOUDSTACK-9956: File search on the vmware datastore may select wrong file if there are multiple files with same name (#2153)
If there are multiple files with the same name on vmware datastore, search operation may select any one file during volume related operations. This involves volume attach/detach, volume download, volume snapshot etc.

While using NetApp as the backup solution. This has .snapshot folder on the datastore and sometimes files from this folder gets selected during volume operations and the operation fails. Because of wrong selection of file following exception can be observed while volume deletion.

2017-02-23 19:39:05,750 ERROR [c.c.s.r.VmwareStorageProcessor] (DirectAgent-304:ctx-a1dbf5d8 ac.local) delete volume failed due to Exception: java.lang.RuntimeException
Message: Cannot delete file [4cbcd46d44c53f5c8244c0aad26a97e1] .snapshot/hourly.2017-02-23_1605/r-97-VM/ROOT-97.vmdk

To fix this behavior I have added a global configuration by name vmware.search.exclude.folders which can be comma separated list of folder paths.

I have also added a unit test to test the new method.
2017-09-19 15:12:17 +05:30
Nathan Johnson
3bc2341c64 CLOUDSTACK-9902: add consoleproxy.sslEnable global setting (#2078)
This adds the missing global configuration parameter consoleproxy.sslEnable required for enabling SSL on the console proxy VM.
2017-09-19 15:09:28 +05:30
Lars Tobias Skjong-Børsting
a4036f7083 CLOUDSTACK-10067: Fix a case where a user 'ro' or 'roo' exists on the system, or other variants. (#2252)
If one sets user=roo, this will return two directories and then it will fail.
2017-09-18 12:15:36 +05:30
Nathan Johnson
2bad9a6c11 CLOUDSTACK-9949: add ability to specify mac address (#2143)
Added ability to specify mac in deployVirtualMachine and
addNicToVirtualMachine api endpoints.

Validates mac address to be in the form of:
aa:bb:cc:dd:ee:ff , aa-bb-cc-dd-ee-ff , or aa.bb.cc.dd.ee.ff.

Ensures that mac address is a Unicast mac.

Ensures that the mac address is not already allocated for the
specified network.
2017-09-16 12:16:42 +05:30
Nathan Johnson
2ccea134ae CLOUDSTACK-10056: Fix vm details usage (#2248)
Fix bug where disk controller specified via vm details throws
a NumberFormatException, since "scsi" is not a number.
2017-09-16 12:01:03 +05:30
mrunalinikankariya
c7a55eb812 CLOUDSTACK-10019: template.properties has hardcoded id (#2243)
The template.properties file created after creating template from snapshot has hardcoded id = 1.
The id should have template ID.
2017-09-14 17:54:12 +05:30
Boris Stoyanov - a.k.a Bobby
d84585fa6e CLOUDSTACK-10068: Fixing test_iso.py assertions are equating srt and bool instead of the same types (#2261)
It appears that asserts.equal(boolean.True, str.True) which seems to be causing the issue. Probably related to some api changes in recent PRs. Will fix the equation to str.lower() so it'll pass.

Strangely when running the tests from Pycharm CE they pass, it seems the IDE resolves the type issue during comparison. But when running from command line it failes...

After fixing this results came back as expected:
2017-09-14 17:52:09 +05:30
harikrishna-patnala
b655f9be06 Merge pull request #2054 from Accelerite/cs-51009
CLOUDSTACK-9886 : After restarting cloudstack-management , It takes time to connect hosts
2017-09-14 15:48:01 +05:30
SudharmaJain
c4ca420f66 CLOUDSTACK-8969: VPN customer gateway can't be registered with hostname (#955)
When we have VPN customer gateway which is resolved by a hostname , we should be able to register the VPN customer gateway with its hostname instead of the IP address, this would be useful in case where the remote device IP is dynamically assigned , where customers use DDNS to resolve it.
2017-09-13 10:29:08 +05:30