Commit Graph

998 Commits

Author SHA1 Message Date
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 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
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 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 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 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
Rohit Yadav 9d8b1fd7e5 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-03 23:00:46 +05:30
Rohit Yadav f30c52a16c CLOUDSTACK-8562: DB-Backed Dynamic Role Based API Access Checker
This feature allows root administrators to define new roles and associate API
permissions to them.

A limited form of role-based access control for the CloudStack management server
API is provided through a properties file, commands.properties, embedded in the
WAR distribution. Therefore, customizing API permissions requires unpacking the
distribution and modifying this file consistently on all servers. The old system
also does not permit the specification of additional roles.

FS:
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Dynamic+Role+Based+API+Access+Checker+for+CloudStack

DB-Backed Dynamic Role Based API Access Checker for CloudStack brings following
changes, features and use-cases:
- Moves the API access definitions from commands.properties to the mgmt server DB
- Allows defining custom roles (such as a read-only ROOT admin) beyond the
  current set of four (4) roles
- All roles will resolve to one of the four known roles types (Admin, Resource
  Admin, Domain Admin and User) which maintains this association by requiring
  all new defined roles to specify a role type.
- Allows changes to roles and API permissions per role at runtime including additions or
  removal of roles and/or modifications of permissions, without the need
  of restarting management server(s)

Upgrade/installation notes:
- The feature will be enabled by default for new installations, existing
  deployments will continue to use the older static role based api access checker
  with an option to enable this feature
- During fresh installation or upgrade, the upgrade paths will add four default
  roles based on the four default role types
- For ease of migration, at the time of upgrade commands.properties will be used
  to add existing set of permissions to the default roles. cloud.account
  will have a new role_id column which will be populated based on default roles
  as well

Dynamic-roles migration tool: scripts/util/migrate-dynamicroles.py
- Allows admins to migrate to the dynamic role based checker at a future date
- Performs a harder one-way migrate and update
- Migrates rules from existing commands.properties file into db and deprecates it
- Enables an internal hidden switch to enable dynamic role based checker feature

Deprecate commands.properties

- Fixes apidocs and marvin to be independent of commands.properties usage
- Removes bundling of commands.properties in deb/rpm packaging
- Removes file references across codebase

Reviewed-by: John Burwell <john.burwell@shapeblue.com>
QA-by: Boris Stoyanov <boris.stoyanov@shapeblue.com>

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-04-25 14:52:02 +05:30
Abhinandan Prateek 894fb5424e CLOUDSTACK-9350: KVM-HA- Fix CheckOnHost for Local storage
- Also skip HA on VMs that are using local storage
2016-04-25 13:22:25 +05:30
Rohit Yadav 17366f2b18 CLOUDSTACK-8301: Enable configuring local storage use for system VMs at zone level
Backported from #263 for 4.5 branch, original bugfix by @koushik-das et al

More information on:
https://issues.apache.org/jira/browse/CLOUDSTACK-8301
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Enable+configuring+local+storage+use+for+system+VMs+at+zone+level

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #661
2015-08-08 22:41:52 +05:30
Abhinandan Prateek fb0bfd5d4f CLOUDSTACK-8429: disabling unit test for faster build 2015-05-01 12:35:03 +05:30
Rohit Yadav 888f67f0bd systemvm: fix socat usage
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-30 13:49:15 +05:30
Gaurav Aradhye 9658569f5a CLOUDSTACK-8124: Skipping snapshot tests on Hyper-V
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
2015-02-05 17:36:11 +05:30
Gaurav Aradhye 762727439b CLOUDSTACK-8124: Skipping snapshot tests on hyperv hypervisor
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
2015-02-05 17:35:36 +05:30
Gaurav Aradhye 2db5ee3c0a CLOUDSTACK-8152: Adding delay before creating snapshot/template from root disk after writing data to disk - test_vm_passwordenabled.py 2015-01-22 16:50:57 +05:30
Chandan Purushothama 78dea8725b CLOUDSTACK-8007: Fixed the script 'test_vm_passwdenabled.py' - Template created by Admin should have public access to be used for regular User VM Deployment
Conflicts:
	test/integration/component/test_vm_passwdenabled.py
2015-01-22 16:45:50 +05:30
Gaurav Aradhye d37c1589be CLOUDSTACK-8170: Skipping tests on HyperV which try to scale VM in running state because feature not supported 2015-01-22 16:38:52 +05:30
Gaurav Aradhye c996c8e31a CLOUDSTACK-8174: Fixed cleanup issue in test_add_remove_network.py 2015-01-22 14:27:04 +05:30
Chandan Purushothama b5ef7de290 CLOUDSTACK-7955: Fixed the script test_project_limits.py - Register Template in the Project to test the Template limits on the project
(cherry picked from commit 71bb436c8d)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-20 11:30:59 +05:30
Chandan Purushothama d1d288522d CLOUDSTACK-7956: Fixed the script 'test_project_usage.py' - Register Template in the Project to test the Template limits on the project
(cherry picked from commit 3a6f248e3a)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-20 11:30:49 +05:30
Chandan Purushothama 1b7a100688 CLOUDSTACK-7996: Fixed the script test_tags.py - Tags and Template should belong to the User Account to test the case
(cherry picked from commit b0d74ad6fc)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-20 10:29:41 +05:30
Chandan Purushothama 535c037428 CLOUDSTACK-8007: Fixed the script 'test_vm_passwdenabled.py' - Template created by Admin should have public access to be used for regular User VM Deployment
(cherry picked from commit 41b871b6bd)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	test/integration/component/test_vm_passwdenabled.py
2015-01-20 10:28:57 +05:30
SrikanteswaraRao Talluri cc31571307 bug-id:CLOUDSTACK-8055cleaned up test tags, removed unecessary tags.
reviewed-by: SrikanteswaraRao Talluri <talluri@apache.org>

Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
(cherry picked from commit b6bac7f673)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-20 10:23:15 +05:30
Ashutosh K 345fd54fc1 CLOUDSTACK-8130: Fixed test_escalations_templates.py - Removed test case dependency on each other
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
(cherry picked from commit 17da2e9ce9)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-20 10:18:39 +05:30
Ashutosh K 9a75a0cd22 CLOUDSTACK-8132: Fixed issue related to secondary storage count of template
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
(cherry picked from commit f938a5e1c3)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-20 10:18:24 +05:30
Gaurav Aradhye fc502a97c2 CLOUDSTACK-8152: Adding delay before creating snapshot/template from root disk after writing data to disk - test_vm_passwordenabled.py
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
(cherry picked from commit d79837b67a)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	test/integration/component/test_vm_passwdenabled.py
2015-01-20 10:16:26 +05:30
SrikanteswaraRao Talluri 2c515395d7 CLOUDSTACK-8161: mark the data volume related operations on LXC as skipped if RBD storage pool is not available
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
2015-01-16 18:45:19 +05:30
Ashutosh K 2ed76b2a55 CLOUDSTACK-8143: Corrected a test in BVT test_routers.py 2015-01-13 16:43:01 +05:30
K@clogeny.com 17e1922439 CLOUDSTACK-8137: Fixed cleanup issue in sec group tests in test_escalations_instances.py
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
2015-01-13 15:49:23 +05:30
Ashutosh K 613aa8ea28 CLOUDSTACK-8135: Fixed cleanup issue in test_escalations_instances.py
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
2015-01-13 15:47:57 +05:30
Ashutosh K b8184d1e74 CLOUDSTACK-8149: Code-refactor - test_VirtualRouter_alerts.py
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
2015-01-13 15:22:22 +05:30
Ashutosh K 032a003905 CLOUDSTACK-8147: Fixed typo in test case test_redundant_router.py
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
2015-01-13 15:22:15 +05:30
Gaurav Aradhye 9278ac1130 CLOUDSTACK-8145: Adding new test to test blocker bugs and modifying other test case to work around the bug
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
2015-01-13 15:22:06 +05:30
Gaurav Aradhye 94237a4c5b CLOUDSTACK-8116: Moved ldap data to configurableData section in test_data.py and made related changes in the test case
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
2014-12-24 10:38:05 +05:30
Gaurav Aradhye 239150c558 CLOUDSTACK-8117: Increase the allowed margin (+/-) for memory of VM on hyperv used to equate with the memory specified in service offering
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
2014-12-24 10:36:33 +05:30
Ashutosh K 5a6eb3b6e1 CLOUDSTACK-8099: Fixed missing import in test_dynamic_compute_offering.py
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
2014-12-23 15:05:23 +05:30
Chandan Purushothama ddcbfb43bc CLOUDSTACK-7788: Fixed the script 'test_dynamic_compute_offering.py' to be run only on hardware 2014-12-23 15:05:14 +05:30
Gaurav Aradhye 125c1c27fc CLOUDSTACK-8098: Fixed VM snapshot issue in smoke/test_vm_snapshots.py
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
2014-12-23 14:59:55 +05:30
SrikanteswaraRao Talluri f18e00abf1 Revert "CLOUDSTACK-7762 -[Automation] - Fix test failure for test_02_revert_vm_snapshots in smoke/test_vm_snapshots.py"
This reverts commit f510ef995b.
2014-12-23 14:59:46 +05:30
Gaurav Aradhye 1413efcac3 CLOUDSTACK-8096: Fixed test_ssvm.py for issues while checking the result of diagnostic scripts
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
2014-12-23 14:24:32 +05:30
Chandan Purushothama ab3af7b014 CLOUDSTACK-7769 - Fixed test_ssvm.py script 2014-12-23 14:23:49 +05:30
Sangeetha Hariharan 3736d9435a CLOUDSTACK-7762 -[Automation] - Fix test failure for test_02_revert_vm_snapshots in smoke/test_vm_snapshots.py 2014-12-22 13:55:07 +05:30
Gaurav Aradhye 588e7dc811 CLOUDSTACK-8100: Fixed pep8 issues in test_vpc.py
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
2014-12-22 13:53:10 +05:30
Ashutosh K a2fa2e4911 CLOUDSTACK-8095: Fixed Iso attach issue in test_escalations_instances.py
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
2014-12-22 13:53:01 +05:30
Ashutosh K 6c722c9d21 CLOUDSTACK-8087: Fixed test_vpc_on_host_maintenance.py
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
2014-12-19 10:36:14 +05:30
Gaurav Aradhye 0db63d87aa CLOUDSTACK-8084: Fixed test_17_add_nic_different_zone in test_add_remove_network.py
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
2014-12-19 10:36:02 +05:30