10047 Commits

Author SHA1 Message Date
Rohit Yadav
c0b33db5ce CLOUDSTACK-9782: Nested-oobm CloudStack plugin
Nested out-of-band management plugin to work with hosts that are VMs in
a CloudStack env.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-30 18:06:48 +02:00
Rohit Yadav
212e5ccfa7 CLOUDSTACK-9782: Host HA and KVM HA provider
Host-HA offers investigation, fencing and recovery mechanisms for host that for
any reason are malfunctioning. It uses Activity and Health checks to determine
current host state based on which it may degrade a host or try to recover it. On
failing to recover it, it may try to fence the host.

The core feature is implemented in a hypervisor agnostic way, with two separate
implementations of the driver/provider for Simulator and KVM hypervisors. The
framework also allows for implementation of other hypervisor specific provider
implementation in future.

The Host-HA provider implementation for KVM hypervisor uses the out-of-band
management sub-system to issue IPMI calls to reset (recover) or poweroff (fence)
a host.

The Host-HA provider implementation for Simulator provides a means of testing
and validating the core framework implementation.

Signed-off-by: Abhinandan Prateek <abhinandan.prateek@shapeblue.com>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-30 18:06:48 +02:00
Jayapal
6e832b55dc Merge pull request #2109 from Accelerite/CLOUDSTACK-9922
CLOUDSTACK-9922 Unable to use 8081 port for Load balancing
2017-08-30 15:15:19 +05:30
Rohit Yadav
7ce54bf7a8 CLOUDSTACK-9993: Securing Agents Communications (#2239)
This introduces a new certificate authority framework that allows
pluggable CA provider implementations to handle certificate operations
around issuance, revocation and propagation. The framework injects
itself to `NioServer` to handle agent connections securely. The
framework adds assumptions in `NioClient` that a keystore if available
with known name `cloud.jks` will be used for SSL negotiations and
handshake.

This includes a default 'root' CA provider plugin which creates its own
self-signed root certificate authority on first run and uses it for
issuance and provisioning of certificate to CloudStack agents such as
the KVM, CPVM and SSVM agents and also for the management server for
peer clustering.

Additional changes and notes:
- Comma separate list of management server IPs can be set to the 'host'
  global setting. Newly provisioned agents (KVM/CPVM/SSVM etc) will get
  radomized comma separated list to which they will attempt connection
  or reconnection in provided order. This removes need of a TCP LB on
  port 8250 (default) of the management server(s).
- All fresh deployment will enforce two-way SSL authentication where
  connecting agents will be required to present certificates issued
  by the 'root' CA plugin.
- Existing environment on upgrade will continue to use one-way SSL
  authentication and connecting agents will not be required to present
  certificates.
- A script `keystore-setup` is responsible for initial keystore setup
  and CSR generation on the agent/hosts.
- A script `keystore-cert-import` is responsible for import provided
  certificate payload to the java keystore file.
- Agent security (keystore, certificates etc) are setup initially using
  SSH, and later provisioning is handled via an existing agent connection
  using command-answers. The supported clients and agents are limited to
  CPVM, SSVM, and KVM agents, and clustered management server (peering).
- Certificate revocation does not revoke an existing agent-mgmt server
  connection, however rejects a revoked certificate used during SSL
  handshake.
- Older `cloudstackmanagement.keystore` is deprecated and will no longer
  be used by mgmt server(s) for SSL negotiations and handshake. New
  keystores will be named `cloud.jks`, any additional SSL certificates
  should not be imported in it for use with tomcat etc. The `cloud.jks`
  keystore is stricly used for agent-server communications.
- Management server keystore are validated and renewed on start up only,
  the validity of them are same as the CA certificates.

New APIs:
- listCaProviders: lists all available CA provider plugins
- listCaCertificate: lists the CA certificate(s)
- issueCertificate: issues X509 client certificate with/without a CSR
- provisionCertificate: provisions certificate to a host
- revokeCertificate: revokes a client certificate using its serial

Global settings for the CA framework:
- ca.framework.provider.plugin: The configured CA provider plugin
- ca.framework.cert.keysize: The key size for certificate generation
- ca.framework.cert.signature.algorithm: The certificate signature algorithm
- ca.framework.cert.validity.period: Certificate validity in days
- ca.framework.cert.automatic.renewal: Certificate auto-renewal setting
- ca.framework.background.task.delay: CA background task delay/interval
- ca.framework.cert.expiry.alert.period: Days to check and alert expiring certificates

Global settings for the default 'root' CA provider:
- ca.plugin.root.private.key: (hidden/encrypted) CA private key
- ca.plugin.root.public.key: (hidden/encrypted) CA public key
- ca.plugin.root.ca.certificate: (hidden/encrypted) CA certificate
- ca.plugin.root.issuer.dn: The CA issue distinguished name
- ca.plugin.root.auth.strictness: Are clients required to present certificates
- ca.plugin.root.allow.expired.cert: Are clients with expired certificates allowed

UI changes:
- Button to download/save the CA certificates.

Misc changes:
- Upgrades bountycastle version and uses newer classes
- Refactors SAMLUtil to use new CertUtils

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-28 12:15:11 +02:00
Daan Hoogland
426894411e CE-110 move config to public fields 2017-08-25 08:57:51 +02:00
vedulasantosh
4b38d36284 CLOUDSTACK-9915 ListSnapshots API does not provide virtual size information of the snapshots (#2101) 2017-08-24 13:21:13 +02:00
Nitin Kumar Maharana
1f29313071 CLOUDSTACK-10002: Restart network with cleanup spawns Redundant Routers(In Default Network Offering) (#2186)
The setter name is different from what it should be used by update call.
2017-08-22 22:48:32 +02:00
SudharmaJain
7f987ace35 CLOUDSTACK-9165: unable to use reserved IP range in a network for external VMs (#1246) 2017-08-22 21:11:45 +02:00
Rohit Yadav
cc749cca3e Merge branch '4.10' 2017-08-22 10:23:29 +02:00
Rohit Yadav
0f27bc9a7b Merge branch '4.9' into 4.10 2017-08-22 10:23:00 +02:00
Rohit Yadav
310195cbe2 CLOUDSTACK-10052: Simplify dynamic roles enable checking (#2241)
This fixes issue of enabling dynamic roles based on the global setting
only. This also fixes application of the default role/permissions mapping
on upgrade from 4.8 and previous versions to 4.9+.

Previously, it would make additional check to ensure commands.properties
is not in the classpath however this creates confusion for admins who
may skip/skim through the rn/docs and assume that mere changing the
global settings was not enough.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-22 10:22:27 +02:00
pavanaravapalli
250c47eb62 CLOUDSTACK-9964: Snapahots are getting deleted if VM is assigned to another user (#2159) 2017-08-19 21:11:45 +02:00
Joakim Sernbrant
ea52a1312f CLOUDSTACK-9763: set ssh public key when creating vm data (#1919) 2017-08-19 20:59:11 +02:00
Marc-Aurèle Brothier
4e4d7c7e36 CLOUDSTACK-9773: Don't break API output with non-printable characters (#1936) 2017-08-19 20:55:20 +02:00
Rohit Yadav
a502c00ca7 Merge branch '4.9' into 4.10 2017-08-17 23:04:29 +02:00
Sigert Goeminne
cd2176f9a6 CLOUDSTACK-10031: change default configuration for router.aggregation.command.each.timeout from 3 to 600 seconds (#2223)
Change default configuration for router.aggregation.command.each.timeout from 3 to 600 seconds (#2223)
(cherry picked from commit 17bc6afc8228ed2da6e0b09f330e18217483577c)

This fixes some test_nic failures caused due to short aggregation command timeout

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-17 23:01:46 +02:00
Sigert Goeminne
17bc6afc82 CLOUDSTACK-10031: change default configuration for router.aggregation.command.each.timeout from 3 to 600 seconds (#2223)
Change default configuration for router.aggregation.command.each.timeout from 3 to 600 seconds (#2223)
2017-08-11 12:26:24 +02:00
Nicolas Vazquez
3f330a2199 CLOUDSTACK-10044: Update role permission (#2236)
This feature allows changing permission for existing role permissions, as those were static and could not be changed once created. It also provides the ability to change these permissions in the UI using a drop down menu for each permission rule, in which admin can select ‘Allow’ or ‘Deny’ permission.

Changes in the API:

This feature modifies behaviour of updateRolePermission API method:

New optional parameters ‘ruleid’ and ‘permission’ are introduced, they are mutual exclusive to ‘ruleorder’ parameter. This defines two use cases:
Update role permission: ‘ruleid’ and ‘permission’ parameters needed
Update rules order: ‘ruleorder’ parameter needed
Parameter ‘ruleorder’ is now optional
updateRolePermission providing ‘ruleorder’ parameter should be sent via POST
2017-08-11 12:24:50 +02:00
Rohit Yadav
f84728d374 Merge branch '4.10' 2017-08-10 01:59:34 +02:00
Rohit Yadav
d9b7b8cb62 Merge branch '4.9' into 4.10
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-10 01:39:14 +02:00
ustcweizhou
aee3dbb49a CLOUDSTACK-10000: Fix remote access vpn does not work due to '#' in password (#2182) 2017-08-10 01:30:21 +02:00
Wei Zhou
5645164dbb CLOUDSTACK-8958: release dedicated ip range in domain removal 2017-08-10 01:11:51 +02:00
SowjanyaPatha
f66bbb9521 CLOUDSTACK-9922 Unable to use 8081 port for Load balancing 2017-08-08 11:57:45 +05:30
Abhinandan Prateek
d7f5b929b2 CLOUDSTACK-9861: Expire VM snapshots after configured duration (#2026)
Default value of the account level global config vmsnapshot.expire.interval is -1 that conforms to legacy behaviour. A positive value will expire the VM snapshots for the respective account in that many hours.
2017-08-06 00:13:17 +02:00
Mowgli
3614f8aae2 CLOUDSTACK-9608: Errored State and Abandoned state Templates are not displayed on UI. (#1774)
Errored and Abandoned Templates should also be displayed on UI so that user has the accessibility to delete the template even before the clean up thread is run. Refer - CLOUDSTACK-9608
2017-08-06 00:10:26 +02:00
niteshsarda
6203013ec6 CLOUDSTACK-9955 : Featured Templates/Iso's created by Root/admin user are not visible to Domain Admin users (#2144)
ISSUE: Featured Templates/Iso's created by Root/admin user are not visible to Domain Admin users.

STEPS TO REPRODUCE

Mark a template as featured and try to view it from a domain admin user
The issue occurs for both templates and iso's registered before and after upgrade
Templates,ISO's whose owner is ROOT admin, public: Yes, featured: Yes
Log in to UI (as a domain admin, such as an admin of “TEST/TEST1” domain)
Choose “Templates”.
Error message will be shown on UI
2017-08-04 20:59:07 +02:00
dahn
597df24b53 CLOUDSTACK-10007: Isolation methods (#2193)
Change isolation methods from an enum to a registry based construct to enhance pluggability
2017-08-03 12:20:37 +02:00
Rohit Yadav
98dc4eb96a CLOUDSTACK-9782: New Background Polling Task Manager (#2218)
CloudStack has several background polling tasks that are spread across
the codebase, the aim of this work is to provide a single manager to
handle submission, execution and handling of background tasks. With
the framework implemented, existing oobm background task has been
refactored to use this manager.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-03 11:53:45 +02:00
mrunalinikankariya
b936feb108 CLOUDSTACK-9950:listUsageRecords doesnt return required fields (#2137)
There is no cpuspeed, cpunumber or memory details in the listUsageRecords output as documented
In DB (cloud_usage table) we have cpu_speed, cpu_cores and ram fileds, but these are not populated for all the VM's. These fields are only populated for the VM's which are deployed with custom service offerings.
2017-08-03 00:39:57 +02:00
Olivier Lemasle
43ae8e3503 CLOUDSTACK-9840: Fix datetime format of snapshots events (#2008)
Include the timezone in datetime format of snapshot events, to be consistent
with every other events.
"eventDateTime" was added by @chipchilders in commit 14ee684ce3 and was
updated the same day to add the timezone (commit bf967eb622f) except for
Snapshots.
2017-08-03 00:31:49 +02:00
SowjanyaPatha
7fea069e8a CLOUDSTACK-9954 Unable to create service offering with networkrate=0 (#2142)
Unable to create service offering with networkrate=0(Unlimited network throttling) with an error "Failed to create service offering xxxxxxx: specify the network rate value more than 0".
2017-08-03 00:19:38 +02:00
subhash yedugundla
b70879cbac CLOUDSTACK-9560 Root volume of deleted VM left unremoved
(cherry picked from commit 5568ee93ad08f998822dc0428e511dc8e8609014)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-01 20:40:25 +02:00
Nitesh Sarda
26bcb9afd8 CLOUDSTACK-9935 : Search in VPN Customer Gateway not working
(cherry picked from commit fdadc7b7607e9f3b78d0577a09986fab346c1788)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-01 20:40:25 +02:00
Subhash Yedugundla
77fb2c92ce CLOUDSTACK-9592 Empty responses from site to site connection status are not handled propertly
(cherry picked from commit ddf8fd514af3ee6fd2a7524a2bc7ea84fc22ea2d)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-01 20:40:25 +02:00
Priyank Parihar
30bb5587d2 CLOUDSTACK-9610: Disabled Host Keeps Being up status after unmanging cluster.
(cherry picked from commit 4b165f1b8f0781299ba955c8425a32e15869a1d1)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-01 20:40:25 +02:00
Anshul Gangwar
75c81d918a CLOUDSTACK-9705: Unauthenticated API allows Admin password reset
Now, Updating the password via UpdateUser API is not allowed via integration port

(cherry picked from commit d206336e1a89d45162c95228ce3486b31d476504)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-01 20:40:25 +02:00
Sudhansu
8240bc4aa2 CLOUDSTACK-9701: When host is disabled/removed,
capacity_type for local storage in op_host_capacity
is still enabled

(cherry picked from commit e06e3b7cd41787efc4e0f3cbf2d5a3040b4f15c9)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-01 20:40:25 +02:00
Sudhansu
4bacb64994 CLOUDSTACK-9842: Unable to map root volume usage to VM
removed code which nullifies  vm_instance_id
Also modified QueryManagerImpl to ignore volume which does not have uuid. This is to avoid duplicate volume listing.

(cherry picked from commit 3cced927c4b1d7e1d8f19bccef46ed8d82e31f41)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-01 20:40:25 +02:00
Nitesh Sarda
e574953427 CLOUDSTACK-9814 : Unable to edit a Sub domain, which has the same name in different domains
(cherry picked from commit 254771c01cb2f3fa4bfc668d36bf11ae133cf61c)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-01 20:40:25 +02:00
Bharat Kumar
d03f499b05 CLOUDSTACK-9638 Problems caused when inputting double-byte numbers for custom compute offerings
(cherry picked from commit 59312dd976a6fb5e4d5d3a5b701fc1cccac9a3d2)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-01 20:40:25 +02:00
Bharat Kumar
63997b3b19 CLOUDSTACK-9666 Added basic configuration validation for the config drive global settings
(cherry picked from commit 366175b9a5dd3994b2807fcc5aaeed7a22052cae)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-01 20:40:25 +02:00
Bharat Kumar
b696a00ea2 CLOUDSTACK-9725 Failed to update VPC Network during N/w offering Upgrade which doesnt have ACL service Enabled.
check if acl service provider is configured when network is associated with a acl.

(cherry picked from commit bbff9f15754c06dc8a7a74fdd34ab7968b052c3f)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-01 20:40:25 +02:00
Sudhansu
5ce122cc08 CLOUDSTACK-9630: Cannot use listNics API as advertised
added missing  details for listNics API response.

(cherry picked from commit e7326b10ef1f51b470df6b683e1e06d753fb02f7)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-01 20:40:25 +02:00
Jayapal
4c37e11175 CLOUDSTACK-8931: Fail to deploy VM instance when use.system.public.ips=false
(cherry picked from commit e1384c3b639541cad08bf11e46cfa5a8af171ee7)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-01 20:40:25 +02:00
root
41d1d40940 CLOUDSTACK-9748:VPN Users search functionality broken
(cherry picked from commit 61823c24f658eb0fe3f1246e61d4a6b9f308cb00)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-01 20:40:25 +02:00
Nitin Kumar Maharana
645283abc4 CLOUDSTACK-9623: Deploying virtual machine fails due to "Couldn't find vlanId" in Basic Zone
(cherry picked from commit 280f3be4e6c77ed50d9f3d09a40ee1a6d470f313)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-01 20:40:25 +02:00
Nick Livens
1f44e884ad CLOUDSTACK-9321 : Multiple Internal LB rules (more than one Internal LB rule with same source IP address) are not getting resolved in the corresponding InternalLbVm instance's haproxy.cfg file
CLOUDSTACK-9321 : Adding component tests for VPC Network functionality - Internal LB rules

CLOUDSTACK-9321 : Extending Nuage VSP Internal LB Marvin tests

Co-Authored-By: Prashanth Manthena <prashanth.manthena@nuagenetworks.net>, Frank Maximus <frank.maximus@nuagenetworks.net>

(cherry picked from commit 62e858131fcc0650d61699efffcf7eb57721e1b1)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-01 20:40:25 +02:00
Rajani Karuturi
c14aa40a47 CLOUDSTACK-8950 Hypervisor Parameter check is not performed for
registerTemplate and getUploadParamsForTemplate API's

Any string is allowed as hypervisor type from the api.
HypervisorType.getType() tries to validate with the enums and if nothing
matches, sets the type as None.

Added a check to not allow None hypervisor type when registering.

(cherry picked from commit cc06c5189a377fc6bc4b7e8bbed56e9058588863)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-01 20:40:25 +02:00
Anshul Gangwar
120ac33d7a CLOUDSTACK-9682: Block VM migration to a storage which is in maintainenece mode. If
the destination pool is in maintenance mode do not allow a volume to be migrated to
the storage pool. Fixed it for volume migration and vm migration with volume.

(cherry picked from commit 8ef94819dabfc7b027d638473e9454e9f73ac49d)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-01 20:40:25 +02:00
Jayapal
54bd8ee880 CLOUDSTACK-9724: Fixed missing additional public ip on tier network with cleanup
(cherry picked from commit ee726af53bb33c5205d481abc3ab78bd2653f1b6)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-01 20:40:25 +02:00