Commit Graph

1025 Commits

Author SHA1 Message Date
Jenkins 3c8ed4ec14 Merge "Zmq register opts fix in receiver" 2012-10-04 17:04:47 +00:00
Joe Gordon 492116d0f4 Remove deprecated Folsom code: config convert
Removes config file converter: nova-manage config convert

Change-Id: I146bff9ac00a4885e7054f999ae52159da3f86ef
2012-10-02 10:57:31 -07:00
Eric Windisch 5bc0946d17 Zmq register opts fix in receiver
Following dprince's change to use
FLAGS, rather than cfg.CONF,
zmq_opts needs to be registered explicitly.

Change-Id: I66bc71563435088ee9224fdd603602e35f3e3bff
2012-09-25 13:39:32 -04:00
Thierry Carrez a694b9e5ad Restore SIGPIPE default action for subprocesses
Python ignores SIGPIPE on startup, because it prefers to check every
write and raise an IOError exception rather than taking the signal. Most
Unix subprocesses don't expect to work this way. This patch (adapted
from Colin Watson's post at http://tinyurl.com/2a7mzh5) sets SIGPIPE
back to the default action for nova.utils.execute and nova-rootwrap
created subprocesses.

Fixes bug 1053364

Change-Id: I17e1629bb4ef4268515c6734ddb6e12746739c52
2012-09-20 15:24:14 +02:00
Jenkins 20a91c4cdf Merge "Update 'unlimited' quota value to '-1' in db" 2012-09-20 01:25:42 +00:00
vijaya-erukala 98f782f818 Update 'unlimited' quota value to '-1' in db
Updates quota value to -1 in db rather than None
if the user specify the quota limit as "unlimited".

Fixes bug 979087
Change-Id: I0ec412189ad9630c4a875655294c1e77886108f5
2012-09-18 14:14:15 +05:30
John Griffith 088472b86f Fix volume id conversion in nova-manage volume
The nova-manage volume commands weren't updated when the switch
  from int volume-id's to uuid's was made.  This updates the
  param2id method to call the appropriate conversion, and doesn't
  attempt to cast the value to an int.

  There is an additional issue with the nova-manage commands with the
  introduction of Cinder.  The calls in nova-manage are direct to the
  nova database which when using Cinder is not valid.  Add an error message
  when trying to use delete or re-attach commands as they don't work.

  This change deprecates the nova-manage delete function as it's now
  implemented as an admin extension (nova commit id: If795599d and
  cinder commit id: I29f4b892).

  The reattach command is only valid for nova-volumes, a similar extension
  will need to be added to cover cinder at which time the nova-manage volume
  reattach can be deprecated as well.

  Partial fix for bug #1051603

Change-Id: I666d4e627dee4a2025f7135560ee36c40f4bf17a
2012-09-17 21:06:14 -06:00
Joe Gordon c8b15fc78c Add man pages
Add partially written manpages for:
* nova-all
* nova-api-ec2
* nova-api-metadata
* nova-api-os-compute
* nova-api-os-volume
* nova-api
* nova-cert
* nova-compute
* nova-console
* nova-consoleauth
* nova-dhcpbridge
* nova-network
* nova-novncproxy
* nova-objectstore
* nova-rootwrap
* nova-rpc-zmq-receiver
* nova-scheduler
* nova-volume-usage-audit
* nova-volume
* nova-xvpvncproxy

Change-Id: I3734831ce2f6b5d765e98b3f50fe8c1ad7965685
2012-09-17 12:00:08 -07:00
Michael Still 5339141f04 Improve floating IP delete speed.
This is similar to the change to improve bulk creation speed. Before:

./bin/nova-manage floating delete --ip_range 10.250.0.0/16
337.20user 10.22system 44:07.10elapsed 13%CPU (0avgtext+0avgdata 119536maxresident)k
400inputs+0outputs (4major+11704minor)pagefaults 0swaps

After:

./bin/nova-manage floating delete --ip_range 10.250.0.0/16
6.95user 0.16system 1:04.04elapsed 11%CPU (0avgtext+0avgdata 120016maxresident)k
0inputs+0outputs (0major+11750minor)pagefaults 0swaps

Resolves bug 1023560.

Change-Id: If4f23222025cae88576f469022e0f7d907c9c4fa
2012-09-09 18:59:51 +10:00
Adrien Cunin daf0681f06 Generate a flavorid if needed at flavor creation
When creating a new flavor, it's now possible to omit flavorid. In this
case it will be automatically generated using utils.gen_uuid().
nova-manage and OS API updated accordingly.

Fixes: bug #1043410
Change-Id: Ibf9229599dac953177fbf1ffac5242ed716142db
2012-09-07 00:39:44 +02:00
Thierry Carrez 76068c27d9 Add missing argument to novncproxy websockify call
Current websockify constructor in nova-novncproxy requires
target_path to be explicitely set. This commit adds the missing
parameter. Fixes bug 1031998.

Change-Id: I05e346b5df5bc1501b55ff606fc4cefdda889d60
2012-09-06 16:31:00 +02:00
Dan Prince 84db80e46d Update nova-rpc-zmq-receiver to load nova.conf.
Updates the bin/nova-rpc-zmq-receiver so that it makes use of FLAGS,
calls parse_args, and loads the nova.conf config file like all
other nova- binaries.

Fixes LP Bug #1044153

Change-Id: I904e5d2ae491cd805be78038493d437dd1f7f3cc
2012-08-30 21:28:03 -04:00
unicell 34c012c709 Implement project specific flavors API
blueprint project-specific-flavors

This change implements API extension to manage project specific flavor
types, so that non-public flavor type can only see by projects with
access rights.

Change-Id: Ie2d2c605065b0c76897f843a4548a0c984a05f1a
2012-08-27 23:45:05 +08:00
Mark McLoughlin 89728b0674 Clean up network create exception handling
The NetworkManager code will not raise webob exceptions, so there's no
point in explicitly catching those.

Also, the contrib.networks module is unused in nova-manage.

Change-Id: I5f9fe7fa7f4365f44e7a70b3d9536da8f10b8fa7
2012-08-24 16:22:41 +01:00
Alessio Ababilov e00a398f84 Implement network creation in compute API
Implements blueprint os-api-network-create

The ability to create new networks is currently only exposed by the
nova-manage CLI. Here we add support for network creation in the
os-networks API extension.

With the exception of num_networks and network_size, all the parameters
supported by 'nova-manage network create' are supported. Only a single
network may be created by each API call.

To avoid code duplication, the nova-manage code is refactored and moved
into NetworkManager so that it can be re-used by the API.

DocImpact
Change-Id: I682d498ab35ea43b553b64e13e677fe9eeb8e08b
2012-08-21 16:10:24 +03:00
Joe Gordon b0392d3017 OpenStack capitalization added to HACKING.rst
Along with capitalization fixes to comments in code

Change-Id: I72ddc582001f80d954ca5a121903c689f40d08d1
2012-08-17 15:59:32 -05:00
Eoghan Glynn 1cf475d7a1 Revert per-user-quotas
See bug 1034384, bug 1037590.

This reverts commit https://github.com/openstack/nova/commit/391f345d,
but leaves the DB migration in place while adding a further
migration to reverse it.

The motivation for reversion is that the per-user quota logic would
totally undermine the per-project quotas set for a pre-existing
openstack install.

The per-user quota logic could be re-introduced in a fixed state
after Folsom-3.

Change-Id: Idd4b55a2404a25f43f6737b661f828c28501066f
2012-08-16 22:51:02 -07:00
Jenkins e5a8033888 Merge "Uniqueness checks for floating ip addresses." 2012-08-15 07:56:20 +00:00
Jenkins 2db23f6ba4 Merge "Flavor extra specs extension use instance_type id" 2012-08-13 15:36:28 +00:00
Dan Wendlandt 357ffa7d3a remove nova code related to Quantum v1 API
bug 1034692

Quantum team is removing all v1 support in Folsom, so this code
will not be used or supported with Quantum Folsom release.

Change-Id: I4c397d5238fcc3a15320e052bdc4735dfec1f176
2012-08-10 11:30:14 -07:00
Anton V. Yanchenko 8c2daea590 Uniqueness checks for floating ip addresses.
Fixes bug 1003392.

Change-Id: I3f4554659c68476539c82d359cc080b34088b3ae
2012-08-09 13:41:07 +00:00
Kylin CG 391f345dff Adds per-user-quotas support for more detailed quotas management
Implements blueprint per-user-quotas.

Based on the original quotas structure.

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

Allow 'projectadmin' role to access the user quota setting
methods.

Add commands 'nova-manage quota project/user' for quotas
management.

Change-Id: I07a39499432571fedd819c53ae414240cefc3354
2012-08-06 23:55:22 +08:00
Yunhong, Jiang 9575a426fa Flavor extra specs extension use instance_type id
bug 1031263

The nova database API use instance_type id as parameter to access flavor
extra spec. However, the flavor extra_specs API extension use flavor_id as
parameter wrongly.

As the instance_type ID is a purely nova internal ID, the database should
not expose it and instead use flavor_id as the parameter

Change-Id: I5f509cb7c4457d8c399df32f559a874d498be762
Signed-off-by: Yunhong, Jiang <yunhong.jiang@intel.com>
2012-08-06 18:26:15 +08:00
Ray Sun 143b4671cc Fix regression with nova-manage floating list
Fixes bug #1032177

If a floating IP is not associated with an instance, nova-manage fails
with:

  local variable 'instance_uuid' referenced before assignment

This is a regression introduced by commit fc82c6d. Simply rename
the local variable to instance_uuid.

Change-Id: Ia6df23c945f0815c65bcfd2f49e8ba3225d03d7f
2012-08-03 06:57:23 +08:00
Thierry Carrez 1d447e69f9 Deprecate root_helper in favor of rootwrap_config
Mark the root_helper option deprecated and introduce usage of
the rootwrap_config option instead. The root_helper option will
still fully be supported in Folsom, but will be removed in Grizzly.

Transition notes: you should replace:
root_helper=sudo nova-rootwrap /etc/nova/rootwrap.conf

by:
rootwrap_config=/etc/nova/rootwrap.conf

Implements bp deprecate-root-helper

Change-Id: I8dfc94e9b91f7ffc82d393b345f09409da347e78
2012-08-01 15:32:37 +02:00
Jenkins 151017385a Merge "Enhance nova-manage to set flavor extra specs" 2012-07-26 22:14:12 +00:00
Michael Still fc82c6dbbd Convert fixed_ips to using instance_uuid.
This should be the second last blueprint finish-uuid-conversion change.

Change-Id: Idd47c5ed3c30af24d60eb23b8e3881d61b4c7976
2012-07-26 21:22:04 +10:00
Yunhong, Jiang 8644584eb6 Enhance nova-manage to set flavor extra specs
blueprint update-flavor-key-value

Enhance nova-manage so that it can add, delete and list key/value pairs for
flavors extra specs.

Change-Id: I0665bec6aecd7f7a1d8e845fd930f4bd5a841522
Signed-off-by: Yunhong, Jiang <yunhong.jiang@intel.com>
2012-07-26 08:49:43 +08:00
Tong Li 854be48151 fixes for nova-manage not returning a full list of fixed IPs
This fix correct the problem reported in bug 930193
nova-manage does not return a full list of fixed IPs. The reason
is that the call to fixed_ip['instance_id'] can throw exception
when fixed_ip does not have instance_id as its member. The changes
in this fix corrects the problem.
rebase to resolve the automatic merge issue.

Change-Id: Ic15a0a0f43f53b82f9d88a03803c96b44a8ddcb9
2012-07-20 22:49:34 -04:00
Jenkins 7587738bdf Merge "Fixes nova-manage fixed list with deleted networks" 2012-07-20 20:44:47 +00:00
Tong Li 7343f79cbe Fixes nova-manage fixed list with deleted networks
The fix addresses the bug reported in bug 1025827
currently command 'nova-manage fixed list' will return
'Command failed.' message when there is no network defined or
all networks have been deleted or even when a network gets
deleted, then a new network gets created. In all these cases,
the command produces the 'Command failed.' error message which
does not really tell what went wrong. This fix will produce
'No fixed IP found' in these conditions.
changes made for globalization.
changes made for based on the comments for patchset 7.

Change-Id: I3c2e9bf3fa3c748e680c1df27d243a648ed47cf5
2012-07-20 10:38:15 -04:00
Tong Li 458a5d61ea fixes for nova-manage network list if network has been deleted
this fix addresses the  bug #1021810
Currently command 'nova-manage network list' or
'nova-manage fixed list'  will return 'Command failed.' message when
there is no network defined or networks get deleted. This fix combined
with fixes to bug 1025827 will fix both command problem.
also change the print out message so that it can be translated.
code structure changes according to the suggestion from comments.

Change-Id: Id9a1a10217aac971cbbba9db5829c8478892db1a
2012-07-19 12:11:14 -04:00
Jenkins b9478a33bb Merge "Always attempt to delete entire floating IP range." 2012-07-13 23:34:13 +00:00
John Tran 1684c95568 Floating_ip create /31,32 shouldn't silent error
Fixes bug 1017682 the netaddr.IPNetwork.iter_hosts
method doesn't return any IPs when /32 or /31 and
should throw an exception instead of silent error

Change-Id: Id8875b6016a4dbb40b29d2f7687e6c35491e0129
2012-07-12 11:31:18 -07:00
Russell Bryant 42e785561e Always attempt to delete entire floating IP range.
Fix bug 1021222.

This patch tweaks nova-manage to always attempt to delete all addresses
in the specified IP range, even if an error is encountered.  This is an
easy way to handle a case where a range was created, but then a subset
of that range was deleted.  Otherwise, deleting the rest of the range is
a pain.

An example of this would be:

  # nova-manage floating create --ip_range=1.1.1.0/24
  # nova-manage floating delete 1.1.1.1
  # nova-manage floating delete 1.1.1.0/24

Previously this would fail.  Now it works.

Change-Id: Ia01c04dee5383f597976c6a79d9a0d9e19985898
2012-07-11 13:57:41 -04:00
Jenkins f220bf6790 Merge "Refactor instance_usage_audit. Add audit tasklog." 2012-07-11 17:06:42 +00:00
Monsyne Dragon 2fdd73816c Refactor instance_usage_audit. Add audit tasklog.
The instance usage audit cronjob that generates periodic
compute.instance.exists notifications is not particularly scalable.
It is run on one server and takes longer as the number of instances grows.

This change moves the generation of those events to a periodic task in
the compute manager. It also adds an api extension that can be used
by administrators to check for errors generating these events.

Change-Id: I856d3d0c73c34e570112f1345d306308ef20a9ae
2012-07-10 22:28:33 +00:00
Brian Waldon 822208fd34 Remove deprecated auth code
* Remove nova.auth.manager -- AuthManager, User, Role, Project, etc.
* Remove nova.auth.dbdriver
* Remove nova.auth.ldapdriver
* Remove nova.auth.signer
* Remove arbitrary scripts and schemas in nova/auth/
* Remove nova/auth/novarc.template
* Remove or update affected tests
* Related to bp remove-deprecated-auth

Change-Id: Ide0fefd0ddf79ae1b3bb74cb242c2893575839e7
2012-07-09 23:30:21 -07:00
Anthony Young 626632d4cb Fix rpc import path in nova-novncproxy
* Fixes bug 1021836

Change-Id: Ia50224d653e172311ec9ef86ea2809ad1dafff3d
2012-07-06 10:49:03 -07:00
Jenkins eda6430001 Merge "Remove auth-related nova-manage commands" 2012-07-05 21:08:47 +00:00
Brian Waldon f953091dfe Remove auth-related nova-manage commands
Drop support for management of deprecated auth by deleting
the following nova-manage commands:
* role *
* export *
* project/account * (except scrub and quota)
* shell export
* user *

Additionally, delete relevant documentation and tests.

Related to bp remove-deprecated-auth.

Change-Id: Iad9787f696cb55d4673d68fc60851c7f5bd25805
2012-07-05 09:16:29 -07:00
Johannes Erdfelt 63ce7031d1 Fix missing nova.log change to nova.openstack.common.log
This appears to have slipped through the cracks in the recent move
from nova.log to nova.openstack.common.log

Change-Id: I4935c6e1ba0681a31c081b580f1afecc676c5697
2012-07-03 23:54:58 +00:00
Eric Windisch 9e282ef2d6 Fix nova-rpc-zmq-receiver
Logging broke with change to stdlib logging,
changed to openstack.common log.

Use of 'python -d' seems not to work with 'env', and unnecessary.

Change-Id: I428c56c612c7d9d043dab2d36b80beb6ca184d27
2012-07-03 13:34:04 -04:00
Andrew Bogott d335457f48 Switch to common logging.
I only just moved logging from nova to common, so behavior should remain the same.

Change-Id: I1d7304ca200f9d024bb7244d25be2f9a670318fb
2012-07-02 15:57:09 -05:00
Johannes Erdfelt 46c1b6eaee Add multi-process support for API services
Implements blueprint multi-process-api-service

This is based on Huang Zhiteng's patch.

This patch adds support for running services as multiple processes. This
is primarily intended to be used with the API service as a way to provide
more concurrency than eventlet can sometimes provide.

A SIGTERM or SIGINT signal will cause the parent process to gracefully
terminate the child processes, allowing them to finish processing the
requests currently being processed. The parent will wait for the
children to finish before exiting.

Change-Id: Ie6d6802626eb42d5e64c4167be363fbf6cea2a1b
2012-06-28 19:57:37 +00:00
Johannes Erdfelt 829832bc7b Use LOG.exception instead of logging.exception
Fix a typo in nova-all where logging.exception was used instead of
LOG.exception like the rest of the code uses

Change-Id: I6f88014e1c5d87a9b84bb2ac833931a93aaf96c0
2012-06-28 04:19:15 +00:00
Jenkins bf368360cb Merge "Fix import order of openstack.common" 2012-06-25 18:03:16 +00:00
Joe Gordon 5685d20341 Fix import order of openstack.common
Change-Id: Id80026ad9eb78c6d9a6bcae33e26ac8a4fdd6680
2012-06-22 17:58:30 -07:00
Thierry Carrez 93d3c77caf Move rootwrap filters definition to config files
Move rootwrap filters definition from being defined within Nova
code to being defined in configuration files to facilitate pluging-in
new rootwrap commands.

Transition notes:
* nova-rootwrap now requires an additional (first) parameter pointing
  to the root-owned rootwrap.conf file, sudoers needs to be updated
  to specify that ("nova-rootwrap /etc/nova/rootwrap.conf *")
* Packagers should ship {compute,network,volume}.filters inside a
  directory listed in rootwrap.conf rather than shipping
  nova/rootwrap/{compute,network,volume}.py
* Filter definitions now only support strings. The KillFilter (which was
  using arrays as parameters) was modified and the tests updated.

Implements bp nova-rootwrap-pluggable-filters

Corresponding devstack change needs to land first, so that tests pass:
https://review.openstack.org/8842

Change-Id: I2350154cd8057bd57926ed542de035626f7de37d
2012-06-22 15:35:23 +02:00
Jenkins 6a16ebd2ac Merge "Propose nova-novncproxy back into nove core." 2012-06-21 19:36:25 +00:00