Commit Graph

1230 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
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 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 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 11abfb8766 tools/appliance: update Debian 7 iso URLs based on 615261
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-09-16 12:56:25 +05:30
Rohit Yadav a4f552d46d cloudstack: set next version to 4.5.3-SNAPSHOT
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-09-14 09:59:40 +05:30
Rohit Yadav 7385441807 Updating pom.xml version numbers for release 4.5.2
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-08-19 14:42:54 +05:30
Rohit Yadav cc63611cc2 tools: fix build_asf.sh release script to remove -SNAPSHOT from bunch of files
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-08-14 13:54:06 +05:30
Rohit Yadav 2ed9539c29 travis: don't force M2_HOME, let Travis use the bundled maven3
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #652
2015-08-04 01:13:37 +05:30
Rohit Yadav 2777caddbb appliance: bump systemvm template version to 4.5.2
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-01 12:45:52 +02:00
Rohit Yadav 20ce346f3a CLOUDSTACK-8457: SAML auth plugin improvements for production usage
* Move config options to SAML plugin
  This moves all configuration options from Config.java to SAML auth manager. This
  allows us to use the config framework.
* Make SAML2UserAuthenticator validate SAML token in httprequest
* Make logout API use ConfigKeys defined in saml auth manager
* Before doing SAML auth, cleanup local states and cookies
* Fix configurations in 4.5.1 to 4.5.2 upgrade path
* Fail if idp has no sso URL defined
* Add a default set of SAML SP cert for testing purposes
  Now to enable and use saml, one needs to do a deploydb-saml after doing a deploydb
* UI remembers login selections, IDP server

- CLOUDSTACK-8458:
    * On UI show dropdown list of discovered IdPs
    * Support SAML Federation, where there may be more than one IdP
        - New datastructure to hold metadata of SP or IdP
        - Recursive processing of IdP metadata
        - Fix login/logout APIs to get new interface and metadata data structure
        - Add org/contact information to metadata
        - Add new API: listIdps that returns list of all discovered IdPs
        - Refactor and cleanup code and tests

- CLOUDSTACK-8459:
    * Add HTTP-POST binding to SP metadata
    * Authn requests must use either HTTP POST/Artifact binding

- CLOUDSTACK-8461:
    * Use unspecified x509 cert as a fallback encryption/signing key
      In case a IDP's metadata does not clearly say if their certificates need to be
      used as signing or encryption and we don't find that, fallback to use the
      unspecified key itself.

- CLOUDSTACK-8462:
    * SAML Auth plugin should not do authorization
      This removes logic to create user if they don't exist. This strictly now
      assumes that users have been already created/imported/authorized by admins.
      As per SAML v2.0 spec section 4.1.2, the SP provider should create authn requests using
      either HTTP POST or HTTP Artifact binding to transfer the message through a
      user agent (browser in our case). The use of HTTP Redirect was one of the reasons
      why this plugin failed to work for some IdP servers that enforce this.
    * Add new User Source
      By reusing the source field, we can find if a user has been SAML enabled or not.
      The limitation is that, once say a user is imported by LDAP and then SAML
      enabled - they won't be able to use LDAP for authentication
    * UI should allow users to pass in domain they want to log into, though it is
      optional and needed only when a user has accounts across domains with same
      username and authorized IDP server
    * SAML users need to be authorized before they can authenticate
        - New column entity to track saml entity id for a user
        - Reusing source column to check if user is saml enabled or not
        - Add new source types, saml2 and saml2disabled
        - New table saml_token to solve the issue of multiple users across domains and
          to enforce security by tracking authn token and checking the samlresponse for
          the tokens
        - Implement API: authorizeSamlSso to enable/disable saml authentication for a
          user
        - Stubs to implement saml token flushing/expiry

- CLOUDSTACK-8463:
    * Use username attribute specified in global setting
      Use username attribute defined by admin from a global setting
      In case of encrypted assertion/attributes:
      - Decrypt them
      - Check signature if provided to check authenticity of message using IdP's
        public key and SP's private key
      - Loop through attributes to find the username

- CLOUDSTACK-8538:
    * Add new global config for SAML request sig algorithm

- CLOUDSTACK-8539:
    * Add metadata refresh timer task and token expiring
        - Fix domain path and save it to saml_tokens
        - Expire hour old saml tokens
        - Refresh metadata based on timer task
        - Fix unit tests

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

This closes #489
2015-06-29 12:25:02 +02:00
Rohit Yadav 5921c493c8 systemvmtemplate: Disable services that slow down boot
The console-setup service brings a nice font to the console, but why would we
want to use it. In most cases it takes a <10 seconds to set it up. When using
nested hypervising, I found this takes much longer time that causes tests to
time-out. I'd suggest turning off these services. They are not required for the
services the systemvm provides.

Manually picked from commit 95e7673
PR #254

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-18 23:17:09 +01:00
Rohit Yadav 8daa665fca systemvm64template: install libc6:i386
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-18 19:57:01 +02:00
Rohit Yadav 9e3c7d309a systemvmtemplate: update version and fix chmod issue
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-12 16:47:59 +02:00
Rohit Yadav 034b986595 systemvmtemplate: use ovftool for building vmware template if available
This commit fixes a chmod issue where extracted vmdk file is not readable by all
users/groups. The other improvement is to use ovftool to build systemvm template
for vmware if it's available. This is based on a dev ML discussion and a suggested
approach by Ilya: http://markmail.org/message/kntsetgxdbppfh22

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-12 16:34:01 +02:00
Milamber 815f4d087a Update L10N resource files on 4.5 branch (with 4.5 translation strings from Transifex) Add new HU resource file for Hungarian translation 2015-05-09 07:58:11 +02:00
Laszlo Hornyak ed7704620e Added hu to the language list
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #237
2015-05-08 17:26:36 +02:00
Rohit Yadav 8b18ab3ff2 Fix version to 4.5.2-SNAPSHOT throughout the source
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-08 11:35:59 +02:00
Rohit Yadav 0963432268 apidoc: get version information from $project.version
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-08 11:35:34 +02:00
Rohit Yadav d0d08e68e9 tools: fix build
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-08 11:11:10 +02:00
Rohit Yadav 4ba72a877c Updating pom.xml version numbers for release 4.5.2-SNAPSHOT
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-07 15:33:01 +02:00
Rohit Yadav 11b7b0a3c3 Merge branch 'GA-4.5.1' into 4.5 2015-05-07 15:27:45 +02:00
Abhinandan Prateek e1a212842a CLOUDSTACK-8429: optimizing travis to run configurable set of tests only after configurable runs 2015-05-06 08:49:16 +05:30
Rohit Yadav 0eb4eb2370 Updating pom.xml version numbers for release 4.5.1
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-04 12:17:03 +02:00
Abhinandan Prateek fb0bfd5d4f CLOUDSTACK-8429: disabling unit test for faster build 2015-05-01 12:35:03 +05:30
Rohit Yadav a4120b24e4 systemvmtemplate: 7.8.0 iso is archived now, use link from archives
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-29 17:14:11 +02:00
Rohit Yadav bf3a0d6085 appliance: remove 32bit systemvmtemplate definition
Starting 4.5, we won't be using 32bit systemvmtemplate. Removing dead code as
it's already far behind in terms of maintenance compared to the 64bit definitions.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-10 15:35:18 +05:30
Rohit Yadav 5d458e8fb7 systemvmtemplate: fix guest driver/tool installation
- VMWare tools not needed since we're install open-vm-tools also recommended by VMWare:
    http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2073803

- Installing XStools 6.5

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-10 15:34:57 +05:30
Rohit Yadav be26b9189c systemvmtemplate: set systemvm version to 4.5.1
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-10 13:24:34 +05:30
Rohit Yadav 0fff19a76f systemvmtemplate: increase /opt partition by 100MB
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-03 10:48:19 +05:30
Rohit Yadav fe6c009399 zerodisk: zeroout /var/log and cleanup
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-30 15:42:11 +05:30
Rohit Yadav 9080ed6efc systemvmtemplate: only extract systemvm directory from src snapshot
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-30 14:29:38 +05:30
Rohit Yadav 03ff244ff1 systemvmtemplate: increase disk size to 3000
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-30 13:56:41 +05:30
Rohit Yadav 77ed0c4b96 systemvm64template: use separate partition for /var/log
/var/log fills up /var and fails operation of normal services. This fix
restricts /var/log to 100-200M. The fix for CLOUDSTACK-6885 tries to make sure
we don't keep a lot of logs.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-30 13:49:15 +05:30
Rohit Yadav 666f752875 appliance: remove raw.img before export a new one
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-25 17:25:50 +05:30
Rohit Yadav a80522acf2 systemvm: fix/improve irqbalance on multicore VR
Porting changes from PR: https://github.com/apache/cloudstack/pull/119
to new codebase used for systemvmtemplate generation.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-23 14:23:46 +05:30
Rohit Yadav d22dd01cb8 appliance: after building systemvm template save the md5 checksums
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-20 15:18:30 +05:30
Rohit Yadav c198dfdb7a Update pom and version usage to 4.5.1-SNAPSHOT
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-12 12:13:18 +05:30
Rohit Yadav 7d2ffe063d systemvms: use Debian http redirector for apt repos
Picked in parts from https://github.com/apache/cloudstack/pull/103/files

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-11 13:22:09 +05:30
Abhinandan Prateek 519488fcdc fixing misleading comment 2015-03-09 00:20:28 -04:00
Pierre-Luc Dion c234751069 apidoc: back button and devdoc link update 2015-02-07 16:18:26 -05:00
Pierre-Luc Dion a8ed45b64b apidoc: license date change to 2015 2015-02-07 16:13:27 -05:00
Rohit Yadav 8be969124c appliance: fix typo in git repo script tarball url
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-06 23:54:22 +05:30
Rohit Yadav bb14a6553d appliance: make room for /var fix systemvm build
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-06 23:39:31 +05:30