Commit Graph

687 Commits

Author SHA1 Message Date
Yassine Lamgarchal 35925e5d28 Add flag to make IsolatedHostsFilter less restrictive
This patch allows to run 'isolated' and 'non isolated'
images on isolated hosts by adding a flag
'restrict_isolated_hosts_to_isolated_images'.

If the flag is set to True then 'non isolated' images
can't be run on isolated hosts (same behaviour as the
current filter) otherwise they can be run on isolated
hosts.

DocImpact

blueprint improve-isolatedhostsfilter

Change-Id: I8c092caf32c05be88a547a7e8cb0530cc4925080
2013-08-21 10:36:33 +02:00
Joe Gordon f364e8ebe3 libvirt: sync get_available_resources and get_host_stats
get_available_resources is actually used by the scheduler while
get_host_stats was previously used, and is still used for host
capabilities.  This patch makes get_available_resources and
get_host_stats use the same logic to clean up the code. As part of
making them use the same logic, some of the unused data returned from
get_host_stats is changed to be what get_available_resources expects.
This is also in preparation for removing the periodic RPC fanout from
compute nodes to the scheduler.

This patch cleans up libvirt and fake drivers only.  This is not needed
for other virt backends as this is a cleanup only.  Further cleanup of
libvirt and other drivers will happen after get_host_stats isn't used
for the compute fanout to schedulers.

Because this makes a change to the fake driver, several api samples
needed to be changed as well. The fake driver is changed so the
test_virt_driver tests can continue to be used

Part of bp no-compute-fanout-to-scheduler

Change-Id: I1eec5c117a1cb0490e9f9c09e731909bc31698a9
2013-08-13 14:24:23 -07:00
Jenkins edb1347a94 Merge "Removed scheduler doc costs section" 2013-08-09 22:59:42 +00:00
Jenkins fd54b79f4c Merge "Fix formatting on scheduler documentation" 2013-08-09 22:59:20 +00:00
Dan Smith 68288b9cd2 Fix instance actions testing
Somehow, the instance actions API was different in three places:

1. The actual API from a running system
2. The regular unit tests
3. The api_samples tests

This fixes the fake_instance_actions module to look like the database
model (which was the root of the problem) as well as the api_samples
and regular unit tests to properly confirm the actual behavior I
validated manually against a running system. This looks like it
changes the external API, but in fact, it makes things match what
the external API actually is.

Change-Id: I0c8ddff3e0819a65667617083dfaa74f7317cc05
2013-08-07 08:11:08 -07:00
Alvaro Lopez Garcia 87d60617c7 Removed scheduler doc costs section
Since commit 820f43fc (Change-Id
Ie3e7611347c334c359dea98d759345b97c66c9c1)
costs are no longer used, so all references to them have been removed.

Change-Id: I6e02bc47643be9f9dfe9d2e42b2335626bf039e7
2013-07-31 13:13:17 +02:00
Alvaro Lopez Garcia 0646d3b088 Fix formatting on scheduler documentation
Change-Id: Ifac98bbd9931d9bf75f73d4263aa77867cf52522
2013-07-31 13:13:17 +02:00
Tom Fifield 166c669fe0 Update references with new Mailing List location
Yesterday, openstack@lists.launchpad.org was migrated with
all users to openstack@list.openstack.org.

This patch updates references to the old mailing list with the
new, to ensure that people encountering them don't accidentally
try and join the old list!

Change-Id: I76242f4f4f0c8c2418068ea709ab2f7aa4502fd5
2013-07-28 11:28:46 -07:00
Jenkins db8fb8f98d Merge "Remove the monkey patching of _ into the builtins" 2013-07-27 14:47:39 +00:00
Alex Gaynor cd9d8e45c6 Remove the monkey patching of _ into the builtins
Previous _ was monkey patched into builtins whenever
certain modules were imported. This removes that and
simply imports it when it is needed.

Change-Id: I0af2c6d8a230e94440d655d13cab9107ac20d13c
2013-07-26 07:31:17 -07:00
Nikola Dipanov 8c3475706d Servers API for the new BDM format
This patch makes the nova API aware and able to accept the new block
device mapping format introduced in
If30afdb59d4c4268b97d3d10270df2cc729a0c4c when booting an instance.

It does so by introducing a new extension into the v2 API. There is no
v3 extension as part of this patch because volume extension is going
away in v3 and thus this functionality can be part of the core servers
extension. This will be done in a subsequent patch.

The compute API create method will still convert these back to the
legacy format for the time being until the compute API will know how to
take advantage of the new format.

As this change adds the new API extension, marking it as DocImpact so
that the changes and the API data format can be documented.

blueprint: improve-block-device-handling
Change-Id: I2c1b63e41deca26f727fb9ed912a55494db9c76c
2013-07-26 12:33:01 +02:00
Jenkins f9b154fc97 Merge "Per-project-user-quotas for more granularity" 2013-07-26 03:54:52 +00:00
Vishvananda Ishaya 8f51b120b4 Add support for volume swap
Adds support for transparently swapping an attached volume with
another volume. Note that this overwrites all data on the new
volume with data from the old volume.

Implements blueprint volume-swap

Change-Id: Iaace71f46acd33cf1531d953d569c0b6d0bbe680
2013-07-24 15:09:39 -07:00
liyingjun 77b4012a02 Per-project-user-quotas for more granularity
Implements blueprint per-user-quotas.

Fixes bug 968175

Based on the original quotas structure.

NOTE:
quota_instances, quota_cores, quota_ram, quota_key_pairs and
quota_security_groups are supported per user.

Add CRUD methods for project user quotas API. DocImpact
 - Shows quotas for a user.
   GET v2/{tenant_id}/os-quota-sets/{tenant_id}?user_id={user_id}
 - Updates quotas for a user.
   POST v2/{tenant_id}/os-quota-sets/{tenant_id}?user_id={user_id}

Add commands for project user quotas management.
 - Show user quotas:
   nova-manage project quota --project <Project name> --user <User name>
 - Update/Create user quotas:
   nova-manage project quota --project <Project name> --user <User name>
   --key <key> --value <value>

Change-Id: I24af1f6bc439d5d740303c6fe176a9bffe754579
2013-07-24 12:23:32 +08:00
Jenkins 960b4f4245 Merge "Remove unused recreate-db options from run_test.sh" 2013-07-17 08:07:47 +00:00
Jenkins 536f37906d Merge "API for shelving" 2013-07-17 03:31:29 +00:00
Jenkins a572f60b4b Merge "Support scoped keys in aggregate extra specs filter" 2013-07-17 02:17:54 +00:00
Andrew Laski e53fb7dcdd API for shelving
Adds new 'shelve', 'shelveOffload'/'shelve_offload'(V3), and 'unshelve'
actions to the API.  Exposes the functionality already provided in the
compute api.

Part of bp shelve-instance

Co-author: Dan Smith <danms@us.ibm.com> (Instance objects)
Change-Id: Idd485b591730c6ac025ee57a1242afdd02191b2f
2013-07-16 20:17:49 -04:00
Jay Lau 58e6bee529 Add a new GroupAffinityFilter
1) Add a new filter to schedule the instance on to host from a set
   of group hosts
2) Update filter_scheduler.rst to add the new GroupAffinityFilter
   filter description

Implements blueprint group-affinity-filter

DocImpact

Change-Id: Iba59764e692cd1d3bc80521ba5a4412f2bebb168
2013-07-16 17:31:35 -04:00
Russell Bryant fbedf60a43 Support scoped keys in aggregate extra specs filter
Update AggregateInstanceExtraSpecs to support scoped keys in flavor
extra_specs.  Otherwise, you can't use this filter in combination with
other filters that act on un-scoped extra specs, because they may
conflict.

This recently came up on the mailing list:

http://lists.openstack.org/pipermail/openstack-dev/2013-July/011421.html

Fix bug 1198290.

DocImpact - See updates to filter_scheduler.rst.

Change-Id: I03d1d3268c800dc6982ffa4b13f8b9489428b991
2013-07-16 12:02:09 -04:00
Joe Gordon 1d38a9241d Remove unused recreate-db options from run_test.sh
run_tests.sh had an option to delete tests.sqlite, but that file is not
used anymore so the run_test options don't do anything.

Change-Id: I1abb257579da34c9dd7698543d8297268276bbc5
2013-07-12 20:08:44 +01:00
Jenkins bbd681c2aa Merge "Fix formatting errors in documentation" 2013-07-12 16:30:41 +00:00
Jenkins 36b167e813 Merge "Remove doc references to distribute." 2013-07-12 01:39:05 +00:00
Oleg Bondarev e354a56933 Add "ExtendedVolumes" API extension
- adds an API extension to include list of attached volumes with instance info
- adds v3 api porting as well

DocImpact

Implements blueprint servers-add-volume-list
Change-Id: If58dc40b093c2f61c6ae6b82fcd8f0bf53be464a
2013-07-10 11:09:21 +04:00
Mahesh Panchaksharaiah 405ebb9028 List migrations through Admin API
The os-migrations extension exposes endpoint to fetch all migrations.
The migrations can filtered by host and status. If cells are
enabled migrations can be listed for all cells or can be filtered for a
particular cell.

The route for fetching migrations for
a region is - v2/{tenant_id}/os-migrations. Filters can be passed as
query parameters -
v2/{tenant_id}/os-migrations?host=host1&status=finished&cell_name=Child

DocImpact

Change-Id: Id70dbece344a722b2dc8c593dd340ef747eb43d3
Implements: blueprint list-resizes-through-admin-api
2013-07-09 11:25:35 +05:30
Doug Hellmann 42a02a1d73 Fix formatting errors in documentation
Fix a few rst formatting errors in the docs so
sphinx does not generate warnings.

Change-Id: I000d2ca3961678b47ead7a7885f3bc88ed7babc7
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
2013-07-06 13:18:11 -04:00
Doug Hellmann 47500553d9 Use oslo.sphinx and remove local copy of doc theme
Use the new oslo.sphinx version of the OpenStack doc
theme instead of copying it into this repo.

blueprint oslo.sphinx

Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Change-Id: I0bd91f7bb43f97b99051fed65b75fc05d5149cc8
2013-07-06 13:18:04 -04:00
Monty Taylor f0a2770342 Remove doc references to distribute.
Change-Id: I9ea56b6d765fa7214e4bcc0dbca877b411171eea
2013-07-05 22:26:06 -04:00
Jenkins a108871de6 Merge "Sane rest API rate limit defaults" 2013-07-04 07:42:56 +00:00
Jenkins 758cf7cc81 Merge "Add AggregateRamFilter" 2013-06-28 17:52:50 +00:00
Joe Gordon 827c2d30b8 Sane rest API rate limit defaults
The previous rate limit defaults were unusable in any deployment.
Rate limiting to 10 POSTS per minute and 50 servers per day seems
to low, especially when we can use quotas to actually limit the amount
of resources a user can consume.

Update docstring to explain what the rate limiting is used for.

Fixes bug 1178529

DocImpact changed default values

Change-Id: I8cc93423f76d9b0a5135adf69babc4ff355a0951
2013-06-27 16:00:58 -07:00
Qiu Yu c32a6d5ec3 Add AggregateCoreFilter
Implements blueprint per-aggregate-resource-ratio

* AggregateCoreFilter to support per-aggregate cpu_allocation_ratio
* Falls back to global setting if per-aggregate value not found

DocImpact

Change-Id: I9230f46e2490226f3c50d616aa173d4722095087
2013-06-21 22:09:29 +08:00
Qiu Yu f3a6de6a16 Add AggregateRamFilter
Implements blueprint per-aggregate-resource-ratio

* AggregateRamFilter to support per-aggregate ram_allocation_ratio
* Falls back to global setting if per-aggregate value not found

DocImpact

Change-Id: I93e069f0ac3f595d9a2a17119274c7bfbe8fca31
2013-06-21 21:58:21 +08:00
Jenkins 7b18e1433f Merge "Enhance the validation of the quotas update" 2013-06-14 17:25:41 +00:00
gengjh d5bbfad3d0 Enhance the validation of the quotas update
Need check whether the already used and reserved exceeds the new quota
before update it.

DocImpact
Implements a validation to validate whether already used and reserved
quota exceeds the new quota when run 'nova quota-update', it will throw
error if the quota exceeds. This check will be ignored if admin want to
force update when run 'nova quota-update' with additional option
'--force'.
This validation help admin to be aware of whether the quotas are
oversold when they try to update quota and also provide an option
'--force' to allow admin force update the quotas.

Fix bug 1160749

Change-Id: Iba3cee0f0d92cf2e6d64bc83830b0091992d1ee9
2013-06-13 15:36:08 +08:00
Jenkins 99f00ff09b Merge "add xml api sample tests to os-tenant-network" 2013-06-12 19:19:05 +00:00
Andrea Rosa c741e862fd Give a way to save why a service has been disabled.
Implements blueprint record-reason-for-disabling-service

We added a field to the service table to log a reason when a service has
been disabled.
We added a new API extension called os-extended-services. The new extension
will extend the os-services extension adding:
- A method for disabling a service and specify a reason for that.

PUT /v2/{tenant_id}/os-services/disable-log-reason

When the os-extended-extension is loaded the call:

GET /V2/{tenant_id}/os-services
will return the list of services with reason information it that exists.

DocImpact
Change-Id: I87a4affc45160796ff11c7b03e591e6aba73d62a
2013-06-12 11:27:25 +10:00
Jenkins 00d0e2c187 Merge "Return Customer's Quota Usage through Admin API" 2013-06-11 20:39:00 +00:00
Joe Gordon b7fe4e206b Rename functions in nova.compute.flavors from instance_type
Second step in removing references to instance_types. Remove all
references to instance_type in nova.compute.flavors.
Also update compute devref to reflect changed name.
Partially implements bp flavor-instance-type-dedup

renamed:  nova/tests/test_instance_types.py -> test_flavors.py

Change-Id: I7413bf832c61d04ab90ec8b1370d3f01372c4172
2013-06-11 10:36:39 -07:00
Kaushik Chandrashekar b27a6cb399 API to get the Cell Capacity
The total RAM and the available RAM are stored in memory of CellStateManager.
This API gets the available slots per flavor for a given cell.

Implements: blueprint get-cell-free-ram
Change-Id: I2a6dbb8835cad04f3ee058c3012490782d7c8e67
2013-06-05 12:52:55 -05:00
Jenkins 30db9308f1 Merge "Launch_at and terminated_at on server(s) response" 2013-06-05 02:12:47 +00:00
Andrew Melton f5d790df0a Launch_at and terminated_at on server(s) response
Implements bp usage-details-on-instance

Change-Id: I0a9101c43a51d597a1eaff9d5a5d08d602024e72
2013-05-31 15:50:40 -04:00
Monty Taylor e4decf693a Fixed two minor docs niggles.
The doc todo list didn't actually work, so remove it. Also, the
documentation is not written by Anso Labs quite so much anymore.

Change-Id: I746a26505d331ab55565e952a1a46425458b1412
2013-05-31 08:30:13 -04:00
Jenkins ff61b40f66 Merge "Delete a quota through admin api." 2013-05-28 14:11:29 +00:00
ivan-zhu 8534a03570 add xml api sample tests to os-tenant-network
Change-Id: Ib79defe49c82a175cb8605aa3a65ccd2c48d68f7
2013-05-24 13:40:41 +08:00
Aarti Kriplani cdd998c418 Delete a quota through admin api.
Added 'extended-quotas' extension that has provides ability for admins
to be able to delete a non-default quota (absolute limit) for a tenant,
so that tenant's quota will revert back to the configured default.

Implements blueprint admin-api-for-delete-quota
Change-Id: I7375420a466823b3e099aebff71a8f7d7f922afb
2013-05-23 16:25:29 +05:30
Ruby Loo 5740920bb3 Rename requires files to standard names.
Rename tools/pip-requires to requirements.txt and tools/test-requires
to test-requirements.txt. These are standard files, and tools in the
general world are growing intelligence about them.

Change-Id: I68ece8406fb1d4e082a42db8e76e17b1aaa7e775
Fixes: bug #1179008
2013-05-22 20:12:08 +00:00
Jenkins 6a172cb135 Merge "'m1.tiny' now has root_gb=1" 2013-05-20 18:08:41 +00:00
Boris Pavlovic 2dce8c92f6 Remove usage of locals() for formatting from nova.api.*
Using of locals() for formatting string is a nasty thing because:
1) It is not so clear as using explicit dicts
2) It could produce hidden errors during refactoring
3) Changing name of variable causes change in message
4) Creating a lot of unused variables

fixes bug 1171936
Change-Id: I293d7ebb875f65cce322d4938d1ae323f3aded8d
2013-05-18 00:04:17 +04:00
Mahesh K P 9f9c40d569 Return Customer's Quota Usage through Admin API
DocImpact: This patch adds an extension 'UsedLimitsForAdmin'. If this
extention is enabled then it extends the used limits API behavior, such
that admin can fetch the details of any customer's quota usage by passing
the customer's tenant id in query parameters.The API signature for the
same is 'v2/{tenant_id}/limits?tenant_id={customer_tenant_id}'

Change-Id: I89b8b5083e46b899458407426c89a3865e960faa
Implements: blueprint customer-quota-through-admin-api
2013-05-17 10:42:07 +05:30