Commit Graph

25614 Commits

Author SHA1 Message Date
Rohit Yadav f89d06b0f6 Merge pull request #34 from shapeblue/fr19-oobm-plugin-cloudstack
APPLE-333: Oobm plugin for nested-cloudstack environments
2017-04-21 12:26:19 +05:30
Rohit Yadav 8f3cd943b1 APPLE-333: Oobm plugin for nested-cloudstack environments
This implements an out-of-band management plugin for nested-cloudstack
environments where the hypervisor host is a VM in a parent CloudStack environment
that is used as a host in the (testing) CloudStack environment. This plugin
allows power operations to translate into start/stop/reboot of the VM (host).

The out-of-band management configuration accepted are:
- Address: The API URL of the parent CloudStack enviroment
- Port: The uuid of the (host) VM in the parent CloudStack environment
- Username: The apikey of the user account who has ownership on the (host) VM
- Password: The secretkey of the user account who has ownership on the (host) VM

Note: change password of the oobm interface is not support by this plugin

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-04-19 16:58:38 +05:30
Abhinandan Prateek 8f7428837e Merge pull request #33 from shapeblue/fr17
FR17: type conversion fix
2017-03-30 12:40:49 +05:30
Abhinandan Prateek b1c35af8c2 FR17: Metrics fix 2017-03-30 11:59:35 +05:30
Abhinandan Prateek 9b181dbf19 Merge pull request #32 from shapeblue/cw1261
CW1261: Do not reset connection for user managed connections
2017-03-29 22:54:57 +05:30
Abhinandan Prateek 6cab0308d7 Merge pull request #31 from shapeblue/fr17
FR17: list vm physical size, virtual size and utilisation in listvolume API
2017-03-29 16:29:47 +05:30
Abhinandan Prateek 4991d165f3 FR-17: KVM, Xen and VMware support + UI with Marvin test 2017-03-27 09:53:40 +05:30
Abhinandan Prateek b3f6d9136e CW1261: Do not reset connection for user managed connections 2017-03-24 12:42:41 +05:30
Rohit Yadav 40f2f6ff45 Merge pull request #29 from shapeblue/metrics-apis-4.5
APPLE-328: Metrics View APIs
2017-02-16 13:53:27 +05:30
Rohit Yadav a00cb07ee0 APPLE-328: Metrics View APIs
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-02-16 13:20:30 +05:30
Rohit Yadav ad19e00d13 Merge pull request #13 from shapeblue/host-ha-4.5
APPLE-165: Host HA and KVM provider
2017-01-18 18:25:05 +05:30
Rohit Yadav 876fc7434d APPLE-165: Host HA management and HA provider for KVM
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: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-01-18 18:18:53 +05:30
Rohit Yadav 2b4cdd6580 Merge pull request #26 from shapeblue/oobm-ui-password-fix
APPLE-320: Bypass password validation for oobm
2016-12-10 01:34:21 +05:30
Rohit Yadav ac70308d9a Merge pull request #23 from shapeblue/apple-313-cw1078-kvmreboot
APPLE-313: Fixes for CW1078
2016-12-10 01:34:08 +05:30
Rohit Yadav e52038ba9e APPLE-313: Fix memory leak in VmwareContextPool
- Fixes synchronization issue
- Uses ConcurrentLinkedQueue

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-23 13:28:16 +05:30
Rohit Yadav 33f8d48e78 APPLE-320: Bypass password validation for oobm
Allows special character, otherwise not allowed for password fields
throughout cloudstack UI.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-21 19:00:22 +05:30
Abhinandan Prateek 635aa20058 CLOUDSTACK-9460: For long running transactions, if the connection is
timed out by the mysql server then refresh it
2016-11-21 15:09:50 +05:30
Abhinandan Prateek 066057d7c4 CLOUDSTACK-9571: fence gracefully using clustermanger's notifyNodeIsolated 2016-11-21 15:09:50 +05:30
Abhinandan Prateek 6fdd19fa7e CLOUDSTACK-9571: Fence DB if there are consecutive connection errors. 2016-11-21 15:09:50 +05:30
Rohit Yadav eecd3fb349 APPLE-313: Ulimit fixes for cloudstack-{agent, management}
Increases/sets ulimit for cloudstack agent and management. This would fix
any issues with opening more files than permissible limit (usually 1024-4096).

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-08 16:20:04 +05:30
Rohit Yadav 6d79c7c5b7 Merge pull request #24 from shapeblue/cve-2016-6813
CLOUDSTACK-9544: Check access on account trying to generate user API keys
2016-10-27 21:55:16 +05:30
Marc-Aurèle Brothier ce02814901 CLOUDSTACK-9544: Check access on account trying to generate user API keys
This fixes CVE-2016-6813

Signed-off-by: Marc-Aurèle Brothier <m@brothier.org>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-10-27 15:59:39 +05:30
Rohit Yadav 6f89892274 Merge pull request #22 from shapeblue/apple-base-9551
CLOUDSTACK-9551: Move java tmp dir to cloudstack-agent's path to avoid
2016-10-25 11:18:44 +05:30
Rohit Yadav 25cdb44c65 Merge pull request #21 from shapeblue/metrics-view-context-based-filtering
APPLE-309: Use context to filter items in a metrics view
2016-10-25 10:43:34 +05:30
Rohit Yadav 0841471cef Merge pull request #20 from shapeblue/roles-usage-fix
APPLE-274: Add role_id to cloud_usage.account
2016-10-25 10:42:00 +05:30
Rohit Yadav 860267fee0 Merge pull request #19 from shapeblue/kvm-host-without-storage
APPLE-272: Host Connects Without Storage
2016-10-25 10:41:42 +05:30
Abhinandan Prateek aa093659aa CLOUDSTACK-9551: Move java tmp dir to cloudstack-agent's path to avoid
noexec on /tmp
2016-10-20 12:25:21 +05:30
Rohit Yadav a5d6b55eb4 APPLE-309: Use context to filter items in a metrics view
Use available context to filter a metrics view based on zone, cluster, host
in the context object. This fixes metrics view filtering when metrics view is
viewed via Zone->Compute and Storage-> for a resource.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-10-19 11:41:08 +05:30
Rohit Yadav 1c3afb8279 APPLE-274: Add role_id to cloud_usage.account
Fixes usage server blocker which fails to work due to missing role_id
column in cloud_usage.account table.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-06-08 11:41:42 +09:00
Rohit Yadav a4848c1435 APPLE-272: Host Connects Without Storage
KVM hosts on shared storage failure was accepted by mgmt server with the
host state as Up, even though there was no primary/shared storage available on
it. This patch offers a quick fix by throwing an exception in the storage monitor
which connects storage pool on host. The failure is trapped by agent manager
that disconnects the agent without any investigation.

Based on Lab tests, KVM agent may take upto 2 minutes to attempt NFS mount when
the storage is inaccessible (firewalled, or shutdown) before returning back with
an error. It is safe to assume that this won't add pressure on mgmt server due to
several reconnection attempts, and KVM agent would retry reconnection every 2
minutes.

For such KVM hosts, where failure happens due to storage issues; they will be
briefly put in Alert state but will be mostly be in Connecting state during which
the KVM host attempts to mount/reconfigure NFS storage pool.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-06-08 09:19:57 +09:00
Rohit Yadav 033f87deda CLOUDSTACK-9348: Make NioConnection selector blocking by timeout
Uses timeout based selector blocking. This makes connection handling
aggressive safely.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-05-19 16:17:28 +05:30
Rohit Yadav c8e0fc74ae dynamic-roles: remove order by ID
Removes order by id which is not necessary as we already do order by
sort_order. An additional order by seems to have caused mysql errors
in some environment, though it was not reproducible with MySQL 5.5/5.6/5.7
but this can be safely removed as it's not necessary.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-05-19 11:15:36 +05:30
Rohit Yadav 5415c06f30 packaging: backup commands.properties when upgrade to dynamic-roles
In case of rpms, the commands.properties file is bundled at
/usr/share/cloudstack-management/webapps/client/WEB-INF/classes/commands.properties

In case of a rpm upgrade, new rpms won't ship with commands.properties file. For
existing installations this copies the commands.properties file to
/etc/cloudstack/management

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-05-19 11:14:29 +05:30
Rohit Yadav f12254ef92 Merge pull request #18 from shapeblue/nio-fix-cpu
utils: Fix NioConnection aggressive usage
2016-05-16 08:51:14 +05:30
Rohit Yadav e35e7e4441 utils: Fix NioConnection aggressive usage
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-05-16 08:49:46 +05:30
Rohit Yadav 0a6f930a31 Merge pull request #17 from shapeblue/outofbandmanagement-4.5
CLOUDSTACK-9299: Sync changes from upstream oobm PR
2016-05-13 08:36:29 +05:30
Rohit Yadav 0b6f314f6e CLOUDSTACK-9299: Sync changes from upstream oobm PR
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-05-12 11:44:30 +05:30
John Burwell 328dbebd96 Merge pull request #8 from shapeblue/cancel-maint
CLOUDSTACK-9323:  Cancelling maintenance when prepare for maintenance…
2016-05-10 08:55:58 -04:00
Rohit Yadav 067022edd3 Merge pull request #16 from shapeblue/outofbandmanagement-4.5
CLOUDSTACK-9299: Incorporate out-of-band management PR changes
2016-05-10 14:24:45 +05:30
Rohit Yadav bb0282dfa1 CLOUDSTACK-9299: Incorporate out-of-band management PR changes
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-05-10 14:12:10 +05:30
Rohit Yadav 0f8d63989f Merge pull request #6 from shapeblue/outofbandmanagement-4.5
oobm: Out-of-band Management support in CloudStack
2016-05-10 13:17:49 +05:30
Rohit Yadav a5de2714e9 CLOUDSTACK-9299: Out-of-band Management for CloudStack
Support access to a host’s out-of-band management interface (e.g. IPMI, iLO,
DRAC, etc.) to manage host power operations (on/off etc.) and querying current
power state in CloudStack.

Given the wide range of out-of-band management interfaces such as iLO and iDRA,
the service implementation allows for development of separate drivers as plugins.
This feature comes with a ipmitool based driver that uses the
ipmitool (http://linux.die.net/man/1/ipmitool) to communicate with any
out-of-band management interface that support IPMI 2.0.

This feature allows following common use-cases:
- Restarting stalled/failed hosts
- Powering off under-utilised hosts
- Powering on hosts for provisioning or to increase capacity
- Allowing system administrators to see the current power state of the host

For testing this feature `ipmisim` can be used:
https://pypi.python.org/pypi/ipmisim

FS:
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Out-of-band+Management+for+CloudStack

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-05-10 13:16:03 +05:30
Rohit Yadav 7ba881b152 Merge pull request #15 from shapeblue/dynamicrbac-4.5
CLOUDSTACK-8562: Make role permissions orderable
2016-05-09 11:02:32 +05:30
Rohit Yadav 6f1e834753 CLOUDSTACK-8562: Make role permissions orderable
- Makes role permissions orderable in UI/backend
- Role permissions evaluated by fixed order
- Rules draggable in UI
- Migration script adds a default order

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-05-09 10:53:45 +05:30
Abhinandan Prateek e37856627e CLOUDSTACK-9323: Cancelling maintenance when prepare for maintenance is not yet complete throws exception as VMs are still in migration. There is no point in throwing exception, instead cancel all the pending migration tasks and then cancel maintance. The current migration will complete as normal migration jobs. 2016-05-07 09:41:45 +05:30
John Burwell 50355907a3 Merge pull request #14 from shapeblue/dynamicrbac-4.5
Make role permissions orderable
2016-05-06 13:09:40 -04:00
John Burwell 97089e1b9d Merge pull request #10 from shapeblue/kvm-ha
CLOUDSTACK-9350: KVM-HA- Fix CheckOnHost for Local storage
2016-05-06 13:04:35 -04:00
John Burwell fe03b91bb8 Merge pull request #11 from shapeblue/nio-fix-4.5
CLOUDSTACK-9348: Use non-blocking SSL handshake
2016-05-06 12:57:37 -04:00
Rohit Yadav ff2729d411 CLOUDSTACK-9348: Optimize NioTest and NioConnection main loop
- Reduces SSL handshake timeout to 15s, previously this was only 10s in
  commit debfcdef78
- Adds an aggresive explicit wakeup to save the Nio main IO loop/handler from
  getting blocked
- Fix NioTest to fail/succeed in about 60s, previously this was 300s
- Due to aggresive wakeup usage, NioTest should complete in less than 5s on most
  systems. On virtualized environment this may slightly increase due to thread,
  CPU burst/scheduling delays.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-05-06 10:15:00 +05:30
Rohit Yadav e51f524039 CLOUDSTACK-9348: Use non-blocking SSL handshake
- Uses non-blocking SSL handshake and non-blocking connections
- Uses 60s as timeout for both client/server to guard against indefinitely
  blocking clients
- Unit test to prove fix, client and malicious clients trying to connect to server

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-05-06 10:07:47 +05:30