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
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
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
* fixes bug 898485
* updates timeout query to key off of instance host as well
* removes unused status=1 in related query
Change-Id: Ia11b3d4d3db930eb31ccc2f74635971ba6edc32c
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
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
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
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
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
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
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
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
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
This commit begins to implement blueprint consolidate-testing-infrastructure by
adding a 'testing' subpackage and moving some modules into it.
Change-Id: I04bf860bc386bd2016e7dbc5a6f6ef7379a855bb
* 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
Related to blueprint untie-nova-network-models.
Depends-On: I665f402fe0ab1b301ab6761e80b11b101656065e
Change-Id: I9bfb957effe0a2420c312add1cca5d7af509579d
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