3541 Commits

Author SHA1 Message Date
Dan Prince
7e02b831c3 Fixes LP bug #907898.
Update DB api so that fixed_ip_disassociate_all_by_timeout uses two
separate commands (a query then an update). Fixes LP bug #907898.

Change-Id: I60d7e7ba6bb3d3542ccf5b595d0c0de944e499a3
2011-12-22 19:59:35 -05:00
Jenkins
faa6d169f0 Merge "Bug#898257 abstract out disk image access methods" 2011-12-22 19:23:21 +00:00
Pádraig Brady
cb155ea378 Bug#898257 abstract out disk image access methods
Rather than providing two mutually exlusive image
access methods (loop and qemu-nbd), try each in turn.
This is to prepare for a follow up patch which will
add libguestfs as a method to try.

* nova/virt/mount.py: A new Mount class to abstract the
devce allocation, partition mapping and file sys mounting,
for each access type.
* nova/virt/disk/loop.py: A specialization of the base Mount class
to provide loop back mounting support.
* nova/virt/disk/nbd.py: A specialization of the base Mount class
to provide qemu-nbd mounting support.
* nova/virt/disk/api.py: A new file containing the nova.virt.disk
module interface.
(img_handlers): A new list of access methods to try,
with the order being honored.
(_DiskImage): An internal helper class that uses the plugin classes
above, to provide the operations available on a disk image file.
When mounting, iterate over each access method until one succeeds.
If a hint is provided about a CoW format image, the list of
methods to try will be reduced accordingly.
Note expected errors are no longer raised as exceptions during mounting.
Instead, on failure to mount an image, errors are collated and raised.
Interveining errors are logged in debug mode for successful mounts.
* nova/virt/libvirt/connection.py: Adjust the function parameter
names to be more general, rather than referencing specific
implementations like 'nbd' and 'tune2fs'.
Simplify the destroy_container() by storing and passing
back a reference to the _DiskImage object, which has the
necessary state to unmount.
* nova/utils.py (trycmd): A helper function to both deal with,
commands that issue ignorable warnings to stderr,
and commands that EXIT_SUCCESS while issuing errors to stderr.
nova/virt/xenapi/vm_utils.py: Adjust for the moved virt.disk package

Change-Id: If3a4b1c8f4e2f2e7300a21071340dcc839cb36d7
2011-12-22 11:50:52 +00:00
Jenkins
c826f84f56 Merge "Makes disassociate by timeout work with multi-host" 2011-12-21 16:31:36 +00:00
Jenkins
7afca98abd Merge "Make UUID format checking more correct." 2011-12-20 19:34:11 +00:00
Russell Bryant
d88f8379b0 Make UUID format checking more correct.
This patch uses the same logic from glance to verify if a UUID is
properly formed.  It just tries to build a uuid.UUID from the string.
A test case has been added which previously would have failed, but now
passes.

A second test case has been added that verifies that the result of the
gen_uuid() function is considered valid, as well.

Change-Id: I33fe37b23ef03eda0f0e9d69afb601ca260aabde
2011-12-20 10:24:05 -05:00
Russell Bryant
7aa816c651 Document return type from utils.execute().
Change-Id: Id0bc0dff09a809fe3999c4ec5014ac40ccfd8d6d
2011-12-19 14:37:46 -05:00
Vishvananda Ishaya
dff718cfa5 Makes disassociate by timeout work with multi-host
* fixes bug 898485
 * updates timeout query to key off of instance host as well
 * removes unused status=1 in related query

Change-Id: Ia11b3d4d3db930eb31ccc2f74635971ba6edc32c
2011-12-16 16:07:11 -08:00
Jenkins
c5e19fbd4e Merge "Adds missing joinedload for vif loading." 2011-12-16 21:51:27 +00:00
Vishvananda Ishaya
1e526af75a Adds missing joinedload for vif loading.
* fixes bug 905398

Change-Id: I76ffea1437459942f5156d199592931afed4ae1b
2011-12-16 13:08:56 -08:00
Jenkins
8d167c23a2 Merge "Fixes bug 723235" 2011-12-16 17:51:20 +00:00
Rick Harris
74c266b542 Starting work on exposing service functionality.
Change-Id: Ic9412bc0dae8559e356c51ace063504c4cac5def
2011-12-15 22:55:59 +00:00
Jenkins
3641de6d4a Merge "Expose Asynchronous Fault entity in the OSAPI" 2011-12-15 19:07:35 +00:00
Alvaro Lopez Garcia
0addbc4c34 Fixes bug 723235
The XML templates have been converted into properties, thus we can
compare the mtime of the XML templates (libvirt and cpuinfo) each
time they are needed, checking if they have been modified and
reloading them. Added a function to read cached files.

Change-Id: I6cf0229c6435300e73f9d9a6b10b0bf9bf144a55
2011-12-15 18:09:21 +01:00
Alex Meade
197bbc0e26 Expose Asynchronous Fault entity in the OSAPI
Show latest instance fault in server update, show and detailed list

Change-Id: I9719d696aa3aac6e9cbca4c9a102bcd5a33bf0b1
2011-12-15 11:47:12 -05:00
Dan Prince
ab8a42740d Update utils.execute so that check_exit_code handles booleans.
Fixes LP bug #904560.

Change-Id: I5d09b65dade166763981dc6b248034d86ba217f1
2011-12-15 08:08:42 -05:00
Dean Troyer
13e64a98ea Fixes bug 887402
Change utils.execute to accept a list or a single integer in
check_exit_code.

In libvirt.disconnect_volume() return codes 0 and 255 are both valid
for logout/delete, where 255 is returned if the volume is already
disconnected.

Change-Id: Icffeb0fe8269a02d95ac6ed180ba0bb9f458a6ed
2011-12-14 18:46:24 -06:00
jakedahn
9b9da2a05a Bug 902626
Fixing typo which breaks floating_ip_get_all_by_project.

Change-Id: Ic586455b202ece5a9fb61e78d243502069d39242
2011-12-14 16:06:05 -08:00
Jenkins
47b5063aa5 Merge "Renaming instance_actions.instance_id column to instance_uuid. blueprint: internal-uuids" 2011-12-13 21:58:30 +00:00
Naveed Massjouni
3008185aad Renaming instance_actions.instance_id column to instance_uuid.
blueprint: internal-uuids

Change-Id: I204c3fd49278c509a9bc32353445ede086cfadb2
2011-12-13 00:50:38 -05:00
Jenkins
729391504f Merge "fixed_ips by vif does not raise" 2011-12-12 16:39:34 +00:00
Jenkins
9514d288de Merge "Add preparation for asynchronous instance faults" 2011-12-12 00:54:38 +00:00
Vishvananda Ishaya
a59be78696 Moves find config to utils because it is useful
This is to prepare for a future patch will will use find
config to load other config files.

Change-Id: Ic9bd9027baf518734c3f51f516651b80d1e752f2
2011-12-10 14:01:17 -08:00
Aaron Lee
6b51188b26 fixed_ips by vif does not raise
It makes more sense if this method returns an 
empty array instead of raising when it finds no
ips. This lets the iteration over that array
handle the 0 case, and we can use a conditional on
the len(of the ips) if really needed. I'm not sure
that log is needed to say "No fixed IPs 
deallocated" or if that is an artifact of needing 
something to put in the exception handler.

Change-Id: Ib9f66affb5360fb11a3ab5f415a0e57602cec886
2011-12-09 17:53:15 -06:00
Alex Meade
dcab02f451 Add preparation for asynchronous instance faults
Add InstanceFault model
Migration for new instance_faults table
Functions to add and get instance faults
A single example of how faults should be added

Change-Id: I439e2419240de24a728045046153451eb8a0d267
2011-12-09 12:12:57 -05:00
Jenkins
c7482e55d8 Merge "Adds network model and network info cache." 2011-12-09 16:16:06 +00:00
Jenkins
9c57293f3a Merge "Log it when we get a lock" 2011-12-09 15:51:25 +00:00
Soren Hansen
2099d17f29 Log it when we get a lock
Currently, we log it when we attempt to acquire a log, but we don't
mention it when we succesfully do acquire it. This makes people think
it's stuck.

This patch logs the succesful acquiry of locks.

Change-Id: I3b49ff331641ceafa46c93d8f5233c85fe45e5e2
2011-12-09 14:57:47 +01:00
Jenkins
d68c563f6a Merge "Rename .nova-venv to .venv." 2011-12-09 00:53:27 +00:00
Trey Morris
3160b80e7b Adds network model and network info cache.
The next merge will prepopulate the cache, and use the model to keep the
cache up to date.
I realize "cache" is a bit of a stretch for what this is doing.

blueprint network-info-model
blueprint compute-network-info

Change-Id: I0f0f4ba3de1310e1ff89239dab6ea8e24c85f2c8
2011-12-08 17:33:04 -06:00
James E. Blair
53858e24b2 Rename .nova-venv to .venv.
This simplifies a number of Jenkins jobs which currently, other
than directory names, could be the same for all OpenStack
projects. By renaming the virtualenv directory, the redundant
Jenkins virtualenv build and copy jobs can be eliminated.

Change-Id: Ieaf1dac3207ecb34b911c7edcd2086809abdf49e
2011-12-08 15:17:51 -08:00
Jenkins
d68eaf2252 Merge "Add ability to see deleted and active records." 2011-12-08 23:01:27 +00:00
Jenkins
e67b5ffc5f Merge "A more secure root-wrapper alternative" 2011-12-08 14:51:29 +00:00
Rick Harris
b38f7e00c5 Add ability to see deleted and active records.
Fixes bug #900564

Changes `Context`.`read_deleted` from a bool to an enum string with values
"yes" (can read deleted records), "no" (cannot read deleted records), and
"only" (can only see deleted records, for backwards compatibility).

Change-Id: Ic81db3664c33f23f751b73973782efb06fce90d9
2011-12-07 16:06:31 -06:00
Jenkins
3b9c912946 Merge "First steps towards consolidating testing infrastructure" 2011-12-07 18:13:48 +00:00
Thierry Carrez
53568de2ac A more secure root-wrapper alternative
Alternative to using a sudoers file to limit which commands can be run as
root in Nova. This one makes use of command filters defined in Nova code
itself, which can be customized to deeply inspect command arguments before
allowing a command to be executed.

This change puts the infrastructure in place, together with command filters
that replicate the level of filtering provided by a sudoers file (no deep
argument inspection yet). An example of an advanced filter (RegExpFilter) is
also provided. This new root wrapper is not active by default (root_helper
still defaults to "sudo"). Implements blueprint nova-rootwrap.

Change-Id: I7ad723b55e9446758876f21b4fbb09374a910425
2011-12-07 15:10:04 +01:00
Jenkins
00ce7e8e2d Merge "Remove remnants of babel i18n infrastructure" 2011-12-06 20:47:08 +00:00
Duncan McGreggor
d6ee85317f First steps towards consolidating testing infrastructure
This commit begins to implement blueprint consolidate-testing-infrastructure by
adding a 'testing' subpackage and moving some modules into it.

Change-Id: I04bf860bc386bd2016e7dbc5a6f6ef7379a855bb
2011-12-06 09:37:57 -08:00
Jenkins
cc04d00fac Merge "Remove autogenerated pot file" 2011-12-06 16:21:33 +00:00
Jenkins
49b2fc95ec Merge changes Ia6debb64,I31786a20
* changes:
  Adding an install_requires to the setup call. Now you can pip install nova on a naked machine.
  Removing obsolete bzr-related clauses in setup.py
2011-12-06 12:07:34 +00:00
Jenkins
3cd1267edf Merge "remove duplicate netaddr in nova/utils" 2011-12-06 11:57:48 +00:00
Mark McLoughlin
a5c433b4cd Remove remnants of babel i18n infrastructure
We use distutils-extra now instead of babel.

Change-Id: I10625cc4ef2ac8eefd46ee09e36f8cfaef85061f
2011-12-06 11:31:02 +00:00
Julien Danjou
81f883771c Remove autogenerated pot file
Change-Id: I25c33e2a91458d2eaa41232eb54b2c1e4e273854
Signed-off-by: Julien Danjou <julien.danjou@enovance.com>
2011-12-06 09:56:56 +01:00
Joe Gordon
24833d2247 remove duplicate netaddr in nova/utils
Change-Id: Ib9b7ddc619ce62010b5661579fe32cc55b68f7e6
2011-12-05 17:10:08 -08:00
Jenkins
e9318a5472 Merge "Adds extension documentation for some but not all extensions" 2011-12-05 16:36:26 +00:00
annegentle
ee7213b705 Adds extension documentation for some but not all extensions
Change-Id: I187483ccacd9c29c1c414fbf8481ead23f9c457a
2011-12-02 13:02:06 -06:00
Jenkins
cc05792ee0 Merge "Remove VIF<->Network FK dependancy" 2011-12-01 18:29:50 +00:00
Jason Kölker
98a33c9db7 Remove VIF<->Network FK dependancy
Related to blueprint untie-nova-network-models.

Depends-On: I665f402fe0ab1b301ab6761e80b11b101656065e
Change-Id: I9bfb957effe0a2420c312add1cca5d7af509579d
2011-11-30 18:46:49 -06:00
Aaron Lee
5144596219 split rxtx_factor into network and instance_type
This includes a migration and a change to the
flavors extension.

update1: removing tabs from the sql files & a
         quick refactoring
update2: Fixing whitespace problem in the
         sqlite upgrayedd

Change-Id: I665f402fe0ab1b301ab6761e80b11b101656065e
2011-11-30 15:19:02 -06:00
Jenkins
5c6c2f5398 Merge "Fix for bug 887712" 2011-11-29 20:27:04 +00:00