summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | | fixed bug lp:968019 ,fix network manager init floating ip problem.Yaguang Tang2012-03-291-1/+3
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: If2507256abcb609e7e3ee45d1585b7ba85624dee
* | | | | | | | Merge "Add validation for OSAPI server name length."Jenkins2012-03-292-0/+46
|\ \ \ \ \ \ \ \
| * | | | | | | | Add validation for OSAPI server name length.Dan Prince2012-03-292-0/+46
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes LP Bug #962515. Change-Id: Iee895604f8e9101a341a5909fc5ba2dd8e708b4b
* / / / / / / / get_instance_uuids_by_ip_filter to QMAaron Lee2012-03-285-0/+64
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding a get_instance_uuids_by_ip_filter to the QuantumManager. Also adds the supporting calls in melange_ipam_lib an connector to support this. It currently only works with Melange, I still need to add a conditional that falls back on the original implementation in the FlatManager if not using Melange. update: rebase Change-Id: I9468de130c6cd1e0520f9d92c43f98aa6b36dce6
* / / / / / / Updated docstrings in /tools as per HACKINGAlex Meade2012-03-281-12/+14
|/ / / / / / | | | | | | | | | | | | | | | | | | Change-Id: I06db6653784eb298ef7f78ebe99865b9c635aade
* | | | | | Merge "Reduce the image cache manager periodic interval."Jenkins2012-03-271-1/+1
|\ \ \ \ \ \
| * | | | | | Reduce the image cache manager periodic interval.Michael Still2012-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When this code was written, I (incorrectly) believed a periodic task tick was about a second. It turns out that by default they're between 60 seconds and 120 seconds depending on a random value. Therefore, reduce the interval to something more reasonable. Change-Id: Id840c755f954e3e371d7238243f2248e8d402c7b
* | | | | | | A missing checksum does not mean the image is corrupt.Michael Still2012-03-272-2/+8
| |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a logic error in the code. A missing checksum should not imply that the image is corrupt. Note that corrupt images are only logged, not removed, so there is no data loss for users with this bug. Change-Id: Ic644517d3b8e9646fe943e5cef485c4168ebb5b5
* | | | | | Merge "Handle Forbidden and NotAuthenticated glance exc."Jenkins2012-03-272-2/+17
|\ \ \ \ \ \ | |/ / / / / |/| | | | |
| * | | | | Handle Forbidden and NotAuthenticated glance exc.Anthony Young2012-03-262-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove references to deprecated NotAuthorized exception * Handle Forbidden and NotAuthenticated * Fixes bug 965540 Change-Id: Ib5eef3015239e0fafdb01c975a0f5d553f70519e
* | | | | | Merge "Destroy src and dest instances when deleting in RESIZE_VERIFY"Jenkins2012-03-261-10/+24
|\ \ \ \ \ \ | |/ / / / / |/| | | | |
| * | | | | Destroy src and dest instances when deleting in RESIZE_VERIFYJohannes Erdfelt2012-03-261-10/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes bug 963630 Since deletes are allowed during RESIZE_VERIFY, we need to ensure that the original instance is also deleted so we don't leak resources. Change-Id: Ibfd5ad4e427c247f1cd5fddcf4f43b30839a6c4f
* | | | | | Merge "Clean up the shared storage check (#891756)"Jenkins2012-03-262-39/+26
|\ \ \ \ \ \ | |/ / / / / |/| | | | |
| * | | | | Clean up the shared storage check (#891756)Mandell Degerness2012-03-262-39/+26
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The shared storage check for live and block migration is currently very confusing e.g. * The mounted_on_same_shared_storage() method raises FileNotFound for the caller to catch rather than just returning a boolean to indicate whether the hosts share storage * mounted_on_same_shared_storage() has a "filename is not None" check in its finally clause which doesn't make sense * InvalidSharedStorage is not raised in the live migration case, * instead FileNotFound is raised Clean all this up by having mounted_on_same_shared_storage() simply return a boolean and have simple logic to raise InvalidSharedStorage for live migration where no shared storage is available or for block migration where shared storage is available. Change-Id: I96f354fe41d9ce77c4cc98903f0d5a9de99ac4f6
* | | | | Merge "Don't set instance ACTIVE until it's really active"Jenkins2012-03-261-2/+3
|\ \ \ \ \
| * | | | | Don't set instance ACTIVE until it's really activeJohannes Erdfelt2012-03-261-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes bug 963656 Reverting a resize would end up setting the instance ACTIVE before the driver had finished all of the work starting up the original instance. If the instance is deleted quickly after the revert, a race condition could occur between restarting the original instance and deleting it. Change-Id: Iba26ad7d1bc1049137f94e13898be86698963fb3
* | | | | | Fix unrescue in invalid stateJohannes Erdfelt2012-03-262-1/+20
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes bug 965667 Unrescue did not check for InstanceInvalidState exception and return the appropriate error. Change-Id: I3ca2c1dae09bd149086bfe67e2233c8359d5c8f8
* | | | | Merge "Improve performance of safe_log()."Jenkins2012-03-261-5/+6
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Improve performance of safe_log().Russell Bryant2012-03-261-5/+6
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch addresses a minor performance regression in a recent change to this function. This change ensures that the deep copy is only done if we really need to. Previously, the deep copy was being done for all messages that included a 'method', not just messages with a method that contain an argument to be sanitized. Change-Id: I190c5963ecaf70b0aea4e12a2fdc19deb5c1fea2
* | | | Merge "Fix 'nova-manage config convert'"Jenkins2012-03-261-2/+2
|\ \ \ \
| * | | | Fix 'nova-manage config convert'Mark McLoughlin2012-03-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes bug #965069 Looks like this never worked. The dest of the infile and outfile arguments sets up an unknown kwarg. Change-Id: I428f56564b39f5586229325db03dccb0b4a01ef6
* | | | | Merge "Add another libvirt get_guest_config() test case"Jenkins2012-03-261-0/+28
|\ \ \ \ \ | |_|/ / / |/| | | |
| * | | | Add another libvirt get_guest_config() test caseMark McLoughlin2012-03-261-0/+28
| |/ / / | | | | | | | | | | | | | | | | | | | | This would have caught bug #964843 Change-Id: Id871a81ee4d5d639fd0e976b71bcd860623f6e4c
* | | | Merge "Reordered the alphabet."Jenkins2012-03-261-1/+1
|\ \ \ \ | |/ / / |/| | |
| * | | Reordered the alphabet.Andrew Bogott2012-03-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just putting this out there... I'm pretty sure that import nova.flags comes after from nova.endpoint import cloud Unless I'm totally misunderstanding how this is supposed to work, which is likely. Change-Id: I51096ab25dbca42d73a593872b83b25f2c451210
* | | | Fix libvirt global name 'xml_info' is not defined.Dan Prince2012-03-251-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove a line setting a stale xml_info variable. This caused failures when performing a rebuild w/ libvirt. Fixes LP Bug #964843. Change-Id: If8cbdb3198742d488325153c50d90a2ece67a3af
* | | | Merge "makes volume versions display properly"Jenkins2012-03-252-9/+22
|\ \ \ \ | |_|_|/ |/| | |
| * | | makes volume versions display properlyVishvananda Ishaya2012-03-232-9/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * The compute versions controller changed during a refactor and broke the volume versions controller (since we are using it as a base class) * Added naive test * fixes bug 963357 Change-Id: Ica9c65952b800d316d264db11f89e369e56bcade
* | | | Merge "Import recent openstack-common changes"Jenkins2012-03-243-32/+256
|\ \ \ \ | |_|_|/ |/| | |
| * | | Import recent openstack-common changesJohannes Erdfelt2012-03-233-32/+256
| | | | | | | | | | | | | | | | | | | | | | | | Fixes MultiStrOpt, plus also adds secret kwarg for sanitizing logs Change-Id: I87b979b38084f82b012872054262fc49d291e99e
* | | | Merge "Add periodic_fuzzy_delay option."Jenkins2012-03-237-29/+48
|\ \ \ \
| * | | | Add periodic_fuzzy_delay option.Rick Harris2012-03-237-29/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes bug 962665 This random delay is intended to reduce the stampeding behavior associated with periodic tasks when compute workers are restarted in unison across a cluster. Change-Id: Ie3771d94af29049061c129b8ea562ee447a61771
* | | | | Add a test case for generation of libvirt guest configDaniel P. Berrange2012-03-231-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the test case for checking XML template info which was deleted earlier, with a new test case checking the XML config objects. blueprint libvirt-xml-config-apis Change-Id: I1ddd945111dcde0e67aba280bf0d11a8dab6c44a Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* | | | | Introduce a class for storing libvirt snapshot configurationDaniel P. Berrange2012-03-232-0/+28
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend the libvirt config APIs to include a new class LibvirtConfigGuestSnapshot for storing information about guest snapshots blueprint libvirt-xml-config-apis Change-Id: Icc54f6f5cf41b05d904659e0a337bddb4bef5733 Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* | | | Convert libvirt connection class to use config APIs for CPU comparisonsDaniel P. Berrange2012-03-232-24/+11
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the libvirt connection class uses a Cheetah template to build up the CPU XML document, for doing host CPU comparisons. Remove this template and replace it with use of the new config API LibvirtConfigCPU The nova 'cpu_xml_template' configuration parameter is also removed since it is now obsolete blueprint libvirt-xml-config-apis Change-Id: I1d608f5f9d77302a9e08486f67ad3a39b224e9d5 Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* | | Introduce a class for storing libvirt CPU configurationDaniel P. Berrange2012-03-232-0/+77
| |/ |/| | | | | | | | | | | | | | | | | Extend the libvirt config APIs to include a new class LibvirtConfigCPU for storing host/guest CPU configuration data blueprint libvirt-xml-config-apis Change-Id: Ib508637c1e0ca69860d461b0a480347c59165e6b Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* | Convert libvirt connection class to use config APIs for guestsDaniel P. Berrange2012-03-232-113/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove the entire Cheetah XML template for libvirt guests and make the libvirt connection class use LibvirtConfingGuest classes instead The nova 'libvirt_xml_template' config parameter is now obsolete and removed. blueprint libvirt-xml-config-apis Change-Id: I5ff4ed7cbc69c8c141db840f4d6fc368a13f7f7a Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* | Move NIC devices back after disk devicesDaniel P. Berrange2012-03-231-3/+4
| | | | | | | | | | | | | | | | | | | | Originally the NIC devices were listed in the XML after the disk devices. Restore that order, simply for consistency. No functional change. blueprint libvirt-xml-config-apis Change-Id: If62446292850d58e133b0c4cc42ca83018e1fca1 Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* | Convert libvirt connection class to use config APIs for disk devicesDaniel P. Berrange2012-03-232-145/+169
|/ | | | | | | | | | Remove all the <disk> elements from the Cheetah XML template and make the libvirt connection class use the LibvirtConfigGuestDisk class for them instead blueprint libvirt-xml-config-apis Change-Id: I0f09a86e72e5e34bbd780b31177a65eb40fb5419 Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Convert libvirt connection class to use config APIs for filesystem devicesDaniel P. Berrange2012-03-232-6/+10
| | | | | | | | | | Remove the <filesystem> element from the Cheetah XML template and make the libvirt connection class use the LibvirtConfigGuestFilesys class for it instead blueprint libvirt-xml-config-apis Change-Id: I9dad031703161d1dff86af03eff7b1ebf657fc0c Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Convert libvirt connection class to use config APIs for input devicesDaniel P. Berrange2012-03-232-3/+6
| | | | | | | | | | Remove the <input> elements form the Cheetah XML template and make the libvirt connection class use the LibvirtConfigGuestInput class for it instead blueprint libvirt-xml-config-apis Change-Id: I4fba2ddae2d32b0ff49685245fd905651885b61b Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Convert libvirt connection class to use config APIs for serial/console devicesDaniel P. Berrange2012-03-232-13/+20
| | | | | | | | | | Remove the <serial> and <console> elements from the Cheetah XML template and make the libvirt connection class use the LibvirtConfigGuestConsole and LibvirtConfigGuestSerial classes for them instead blueprint libvirt-xml-config-apis Change-Id: I67031dad2969c9b36e2fe9230689c1b7bfbecfce Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Convert libvirt connection class to use config APIs for graphicsDaniel P. Berrange2012-03-232-6/+7
| | | | | | | | | | Remove the <graphics> element from the Cheetah XML template and make the libvirt connection class use the LibvirtConfigGuestGraphics class for it instead blueprint libvirt-xml-config-apis Change-Id: Ifa18cab2aa6983c9439c6230a9109e40a6a0bbe3 Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Convert libvirt vif classes over to use config APIDaniel P. Berrange2012-03-234-133/+85
| | | | | | | | | | | | The classes in the libvirt/vif.py file build up dictionaries and partial XML snippets, which are then passed onto Cheetah templating for XML generation. Instead of building up dictionaries of parameters, return LibvirtConfigGuestInterface object instances instead blueprint libvirt-xml-config-apis Change-Id: I4e977225e21219f408dd729ac280dcbfc6b8ba8f Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Convert libvirt volume classes over to use config APIDaniel P. Berrange2012-03-233-44/+49
| | | | | | | | | | | The classes in the libvirt/volume.py file build up XML strings using printf style substitutions. Convert this over to use the LibvirtConfigGuestDisk config class instead blueprint libvirt-xml-config-apis Change-Id: Ied1fad47db6fb23b74edc4405015768c764a4d10 Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Delete the test_preparing_xml_info libvirt testDaniel P. Berrange2012-03-231-14/+0
| | | | | | | | | | The test_preparing_xml_info test case is about to be intentionally broken by refactoring in following patches. It will be replaced by a new test at the end blueprint libvirt-xml-config-apis Change-Id: I2c5f19a071983e581ed5ed3bc8a84e14fbb6897b Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Introduce a set of classes for storing libvirt guest configurationDaniel P. Berrange2012-03-232-0/+721
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the current Cheetah template based approach to XML generation, there is never any canonical representation of the guest configuration. When generating XML, a hash is filled in with parameters to be used to generate XML, an even some pre-built XML snippets. When reading XML, typically XPath is used, but sometimes manual DOM traversal is used. This change introduces a set of classes for explicitly representing the guest configuration. They are intended to allow the guest config to be read/written using normal programatic APIs, avoiding the need for any code to know about XML. This first impl though, only supports writing of XML. The code to parse an existing XML doc is not yet written. The class hierarchy is as follows LibvirtConfigObject | + LibvirtConfigGuest + LibvirtConfigGuestDevice | +- LibvirtConfigGuestDisk +- LibvirtConfigGuestFilesys +- LibvirtConfigGuestInterface +- LibvirtConfigGuestInput +- LibvirtConfigGuestGraphics +- LibvirtConfigGuestChar | +- LibvirtConfigGuestSerial +- LibvirtConfigGuestConsole The base LibvirtConfigObject class provides some generic boilerplate code. Subclasses need to override the "format_dom" method for generating XML DOMS, and "parse_dom" for reading XML DOMs. The conversion from DOM <-> XML String is handled by the base class. The DOMs are based on the lxml.etree.Element class. * nova/tests/test_libvirt_config.py: Test cases for XML formatting of all config object classes * nova/virt/libvirt/config.py: Config object classes for libvirt guest XML schema blueprint libvirt-xml-config-apis Change-Id: I0474b6640b47ad0e5bb74503a5ff99a8a41bcdc4 Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Merge "Fix launching of guests where instances_path is on GlusterFS"Jenkins2012-03-234-7/+85
|\
| * Fix launching of guests where instances_path is on GlusterFSDaniel P. Berrange2012-03-234-7/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The FUSE module does not (currentl) support O_DIRECT on files. This prevents QEMU from starting guests using 'cache=none' for their disks located on a GlusterFS filesystem. The same also applies for a handful of other filesystems (notably tmpfs, or any other FUSE filesystem). This patch introduces a startup check in Nova compute service which tries to create a file $instances_path/.direct_io.test using the O_DIRECT flag. If this succeeds, then cache=none will be used for all disks, otherwise it will fallback to using cache=writethrough. While the latter does not have performance which is as consistent as cache=none, it is still host-crash safe and preserves data integrity with migration, if the filesystem is cache coherant (cluster filesystems like GlusterFS are, NFS by constrast is not). By doing the dynamic check for O_DIRECT, we ensure that if future FUSE modules gain O_DIRECT support, Nova will automatically do the right thing. * nova/tests/test_libvirt.py: Stub out os.open in the _check_xml_and_disk_driver() to enable testing of both O_DIRECT and non-O_DIRECT code paths * nova/tests/test_virt_drivers.py: Set instances_path to the current directory * nova/virt/libvirt.xml.template: Replace hardcoded 'none' string with the '$cachemode' variable for all disks. Add missing 'cache' attribute for the config disk * nova/virt/libvirt/connection.py: Check whether O_DIRECT is supported on the "FLAGS.instances_path" directory and use 'none' for cachemode if it is, 'writethrough' otherwise Bug: 959637 Change-Id: I60cbff1c3ad8299fe2aa37099390f9235f6724d0 Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* | Merge "Send a more appropriate error response for 403 in osapi"Jenkins2012-03-232-1/+14
|\ \