- 25 4月, 2014 25 次提交
-
-
由 Daniel P. Berrange 提交于
The current nwfilter tech driver API has a 'createRuleInstance' method which populates virNWFilterRuleInstPtr with a command line string containing variable placeholders. The 'applyNewRules' method then expands the variables and executes the commands. This split of responsibility won't work when switching to the virFirewallPtr APIs, since we can't just build up command line strings. This patch this merges the functionality of 'createRuleInstance' into the applyNewRules method. The virNWFilterRuleInstPtr struct is changed from holding an array of opaque pointers, into holding generic metadata about the rules to be processed. In essence this is the result of taking a linked set of virNWFilterDefPtr's and flattening the tree to get a list of virNWFilterRuleDefPtr's. At the same time we must keep track of any nested virNWFilterObjPtr instances, so that the locks are held for the duration of the 'applyNewRules' method. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Later refactoring will change use of the virNWFilterRuleInstPtr struct. Prepare for this by pushing use of the virNWFilterRuleInstPtr parameter out of the ebtablesCreateRuleInstance and iptablesCreateRuleInstance methods. Instead they simply string(s) with the constructed rule data. The ebiptablesCreateRuleInstance method will make use of the virNWFilterRuleInstPtr struct instead. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Add virNWFilterRuleIsProtocol{Ethernet,IPv4,IPv6} helper methods to avoid having to write a giant switch statements with many cases. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The 'displayRuleInstance' callback in the nwfilter tech driver is never invoked, so can be deleted. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The 'removeRules' callback in the nwfilter tech driver is never invoked, so can be deleted. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The virNWFilterHashTable struct contains a virHashTable and then a 'char **names' field which keeps a copy of all the hash keys. Presumably this was intended to record the ordering of the hash keys. No code ever uses this and the ordering is mangled whenever a variable is removed from the hash, because the last element in the list is copied into the middle of the list when shrinking the array. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The 'virDomainNetType' is unused in every impl of the virNWFilterRuleCreateInstance driver method. Remove it from the code to avoid the dependancy on the external enum. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The virNWFilterTechDriver struct is nothing to do with the nwfilter XML configuration. It stores data specific to the driver implementation so should be in a header in the driver directory instead. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
If virNWFilterVarValueCreateSimple fails with OOM, then 'val' will be leaked by virNWFilterVarValueCreateSimpleCopyValue Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Jiri Denemark 提交于
Commit c4206d7c fixed the overflow for running domains. However, we need a similar check when setting migration speed on inactive domains. At first look, it may seem the check in c4206d7c is now redundant but qemuDomainMigrateSetMaxSpeed is not the only caller of qemuMonitorSetMigrationSpeed so we need to check the bandwidth in both places. https://bugzilla.redhat.com/show_bug.cgi?id=1083483Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Daniel P. Berrange 提交于
Replace use of cpuMapOverride with virFileFindResource to locate CPU map from build dir. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Replace virDriverModuleInitialize with virFileFindResource usage. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Replace virLockManagerSetPluginDir with virFileFindResource usage. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Nehal J Wani 提交于
Instead of hardcoding LIBEXECDIR as the location of the libvirt_iohelper binary, use virFileFindResource to optionally find it in the current build directory. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Nehal J Wani 提交于
Instead of hardcoding LIBEXECDIR as the location of the libvirt_parthelper binary, use virFileFindResource to optionally find it in the current build directory. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Nehal J Wani 提交于
Instead of hardcoding LIBEXECDIR as the location of the libvirt_lxc binary set in the LXC driver capabilities, use virFileFindResource to optionally find it in the current build directory. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Nehal J Wani 提交于
Instead of hardcoding LIBEXECDIR as the location of the libvirt_iohelper binary, use virFileFindResource to optionally find it in the current build directory. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Add calls to virFileActivateDirOverride so that the build dir overrides are activated. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Add virFileFindResource which will try to locate files in the local build tree if the calling binary (eg libvirtd or test suite) is being run from the build tree. The corresponding virFileActivateDirOverride should be called at startup passing in argv[0]. This will be examined for evidence of libtool magic binary prefix / sub-directory in order to activate the override. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
In debugging a crash on OOM, I thought that the virInsert APIs might be at fault, but couldn't isolate them as a cause. While the viralloc APIs are used in many test suites, this is as a side-effect, they are not directly tested :-) Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Jiri Denemark 提交于
Each backing store of a given disk is associated with a unique index (which is also formatted in domain XML) for easier addressing of any particular backing store. With this patch, any backing store can be addressed by its disk target and the index. For example, "vdc[4]" addresses the backing store with index equal to 4 of the disk identified by "vdc" target. Such shorthand can be used in any API in place for a backing file path: virsh blockcommit domain vda --base vda[3] --top vda[2] Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Returning both virStorageSourcePtr and its path member does not make a lot of sense. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
virStorageFileChainLookup is able to give use virStorageSourcePtr which contains the pointer to its canonical path. Let's use a more general virStorageSourcePtr instead of just canonical path. Former base_canon maps to baseSource->path. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
virStorageFileChainLookup is able to give use virStorageSourcePtr which contains the pointer to its canonical path. There's no need for the caller to store both of them. Former top_meta maps to topSource and top_canon maps to topSource->path. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Eric Blake 提交于
Once again, gcc 4.4.7 (hello RHEL) rears its ugly head: conf/domain_conf.c: In function 'virDomainDiskBackingStoreFormat': conf/domain_conf.c:14940: error: declaration of 'index' shadows a global declaration [-Wshadow] /usr/include/string.h:489: error: shadowed declaration is here [-Wshadow] * src/conf/domain_conf.c (virDomainDiskBackingStoreFormat): Pacify older gcc. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 24 4月, 2014 15 次提交
-
-
由 Roman Bogorodskiy 提交于
* Add nmdm type device to domain format documnetation * Add a section about nmdm console usage to the bhyve driver documentation
-
由 Martin Kletzander 提交于
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1019926 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=868673Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
So far, qemuxml2xml test was only able to check if the result matches the original or the appropriate XML in qemuxml2xmloutdata regardless on flags used to format the XML. Since the result can be different depending on VIR_DOMAIN_XML_INACTIVE flag being used or not, this patch adds support for qemuxml2xmlout-%s-active.xml and qemuxml2xmlout-%s-inactive.xml output files. If the file specific to the flag used exists, it is used in preference to the generic qemuxml2xmlout-%s.xml file when reading the expected output. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
This patch implements formating and parsing code for the backing store schema defined and documented by the previous patch. This patch does not aim at providing full persistent storage of disk backing chains yet. The formatter is supposed to provide the backing chain detected when starting a domain and thus it is not formatted into an inactive domain XML. The parser is implemented mainly for the purpose of testing the XML generated by the formatter and thus it does not distinguish between no backingStore element and an empty backingStore element. This will have to change once we fully implement support for user-supplied backing chains. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
The XML for quite a longish backing chain is shown below: <disk type='network' device='disk'> <driver name='qemu' type='qcow2'/> <source protocol='nbd' name='bar'> <host transport='unix' socket='/var/run/nbdsock'/> </source> <backingStore type='block' index='1'> <format type='qcow2'/> <source dev='/dev/HostVG/QEMUGuest1'/> <backingStore type='file' index='2'> <format type='qcow2'/> <source file='/tmp/image2.qcow'/> <backingStore type='file' index='3'> <format type='qcow2'/> <source file='/tmp/image3.qcow'/> <backingStore type='file' index='4'> <format type='qcow2'/> <source file='/tmp/image4.qcow'/> <backingStore type='file' index='5'> <format type='qcow2'/> <source file='/tmp/image5.qcow'/> <backingStore type='file' index='6'> <format type='raw'/> <source file='/tmp/Fedora-17-x86_64-Live-KDE.iso'/> <backingStore/> </backingStore> </backingStore> </backingStore> </backingStore> </backingStore> </backingStore> <target dev='vdb' bus='virtio'/> </disk> Various disk types and formats can be mixed in one chain. The <backingStore/> empty element marks the end of the backing chain and it is there mostly for future support of parsing the chain provided by a user. If it's missing, we are supposed to probe for the rest of the chain ourselves, otherwise complete chain was provided by the user. The index attributes of backingStore elements can be used to unambiguously identify a specific part of the image chain. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Daniel P. Berrange 提交于
Recent discussions around naming of 'pci' vs 'pci.0' for PPC made me go back and look at the PPC emulator in every historical version of QEMU since 1.0. The results were worse than I imagined. This patch adds the logic required to make libvirt work with PPC correctly with naming variations across all versions & machine types. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Peter Krempa 提交于
To avoid having the root of a backing chain present twice in the list we need to invert the working of virStorageFileGetMetadataRecurse. Until now the recursive worker created a new backing chain element from the name and other information passed as arguments. This required us to pass the data of the parent in a deconstructed way and the worker created a new entry for the parent. This patch converts this function so that it just fills in metadata about the parent and creates a backing chain element from those. This removes the duplication of the first element. To avoid breaking the test suite, virstoragetest now calls a wrapper that creates the parent structure explicitly and pre-fills it with the test data with same function signature as previously used.
-
由 Peter Krempa 提交于
Don't remove detected metadata about directory based storage volumes.
-
由 Peter Krempa 提交于
Switch over to storing of the backing chain as a recursive virStorageSource structure. This is a string based move. Currently the first element will be present twice in the backing chain as currently the retrieval function stores the parent in the newly detected chain. This will be fixed later.
-
由 Peter Krempa 提交于
To conform with the naming of the planned XML output rename the metadata variable name. s/backingMeta/backingStore/g
-
由 Peter Krempa 提交于
Remove the now unused pieces of the structure.
-
由 Peter Krempa 提交于
Replace the old structure with the new one. This change is a trivial name change operation (along with change of the freeing function).
-
由 Peter Krempa 提交于
Add the required fields that are missing from the new structure that will allow us to switch the storage file metadata code entirely to the new structure. Add "relPath" and "relDir" and the raw backing store name. Also allow creating linked lists of virStorageSourcePtrs to express backing chains.
-
由 Peter Krempa 提交于
Add a free function as some parts of the code will allocate the structure.
-