Commit Graph

179 Commits

Author SHA1 Message Date
Russell Bryant 7168940296 Add a note about deprecated group filters
The deprecated group filters do not work if both are enabled at the
same time.  Add this in a note in the docs on the different scheduler
filters.

DocImpact
Related-bug: #1296913

Change-Id: Ic0e1b8b59c8a462e193dffb3b0f873d8aa35aa3c
2014-03-28 11:52:19 +00:00
Russell Bryant 2bca0c9011 Add new style instance group scheduler filters
Prior to Icehouse, there was a different type of handling of the
'group' scheduler hint that got lost in the completion of the server
groups API.  This patch completes the code necessary to provide
backwards compatibility with the old behavior.

Previously, the policy for groups was simply based on what scheduler
filters you had enabled.  You could have either the affinity or
anti-affinity filter enabled and that would be applied to all groups.
These filters now act on groups with a policy type of 'legacy'.

New filters have been added that can be enabled simultaneously and act
based on the policy set on the group via the server group API.

DocImpact

Change-Id: Ia65c151396415ca48725cb3c756f33efa01d2fe5
Closes-bug: #1296913
2014-03-27 21:54:02 +00:00
Pranav Salunke eb92d42536 Updated Setting up Developer Environment for Ubuntu
I saw that there are a few libraries which are required but not
mentioned in the docs.

Change-Id: I47036bb85c1b4c617f14d7534c204df474439513
2014-03-25 18:13:53 +05:30
Jenkins 999d9273f4 Merge "Add doc update for 4 filters which is missing in filter_scheduler.rst" 2014-03-21 16:51:33 +00:00
Jenkins 0b4c179fdd Merge "Noted that tox is the preferred unit tester." 2014-03-19 04:23:40 +00:00
Jenkins b9a9585875 Merge "Fix typo in devref" 2014-03-08 17:10:50 +00:00
Mike Spreitzer f2e06994a5 Noted that tox is the preferred unit tester.
This bug and fix is not about deleting run_tests.sh.
The change to delete run_tests.sh has been abandoned.
Thus the documentation of run_tests.sh remains.

Change-Id: Ia0a883260affc56c148dbebc5e3a49acb36b067e
Closes-Bug: #1282393
2014-03-08 02:47:38 -05:00
Dan Smith 226fd5080b Fix development environment docs for redhat-based systems
This adds the new libffi-devel dependency to the devref for new
development environment creation.

Change-Id: I63e0302cffe33b05722579e7d9c7122f2f257843
2014-03-05 16:12:11 -08:00
Sahid Orentino Ferdjaoui 5e5000b142 Fix typo in devref
s/differenet/different

Change-Id: I06bb0d9b0c5448ec5491372572e2b98dc3cea9be
2014-03-05 09:36:10 +00:00
jichenjc 35637ff218 Add doc update for 4 filters which is missing in filter_scheduler.rst
DiskFilter
NumInstancesFilter
IoOpsFilter
PciPassthroughFilter
are missing in doc/source/devref/filter_scheduler.rst, add them.

DocImpact

Change-Id: I50868598c9769783e1677c9ec50abf031896af82
Closes-Bug: #1276575
2014-03-05 04:42:54 +08:00
Jenkins 93f059b492 Merge "Introduce Guru Meditation Reports into Nova" 2014-03-01 02:39:11 +00:00
Solly Ross cec532848f Introduce Guru Meditation Reports into Nova
This commit integrates functionality from the
`openstack.common.report` module into Nova.
This enables Nova services to receive SIGUSR1
and print a Guru Meditation Report to stderr.
The required modules were added to
'openstack-common.conf' as well.

Change-Id: I224a426dad084f0e738069207ffbffe7f7935a17
Implements: blueprint guru-meditation-report
2014-02-24 19:24:41 -05:00
Russell Bryant e7e200907a Update ubuntu dev env instructions
I just set up an environment to run unit tests on Ubuntu and had to install a
couple of additional packages to make it work.  Update the instructions to
reflect that.

Change-Id: I2ceb1b130111991fa1b34b4636b8ece115e54084
2014-02-24 11:37:01 -05:00
Shane Wang 39870b603d Fix misspellings in nova
Fix misspellings detected by:
* pip install misspellings
* git ls-files | grep -v locale | misspellings -f -

Change-Id: I4e60889368b5e83275d59562613623c417a8e03f
Closes-Bug: #1257295
2014-02-07 13:09:24 +08:00
Jenkins 11fe6780e7 Merge "Define "supported_instances" for fake compute" 2014-01-30 15:48:09 +00:00
Cedric Brandily bdecc8d233 Define "supported_instances" for fake compute
Allow fake computes to deploy images with hypervisor_type
defined and set to "fake" and by extension to be used in
multi hypervisor_type deployments.
Mixing fake and "real" computes on the same OpenStack
deployment allows to create many fake instances and some
working instances for testing applications on top of
OpenStack (ie: fake instances for stress tests, working
ones for functional tests).

Closes-bug: #1260771
Change-Id: Idc337c4a7ed024f236ca2b60d91e2c30f7d54536
2014-01-24 21:08:29 +00:00
Lianhao Lu e8faf3a2a6 Added a new scheduler filter for metrics
The scheduler filter MetricsFilter filters out those hosts which don't
have the metrics data available as required by metric settings.

This is part of the blueprint utilization-aware-scheduling.

DocImpact: Added a new metrics filter.

Change-Id: Ib4a898774daf683c4496ef3e9953d23027f11ac0
2014-01-22 11:35:01 +08:00
Sahid Orentino Ferdjaoui 0ca6b81758 Aggregate: Hosts isolation based on image properties
Isolates hosts based on image properties and aggregate metadata
 - If a host doesn't belong to any aggregate it can create instances
   from all images.
 - if a host belongs to an aggregate and if this aggregate defines
   metadata that match with the image properties then the host
   is a candidate to boot the instance.

DocImpact
Change-Id: I3b9325e2e103f3bb6eed66789ac2c82941e94397
Implements: blueprint aggregate-host-isolation-based-image-properties
2013-12-31 15:06:09 +01:00
Jenkins d10796ce29 Merge "Enable remote debugging for nova" 2013-12-17 22:49:08 +00:00
Tracy Jones 2cbea24209 Enable remote debugging for nova
This patch added 2 command line parameters which are used to
connect to an external debugger such as pycharm or eclipse.
This feature is used when you want to connect to a nova
service via a debugger running on a different host.
To use it you start the nova service with  the following
command line parameters

--remote_debug-host <where the debugger is running>
--remote_debug-port <port> it's listening on>.

DocImpact
Closes-bug: #1251021
Change-Id: I6ede9bf0813eafbeb91d858c297d4c160aafceba
2013-12-16 09:36:33 -08:00
Alvaro Lopez Garcia e5ba849437 Normalize the weights instead of using raw values
The weight system is being used by the scheduler and the cells code.
Currently this system is using the raw values instead of normalizing them.
This makes difficult to properly use multipliers for establishing the
relative importance between two wheighers (one big magnitude could
shade a smaller one). This change introduces weight normalization so
that:

- From an operator point of view we can prioritize the weighers that
  we are applying. The only way to do this is being sure that all the
  weighers will give a value in a known range, so that it is
  not needed to artificially use a huge multiplier to prioritize a
  weigher.

- From a weigher developer point of view, somebody willing to implement
  one has to care about 1) returning a list of values, 2) setting the
  minimum and maximum values where the weights can range, if they are
  needed and they are significant for the weighing. For a weigher
  developer there are two use cases:

    Case 1: Use of a percentage instead of absolute values (for example, %
    of free RAM). If we compare two nodes focusing on the percentage of free
    ram, the maximum value for the weigher is 100. If we have two nodes one
    with 2048 total/1024 free, and the second one 1024 total/512 free they
    will get both the same weight, since they have the same % of free RAM
    (that is, the 50%).

    Case 2: Use of absolute values. In this case, the maximum of the weigher
    will be the maximum of the values in the list (in the case above, 1024)
    or the maximum value that the magnitude could take (in the case above,
    2048). How this maximum is set, is a decision of the developer. He may
    let the operator choose the behaviour of the weigher though.

- From the point of view of the scheduler we ensure that it is using
  normalized values, and not leveraging the normalization mechanism to the
  weighers.

Changes introduced this commit:

1) it introduces weight normalization so that we can apply multipliers
   easily. All the weights for an object will be normalized between 0.0 and
   1.0 before being sumed up, so that the final weight for a host will be:

    weight = w1_multiplier * norm(w1) + w2_multiplier * norm(w2) + ...

2) weights.BaseWeigher has been changed into an ABC so that we enforce
   that all weighers have the expected methods.

3) weights.BaseWeigher.weigh_objects() does no longer sum up the
   computer weighs to the object, but it rather returns a list that will be
   then normalized and added to the existing weight by BaseWeightHandler

4) Adapt the existing weighers to the above changes. Namely
    - New 'offset_weight_multiplier' for the cell weigher
      nova.cells.weights.weight_offset.WeightOffsetWeigher
    - Changed the name of the existing multiplier methods.

5) unittests for all of the introduced changes.

Implements blueprint normalize-scheduler-weights

DocImpact: Now weights for an object are normalized before suming them
up. This means that each weigher will take a maximum value of 1. This
may have an impact for operators that are using more than one weigher
(currently there is only one weigher: RAMWeiger) and for operators using
cells (where we have several weighers). It is needed to review then the
multipliers used and adjust them properly in case they have been
modified.

Docimpact: There is a new configuration option 'offset_weight_multiplier'
in nova.cells.weights.weight_offset.WeightOffsetWeigher

Change-Id: I81bf90898d3cb81541f4390596823cc00106eb20
2013-12-11 20:24:16 +01:00
Lianhao Lu bc32777e73 Added a new scheduler metrics weight plugin
The new metrics weigher can compute the weight based on the compute
node host's metrics data. The to-be weighed metrics and their
weighing ratio are specified in the configuration file as the
followings:

    metrics_weight_setting = name1=1.0,name2=-1.0

The final weight would be name1.value * 1.0 + name2.value * (-1.0).

This is part of the blueprint utilization-aware-scheduling.

DocImpact

Change-Id: Ib3e68505e6d4d8f6d67b54c5f00de3e1c172738c
2013-12-05 11:14:31 +08:00
pmoosh 73b82dda9d Updates the documentation for nova unit tests
unit_tests.rst is outdated and does not reflect the recent changes
in the run_tests.sh script. Fix required an update of the usage
output of run_tests.sh as well as changes to some references.
Nova now uses testrepository and flake8.

There were also changes to the examples shown in the section
"Running a subset of tests". All the updated examples were tested.

Removes white spaces at the of end 3 lines.

Change-Id: I3fa040d5682ad94d861cef2a64b19b4da947318b
Closes-Bug: #1219040
2013-10-25 11:45:04 -07:00
Jenkins 69e08a1cbb Merge "Remove out of date list of jenkins jobs" 2013-09-11 14:24:11 +00:00
Russell Bryant fcbe3f4dea Remove out of date list of jenkins jobs
The list of jobs in this doc file was out of date and most of the links
didn't work anymore.  Instead of trying to list out specifics which will
just get out of date again, include a generic pointer to where you can
find results (on code reviews).

Change-Id: Ief65281abae48bee6a679f76068e315227cf6991
Closes-bug: #1199577
2013-09-10 14:48:00 -04:00
Russell Bryant 677fec79c5 Update fedora dev env instructions
I just set up a new dev environment on Fedora.  Update the dev environment docs
to reflect the full list of packages I had to install.

Change-Id: Ifbdea54641094885fee08513f142593befcd465e
2013-09-10 09:07:49 -04:00
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
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
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
Jenkins 960b4f4245 Merge "Remove unused recreate-db options from run_test.sh" 2013-07-17 08:07:47 +00:00
Jenkins a572f60b4b Merge "Support scoped keys in aggregate extra specs filter" 2013-07-17 02:17:54 +00: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
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
Monty Taylor f0a2770342 Remove doc references to distribute.
Change-Id: I9ea56b6d765fa7214e4bcc0dbca877b411171eea
2013-07-05 22:26:06 -04:00
Jenkins 758cf7cc81 Merge "Add AggregateRamFilter" 2013-06-28 17:52:50 +00: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
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
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
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
Mark McLoughlin 5e7ef210c0 Add NOVA_LOCALEDIR env variable
Part of fixing bug #995287

Syncs these two commits from oslo-incubator:

  Support overriding oslo localedir too
  Add a gettextutils.install() helper function

to get a new gettextutils.install() function which allows the default
localedir to be overwritten via an environment variable.

Note that gettextutils.install() must be called before any other nova
modules are imported since some modules attempt to translate strings
at import time (e.g. the 'message' attributes on classes in
nova.exception). This is broken and inefficient, but fixing it involves
adding something like spinx's l_() function and would be very invaisve.

Also, note that calling gettextutils.install() in nova.cmd.__init__
means that no program which uses a different translation domain should
ever import any of the modules under nova.cmd.

Change-Id: I86562b3a65d371673bb21f7179eecc7602bc0775
2013-04-10 10:24:27 +01:00
Joe Gordon 820f43fc61 Remove deprecated Grizzly code.
Now that Havana development has started remove code deprecated in Grizzly.

Change-Id: Ie3e7611347c334c359dea98d759345b97c66c9c1
2013-04-04 01:10:46 +00:00
Mark McLoughlin 9447e59b70 Remove gettext.install() from nova/__init__.py
The gettext.install() function installs a builtin _() function which
translates a string in the translation domain supplied to the install()
function. If gettext.install() is called multiple times, it's the last
call to the function which wins and the last supplied translation domain
which is used e.g.

 >>> import os
 >>> os.environ['LANG'] = 'ja.UTF-8'
 >>> import gettext
 >>> gettext.install('keystone', unicode=1, localedir='/opt/stack/keystone/keystone/locale')
 >>> print _('Invalid syslog facility')
 無効な syslog ファシリティ
 >>> gettext.install('nova', unicode=1, localedir='/opt/stack/nova/nova/locale')
 >>> print _('Invalid syslog facility')
 Invalid syslog facility

Usually this function is called early on in a toplevel script and we
assume that no other code will call it and override the installed _().
However, in Nova, we have taken a shortcut to avoid having to call it
explicitly from each script and instead call it from nova/__init__.py.

This shortcut would be perfectly fine if we were absolutely sure that
nova modules would never be imported from another program. It's probably
quite incorrect for a program to use nova code (indeed, if we wanted to
support this, Nova code shouldn't use the default _() function) but
nevertheless there are some corner cases where it happens. For example,
the keystoneclient auth_token middleware tries to import cfg from
nova.openstack.common and this in turn causes gettext.install('nova')
in other projects like glance or quantum.

To avoid any doubt here, let's just rip out the shortcut and always
call gettext.install() from the top-level script.

Change-Id: If4125d6bcbde63df95de129ac5c83b4a6d6f130a
2013-04-01 13:44:47 -04:00
Kurt Taylor d17f9ab13d Update OpenStack LLC to Foundation
Update all references of "LLC" to "Foundation".

Change-Id: I009e86784ef4dcf38882d64b0eff484576e04efe
2013-02-26 19:15:29 -05:00