3550 Commits

Author SHA1 Message Date
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
d1e61eb3ff CLOUDSTACK-9812: Update 'updatePortForwardingRule' api to include additional parameter end port (#1985)
Configure a PF rule Private port : Start port ; 20 ENd POrt 25 || Public Port : Start port 20 ; ENd Port : 25.
Trigger UpdatePortForwardingRule api
ApI fails with following error : " Unable to update the private port of port forwarding rule as the rule has port range "

Solution-
Port range gets modified
2017-08-31 09:44:51 +02:00
Boris Stoyanov
f917ab660e CLOUDSTACK-9782: Improve host HA tests
- All tests should pass on KVM, Simulator
- Add test cases covering FSM state transitions and actions

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-30 18:06:48 +02:00
Rohit Yadav
d2c3408da7 CLOUDSTACK-9782: Improve scheduling of jobs
- Removed three bg thread tasks, uses FSM event-trigger based scheduling
- On successful recovery, kicks VM HA
- Improves overall HA scheduling and task submission, lower DB access

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-30 18:06:48 +02:00
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
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
vedulasantosh
4b38d36284 CLOUDSTACK-9915 ListSnapshots API does not provide virtual size information of the snapshots (#2101) 2017-08-24 13:21:13 +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
Gabriel Beims Bräscher
f62a8d7a5b CLOUDSTACK-10022: Allow domain admin to create and delete subdomains (#2222) 2017-08-22 08:51:31 +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
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
pavanaravapalli
08a6c24efc CLOUDSTACK-9990 : Fix for Account name is giving null in event tab after successful creation of account (#2171) 2017-07-28 19:55:00 +02:00
Rohit Yadav
619da91386 Merge branch '4.10' 2017-07-28 11:28:20 +02:00
Rohit Yadav
e9f526e221 Merge branch '4.9' into 4.10
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-07-28 10:49:34 +02:00
Marc-Aurèle Brothier
28bc99565b CLOUDSTACK-9631: API: affinitygroupids or affinitygroupnames must be given (#1798)
Return an exception if both parameter are missing.
This fixes an NPE in AffinityGroupServiceImpl.updateVMAffinityGroups() when the list was null.

Signed-off-by: Marc-Aurèle Brothier <m@brothier.org>
2017-07-28 10:29:30 +02:00
Syed Mushtaq Ahmed
623ca0def2 CLOUDSTACK-10015: Return storage provider with response to list storage pools (#2200)
It would be useful if we return the provider name in the list storage pools response. This will be useful for example to identify different storages that are in use and their scope.
2017-07-27 23:14:11 +02:00
kishankavala
91f7012b01 Merge pull request #1959 from Accelerite/CLOUDSTACK-9786
CLOUDSTACK-9786:API reference guide entry for associateIpAddress needs additional information
2017-07-27 15:13:17 +05:30
Harika Punna
bef5c17baa CLOUDSTACK-9982: Introduce new response parameter: PhysicalSize in listTemplates API response 2017-07-24 09:28:25 +02:00
Bharat Kumar
d98520a6da CLOUDSTACK-9667 Enable resourcecount.check.interval by default 2017-07-24 09:26:17 +02:00
Nitesh Sarda
917666b19c CLOUDSTACK-9981 : Regression occurs after upgrading to 4.10 while registering a template. 2017-07-23 23:28:11 +02:00
Rene Moser
256c193e92 CLOUDSTACK-8873: add zonename in load balancer response 2017-07-23 23:16:23 +02:00
Wei Zhou
afbbb810f0 CLOUDSTACK-9405: add details parameter in listDomains API to reduce the execution time 2017-07-23 23:15:26 +02:00
Wei Zhou
960cb84083 CLOUDSTACK-7984: Collect network statistics for VMs on shared network (KVM implementation) 2017-07-23 17:15:23 +02:00
Wei Zhou
088cca2b28 CLOUDSTACK-9997: Add cpu cores information in CapacityResponse
This commit contains following changes
(1) add CPU CORE information in op_host_capacity
(2) add capacity name in the CapacityResponse
(3) add allocatedCapacity for CPU/MEMORY/CPU CORE for zones
(4) sort CapacityResponse by zonename and CapacityType
2017-07-22 11:26:37 +02:00
Rohit Yadav
3587bc4b54 Merge remote-tracking branch 'origin/4.10' 2017-07-22 11:09:23 +02:00
Rohit Yadav
ffddd6db09 Merge remote-tracking branch 'origin/4.9' into 4.10 2017-07-22 11:07:42 +02:00
Rohit Yadav
07fda3b395 CLOUDSTACK-9983: Hide credentials in listClusters response
This removes username and passwords details from the listClusters
response. The details are usually seen in VMware environments only.
With dynamic roles features, the listClusters API may be provided
to a read-only root-admin user role/type which should not be able to get
the credentials.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-07-22 10:50:35 +02:00
Nitin Kumar Maharana
e243a31e41 CLOUDSTACK-8672 : NCC Integration with CloudStack.
Improvements.
2017-07-20 12:42:43 +05:30
Nitin Kumar Maharana
b2b422c7d7 CLOUDSTACK-8672 : NCC Integration with CloudStack. 2017-07-20 12:42:43 +05:30
Priyank Parihar
b2f7f9abb6 CLOUDSTACK-8672 : NCC Integration with CloudStack. 2017-07-20 12:42:43 +05:30
Rajesh Battala
884606f77b CLOUDSTACK-8672 : NCC Integration with CloudStack. 2017-07-20 12:42:43 +05:30
Rohit Yadav
322e18a7b6 CLOUDSTACK-9928: Allow native CloudStack users to change password in UI
This allows native CloudStack users to change password in UI when LDAP
is enabled. Overall changes:
- A new usersource returned in the listUsers response
- Removed ldap check in the UI, replaced with check based on user source
- DB changes to include user.source in user_view
- Changed UI error message for non-native users trying to change password

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-07-14 14:55:08 +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
4f229d19ad Updating pom.xml version numbers for release 4.10.1.0-SNAPSHOT
Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>
2017-07-10 10:36:24 +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
Rohit Yadav
ed376fcad6 Merge remote-tracking branch 'origin/4.9'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-06-07 11:21:27 +05:30
Rajani Karuturi
ef7dabe635 Merge pull request #1866 from Accelerite/egresdcidr
Advanced isolated network egress destination cidr support added
2017-06-06 17:10:14 +05:30
Rajani Karuturi
9fd0965087 Merge pull request #2126 from Accelerite/CLOUDSTACK-9740
CLOUDSTACK-9740 : Search for secondary IP of NIC that is attached to an instance is not working
2017-06-06 16:29:45 +05:30
Rajani Karuturi
7b1b31dfa5 Merge pull request #1865 from anshul1886/CLOUDSTACK-9705
CLOUDSTACK-9705: Unauthenticated API allows Admin password reset
2017-06-06 15:56:41 +05:30
Jayapal
065fa1c849 CLOUDSTACK-9669:Advaced zone isolated network egress destination cidr support
CLOUDSTACK-9669:egress destination cidr VR python script changes
    CLOUDSTACK-9669:egress destination API and orchestration changes
    CLOUDSTACK-9669: Added the ipset package in systemvm template
    CLOUDSTACK-9669:Added licence header for new files
    CLOUDSTACK-9669: replacing 0.0.0.0/0 with the network cidr

     ipset member add with 0.0.0.0/0 fails. So 0.0.0.0/0 replaced with the network cidr.
     In source cidr 0.0.0.0/0 is nothing but network cidr.
     updated the default egress all cidr with network cidr
2017-06-06 15:51:00 +05:30
Rajani Karuturi
278514f623 Merge pull request #1900 from anshul1886/CLOUDSTACK-8862
CLOUDSTACK-8862: Introduced new state attaching for volume. This will…
2017-06-06 15:50:06 +05:30
Rajani Karuturi
68fcef3783 Merge pull request #2113 from Accelerite/vpnuser
CLOUDSTACK-9162: Handled vpn user add when vpn is not enabled on the…
2017-06-06 15:44:31 +05:30
Rajani Karuturi
7ee751e747 Merge pull request #1894 from Accelerite/CLOUDSTACK-9700
CLOUDSTACK-9700 Allow user to Register/Copy templates to multiple zones at the same time
2017-06-06 15:41:28 +05:30
Rajani Karuturi
68d50fbfd8 Merge pull request #1996 from Accelerite/secretkey
CLOUDSTACK-9099: SecretKey is returned from the APIs
2017-06-06 15:35:11 +05:30
Rajani Karuturi
f5d97fe556 Merge pull request #1987 from Accelerite/SubDomainIssue
CLOUDSTACK-9814 : Unable to edit a Sub domain, which has the same name in different domains
2017-06-05 13:26:19 +05:30
Nitesh Sarda
5eed75120b CLOUDSTACK-9740 : Search for secondary IP of NIC that is attached to an instance is not working 2017-05-31 15:42:51 +05:30
Jayapal
5d989f322c CLOUDSTACK-9162: Handled vpn user add when vpn is not enabled on the account 2017-05-29 15:32:04 +05:30