- 30 1月, 2019 2 次提交
-
-
由 John Ferlan 提交于
Introduce the virStoragePoolFSMountOptionsDef to be used to manage the Storage Pool XML Namespace for mount options. Using a new virStorageBackendNamespaceInit function, set the virStoragePoolXMLNamespace into the _virStoragePoolOptions when the storage backend is loaded. Modify the storagepool.rng to allow for the usage of a different XML namespace to parse the fs_mount_opts to be included with the fs and netfs storage pool definitions. Modify the storagepoolxml2xmltest to utilize a properly modified XML file to parse and format the namespace for a netfs storage pool. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 John Ferlan 提交于
Add an optional way to define which NFS Server version will be used to content the target NFS server. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 13 12月, 2018 1 次提交
-
-
由 John Ferlan 提交于
Cover the case where @netauto would be used to create the command line in virStorageBackendFileSystemMountCmd. Essentially when the pool type is "netfs", but the "source.format" is empty, create the command line properly. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 20 9月, 2018 2 次提交
-
-
由 Erik Skultety 提交于
All of the ones being removed are pulled in by internal.h. The only exception is sanlock which expects the application to include <stdint.h> before sanlock's headers, because sanlock prototypes use fixed width int, but they don't include stdint.h themselves, so we have to leave that one in place. Signed-off-by: NErik Skultety <eskultet@redhat.com> Acked-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Erik Skultety 提交于
It doesn't really make sense for us to have stdlib.h and string.h but not stdio.h in the internal.h header. Signed-off-by: NErik Skultety <eskultet@redhat.com> Acked-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 06 8月, 2018 1 次提交
-
-
由 Clementine Hayat 提交于
Introducing the pool as a noop. Integration inside the build system. Implementation will be in the following commits. Signed-off-by: NClementine Hayat <clem@lse.epita.fr> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 03 11月, 2017 1 次提交
-
-
由 Andrea Bolognani 提交于
Right-aligning backslashes when defining macros or using complex commands in Makefiles looks cute, but as soon as any changes is required to the code you end up with either distractingly broken alignment or unnecessarily big diffs where most of the changes are just pushing all backslashes a few characters to one side. Generated using $ git grep -El '[[:blank:]][[:blank:]]\\$' | \ grep -E '*\.([chx]|am|mk)$$' | \ while read f; do \ sed -Ei 's/[[:blank:]]*[[:blank:]]\\$/ \\/g' "$f"; \ done Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
- 04 4月, 2017 1 次提交
-
-
由 Andrea Bolognani 提交于
We use the "vir" prefix pretty consistently in our APIs, both external and internal, which made these macros stood out.
-
- 29 3月, 2017 1 次提交
-
-
由 Ján Tomko 提交于
Since commit fcbbb289 we steal the pointer to the storage pool source name if there was no pool name specified. Properly duplicate the string to avoid freeing it twice. https://bugzilla.redhat.com/show_bug.cgi?id=1436400
-
- 21 2月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
The XML2XML test should work properly even if the storage backend is disabled, since it does not use it.
-
- 26 1月, 2017 1 次提交
-
-
由 Olga Krishtal 提交于
Signed-off-by: NOlga Krishtal <okrishtal@virtuozzo.com>
-
- 08 6月, 2016 2 次提交
-
-
由 Tomáš Ryšavý 提交于
This function doesn't follow our convention of naming functions.
-
由 Tomáš Ryšavý 提交于
This function doesn't follow our convention of naming functions.
-
- 29 3月, 2016 1 次提交
-
-
由 Anatole Denis 提交于
This test was commited 4 years ago, but was never enabled in storagepoolxml2xmltest.c. This patch reactivates it, conditionnaly on RBD storage support being enabled
-
- 20 1月, 2016 1 次提交
-
-
由 John Ferlan 提交于
Add a new storage pool source device attribute 'part_separator=[yes|no]' in order to allow a 'disk' storage pool using a device mapper multipath device to not add the "p" partition separator to the generated device name when libvirt_parthelper is run. This will allow libvirt to find device mapper multipath devices which were configured in /etc/multipath.conf to use 'user_friendly_names' or custom 'alias' names for the LUN.
-
- 16 6月, 2015 1 次提交
-
-
由 John Ferlan 提交于
Commit id '887dd362' added support for a netfs pool format type 'cifs' and 'gluster' in order to add rng support for Samba and glusterfs netfs pools. Originally, the CIFS type support was added as part of commit id '61fb6979'. Eventually commit id 'b325be12' fixed the gluster rng definition to match expectations. As it turns out the CIFS rng needed a similar change since the directory path is not an absDirPath, rather just a dirPath will be required.
-
- 24 4月, 2015 2 次提交
-
-
由 Cole Robinson 提交于
Replaces a common pattern used in many test files
-
由 Cole Robinson 提交于
-
- 19 1月, 2015 1 次提交
-
-
由 Gary R Hook 提交于
Do not run ZFS tests when ZFS is unsupported in the environment. The recent patch b4af4022 adds tests to storagepoolxml2xmltest for the optional ZFS feature. When ZFS is not included in the configuration these tests should not / cannot be run. Modify the test source file to check for use of the feature and compile in the tests accordingly. Signed-off-by: NGary R Hook <gary.hook@nimboxx.com>
-
- 12 11月, 2014 1 次提交
-
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1160926 Introduce a 'managed' attribute to allow libvirt to decide whether to delete a vHBA vport created via external means such as nodedev-create. The code currently decides whether to delete the vHBA based solely on whether the parent was provided at creation time. However, that may not be the desired action, so rather than delete and force someone to create another vHBA via an additional nodedev-create allow the configuration of the storage pool to decide the desired action. During createVport when libvirt does the VPORT_CREATE, set the managed value to YES if not already set to indicate to the deleteVport code that it should delete the vHBA when the pool is destroyed. If libvirtd is restarted all the memory only state was lost, so for a persistent storage pool, use the virStoragePoolSaveConfig in order to write out the managed value. Because we're now saving the current configuration, we need to be sure to not save the parent in the output XML if it was undefined at start. Saving the name would cause future starts to always use the same parent which is not the expected result when not providing a parent. By not providing a parent, libvirt is expected to find the best available vHBA port for each subsequent (re)start. At deleteVport, use the new managed value to decide whether to execute the VPORT_DELETE. Since we no longer save the parent in memory or in XML when provided, if it was not provided, then we have to look it up.
-
- 18 9月, 2014 1 次提交
-
-
由 Roman Bogorodskiy 提交于
- Provide an implementation for buildPool and deletePool operations for the ZFS storage backend. - Add VIR_STORAGE_POOL_SOURCE_DEVICE flag to ZFS pool poolOptions as now we can specify devices to build pool from - storagepool.rng: add an optional 'sourceinfodev' to 'sourcezfs' and add an optional 'target' to 'poolzfs' entity - Add a couple of tests to storagepoolxml2xmltest
-
- 22 7月, 2014 1 次提交
-
-
由 Osier Yang 提交于
Between reboots and kernel reloads, the SCSI host number used for SCSI storage pools may change requiring modification to the storage pool XML in order to use a specific SCSI host adapter. This patch introduces the "parentaddr" element and "unique_id" attribute for the SCSI host adapter in order to uniquely identify the adapter between reboots and kernel reloads. For now the goal is to only parse and format the XML. Both will be required to be provided in order to uniquely identify the desired SCSI host. The new XML is expected to be as follows: <adapter type='scsi_host'> <parentaddr unique_id='3'> <address domain='0x0000' bus='0x00' slot='0x1f' func='0x2'/> </parentaddr> </adapter> where "parentaddr" is the parent device of the SCSI host using the PCI address on which the device resides and the value from the unique_id file for the device. Both the PCI address and unique_id values will be used to traverse the /sys/class/scsi_host/ directories looking at each link to match the PCI address reformatted to the directory link format where "domain:bus:slot:function" is found. Then for each matching directory the unique_id file for the scsi_host will be used to match the unique_id value in the xml. For a PCI address listed above, this will be formatted to "0000:00:1f.2" and the links in /sys/class/scsi_host will be used to find the host# to be used for the 'scsi_host' device. Each entry is a link to the /sys/bus/pci/devices directories, e.g.: % ls -al /sys/class/scsi_host/host2 lrwxrwxrwx. 1 root root 0 Jun 1 00:22 /sys/class/scsi_host/host2 -> ../../devices/pci0000:00/0000:00:1f.2/ata3/host2/scsi_host/host2 % cat /sys/class/scsi_host/host2/unique_id 3 The "parentaddr" and "name" attributes are mutually exclusive to identify the SCSI host number. Use of the "parentaddr" element will be the preferred mechanism. This patch only supports to parse and format the XMLs. Later patches will add code to find out the scsi host number.
-
- 25 3月, 2014 1 次提交
-
-
由 Ján Tomko 提交于
-
- 18 3月, 2014 1 次提交
-
-
由 Martin Kletzander 提交于
Commit a1cbe4b5 added a check for spaces around assignments and this patch extends it to checks for spaces around '=='. One exception is virAssertCmpInt where comma after '==' is acceptable (since it is a macro and '==' is its argument). Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 26 11月, 2013 1 次提交
-
-
由 Eric Blake 提交于
Add support for a new <pool type='gluster'>, similar to RBD and Sheepdog. Terminology wise, a gluster volume forms a libvirt storage pool, within the gluster volume, individual files are treated as libvirt storage volumes. * docs/schemas/storagepool.rng (poolgluster): New pool type. * docs/formatstorage.html.in: Document gluster. * docs/storage.html.in: Likewise, and contrast it with netfs. * tests/storagepoolxml2xmlin/pool-gluster.xml: New test. * tests/storagepoolxml2xmlout/pool-gluster.xml: Likewise. * tests/storagepoolxml2xmltest.c (mymain): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 22 11月, 2013 1 次提交
-
-
由 Eric Blake 提交于
$ touch /var/lib/libvirt/images/'a<b>c' $ virsh pool-refresh default $ virsh vol-dumpxml 'a<b>c' default | head -n2 <volume> <name>a<b>c</name> Oops. That's not valid XML. And when we fix the XML generation, it fails RelaxNG validation. I'm also tired of seeing <key>(null)</key> in the example output for volume xml; while we used NULLSTR() to avoid a NULL deref rather than relying on glibc's printf extension behavior, it's even better if we avoid the issue in the first place. But this requires being careful that we don't invalidate any storage backends that were relying on key being unassigned during virStoragVolCreateXML[From]. I would have split this into two patches (one for escaping, one for avoiding <key>(null)</key>), but since they both end up touching a lot of the same test files, I ended up merging it into one. Note that this patch allows pretty much any volume name that can appear in a directory (excluding . and .. because those are special), but does nothing to change the current (unenforced) RelaxNG claim that pool names will consist only of letters, numbers, _, -, and +. Tightening the C code to match RelaxNG patterns and/or relaxing the grammar to match the C code for pool names is a task for another day (but remember, we DID recently tighten C code for domain names to exclude a leading '.'). * src/conf/storage_conf.c (virStoragePoolSourceFormat) (virStoragePoolDefFormat, virStorageVolTargetDefFormat) (virStorageVolDefFormat): Escape user-controlled strings. (virStorageVolDefParseXML): Parse key, for use in unit tests. * src/storage/storage_driver.c (storageVolCreateXML) (storageVolCreateXMLFrom): Ensure parsed key doesn't confuse volume creation. * docs/schemas/basictypes.rng (volName): Relax definition. * tests/storagepoolxml2xmltest.c (mymain): Test it. * tests/storagevolxml2xmltest.c (mymain): Likewise. * tests/storagepoolxml2xmlin/pool-dir-naming.xml: New file. * tests/storagepoolxml2xmlout/pool-dir-naming.xml: Likewise. * tests/storagevolxml2xmlin/vol-file-naming.xml: Likewise. * tests/storagevolxml2xmlout/vol-file-naming.xml: Likewise. * tests/storagevolxml2xmlout/vol-*.xml: Fix fallout. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 14 11月, 2013 1 次提交
-
-
由 Eric Blake 提交于
While trying to compare netfs against my new gluster pool, I discovered two things: virt-xml-validate chokes on valid xml produced by 'virsh pool-dumpxml' [yet another reason that ALL patches that add new xml should be adding corresponding tests] When using glusterfs FUSE mounts, you cannot access a subdirectory of a gluster volume. The recommended workaround in the gluster community is to mount the volume to an intermediate location, then bind-mount the desired subdirectory to the final location. Maybe we should teach libvirt to do bind-mounting, but for now I chose to just document the limitation. * docs/storage.html.in: Improve documentation. * docs/schemas/storagepool.rng (sourcefmtnetfs): Allow all formats, and drop redundant info-vendor. * tests/storagepoolxml2xmltest.c (mymain): New test. * tests/storagepoolxml2xmlin/pool-netfs-gluster.xml: New file. * tests/storagepoolxml2xmlout/pool-netfs-gluster.xml: Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 08 10月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
The test case average timing code has not been used by any test case ever. Delete it to remove complexity. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 16 7月, 2013 1 次提交
-
-
由 Martin Kletzander 提交于
When using logical pools, we had to trust the target->path provided. This parameter, however, can be completely ommited and we can use '/dev/<source.name>' safely and populate it to target.path. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=952973
-
- 10 7月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
Actually, I'm turning this function into a macro as filename, function name and line number needs to be passed. The new function virAsprintfInternal is introduced with the extended set of arguments.
-
- 02 5月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
The source code base needs to be adapted as well. Some files include virutil.h just for the string related functions (here, the include is substituted to match the new file), some include virutil.h without any need (here, the include is removed), and some require both.
-
- 08 4月, 2013 1 次提交
-
-
由 Osier Yang 提交于
This introduces 4 new attributes for storage pool source adapter. E.g. <adapter type='fc_host' parent='scsi_host5' wwnn='20000000c9831b4b' wwpn='10000000c9831b4b'/> Attribute 'type' can be either 'scsi_host' or 'fc_host', and defaults to 'scsi_host' if attribute 'name' is specified. I.e. It's optional for 'scsi_host' adapter, for back-compat reason. However, mandatory for 'fc_host' adapter and any new future adapter types. Attribute 'parent' is to specify the parent for the fc_host adapter. * docs/formatstorage.html.in: - Add documents for the 4 new attrs * docs/schemas/storagepool.rng: - Add RNG schema * src/conf/storage_conf.c: - Parse and format the new XMLs * src/conf/storage_conf.h: - New struct virStoragePoolSourceAdapter, replace "char *adapter" with it; - New enum virStoragePoolSourceAdapterType * src/libvirt_private.syms: - Export TypeToString and TypeFromString * src/phyp/phyp_driver.c: - Replace "adapter" with "adapter.data.name", which is member of the union of the new struct virStoragePoolSourceAdapter now. Later patch will add the checking, as "adapter.data.name" is only valid for "scsi_host" adapter. * src/storage/storage_backend_scsi.c: - Like above * tests/storagepoolxml2xmlin/pool-scsi-type-scsi-host.xml: * tests/storagepoolxml2xmlin/pool-scsi-type-fc-host.xml: - New test for 'fc_host' and "scsi_host" adapter * tests/storagepoolxml2xmlout/pool-scsi.xml: - Change the expected output, as the 'type' defaults to 'scsi_host' if 'name" specified now * tests/storagepoolxml2xmlout/pool-scsi-type-scsi-host.xml: * tests/storagepoolxml2xmlout/pool-scsi-type-fc-host.xml: - New test * tests/storagepoolxml2xmltest.c: - Include the test
-
- 19 7月, 2012 1 次提交
-
-
由 Sebastian Wiedenroth 提交于
This patch brings support to manage sheepdog pools and volumes to libvirt. It uses the "collie" command-line utility that comes with sheepdog for that. A sheepdog pool in libvirt maps to a sheepdog cluster. It needs a host and port to connect to, which in most cases is just going to be the default of localhost on port 7000. A sheepdog volume in libvirt maps to a sheepdog vdi. To create one specify the pool, a name and the capacity. Volumes can also be resized later. In the volume XML the vdi name has to be put into the <target><path>. To use the volume as a disk source for virtual machines specify the vdi name as "name" attribute of the <source>. The host and port information from the pool are specified inside the host tag. <disk type='network'> ... <source protocol="sheepdog" name="vdi_name"> <host name="localhost" port="7000"/> </source> </disk> To work right this patch parses the output of collie, so it relies on the raw output option. There recently was a bug which caused size information to be reported wrong. This is fixed upstream already and will be in the next release. Signed-off-by: NSebastian Wiedenroth <wiedi@frubar.net>
-
- 27 3月, 2012 1 次提交
-
-
由 Martin Kletzander 提交于
Return statements with parameter enclosed in parentheses were modified and parentheses were removed. The whole change was scripted, here is how: List of files was obtained using this command: git grep -l -e '\<return\s*([^()]*\(([^()]*)[^()]*\)*)\s*;' | \ grep -e '\.[ch]$' -e '\.py$' Found files were modified with this command: sed -i -e \ 's_^\(.*\<return\)\s*(\(\([^()]*([^()]*)[^()]*\)*\))\s*\(;.*$\)_\1 \2\4_' \ -e 's_^\(.*\<return\)\s*(\([^()]*\))\s*\(;.*$\)_\1 \2\3_' Then checked for nonsense. The whole command looks like this: git grep -l -e '\<return\s*([^()]*\(([^()]*)[^()]*\)*)\s*;' | \ grep -e '\.[ch]$' -e '\.py$' | xargs sed -i -e \ 's_^\(.*\<return\)\s*(\(\([^()]*([^()]*)[^()]*\)*\))\s*\(;.*$\)_\1 \2\4_' \ -e 's_^\(.*\<return\)\s*(\([^()]*\))\s*\(;.*$\)_\1 \2\3_'
-
- 04 2月, 2012 1 次提交
-
-
由 Eric Blake 提交于
The bulk of this patch was done with: sed -i 's/\(\bfree *(/VIR_FREE(/g' tests/*.c followed by fixing the few compile errors that resulted. * cfg.mk (exclude_file_name_regexp--sc_prohibit_raw_allocation): Remove tests from exemption. * tests/testutils.h: Add common header. * tests/commandhelper.c: Fix offenders. * tests/cputest.c: Likewise. * tests/domainsnapshotxml2xmltest.c: Likewise. * tests/interfacexml2xmltest.c: Likewise. * tests/networkxml2argvtest.c: Likewise. * tests/networkxml2xmltest.c: Likewise. * tests/nodedevxml2xmltest.c: Likewise. * tests/nodeinfotest.c: Likewise. * tests/nwfilterxml2xmltest.c: Likewise. * tests/qemuargv2xmltest.c: Likewise. * tests/qemuxml2argvtest.c: Likewise. * tests/qemuxml2xmltest.c: Likewise. * tests/qemuxmlnstest.c: Likewise. * tests/qparamtest.c: Likewise. * tests/sexpr2xmltest.c: Likewise. * tests/storagepoolxml2xmltest.c: Likewise. * tests/storagevolxml2xmltest.c: Likewise. * tests/testutils.c: Likewise. * tests/virshtest.c: Likewise. * tests/xencapstest.c: Likewise. * tests/xmconfigtest.c: Likewise. * tests/xml2sexprtest.c: Likewise.
-
- 01 5月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
Make virtTestLoadFile allocate the buffer to read the file into. Fix logic error in virtTestLoadFile, stop reading on the first empty line. Use virFileReadLimFD in virtTestCaptureProgramOutput to avoid manual buffer handling.
-
- 30 4月, 2011 1 次提交
-
-
由 Eric Blake 提交于
A few of the tests were missing basic sanity checks, while most of them were doing copy-and-paste initialization (in fact, some of them pasted the argc > 1 check more than once!). It's much nicer to do things in one common place, and minimizes the size of the next patch that fixes getcwd usage. * tests/testutils.h (EXIT_AM_HARDFAIL): New define. (progname, abs_srcdir): Define for all tests. (VIRT_TEST_MAIN): Change callback signature. * tests/testutils.c (virtTestMain): Do more common init. * tests/commandtest.c (mymain): Simplify. * tests/cputest.c (mymain): Likewise. * tests/esxutilstest.c (mymain): Likewise. * tests/eventtest.c (mymain): Likewise. * tests/hashtest.c (mymain): Likewise. * tests/networkxml2xmltest.c (mymain): Likewise. * tests/nodedevxml2xmltest.c (myname): Likewise. * tests/nodeinfotest.c (mymain): Likewise. * tests/nwfilterxml2xmltest.c (mymain): Likewise. * tests/qemuargv2xmltest.c (mymain): Likewise. * tests/qemuhelptest.c (mymain): Likewise. * tests/qemuxml2argvtest.c (mymain): Likewise. * tests/qemuxml2xmltest.c (mymain): Likewise. * tests/qparamtest.c (mymain): Likewise. * tests/sexpr2xmltest.c (mymain): Likewise. * tests/sockettest.c (mymain): Likewise. * tests/statstest.c (mymain): Likewise. * tests/storagepoolxml2xmltest.c (mymain): Likewise. * tests/storagevolxml2xmltest.c (mymain): Likewise. * tests/virbuftest.c (mymain): Likewise. * tests/virshtest.c (mymain): Likewise. * tests/vmx2xmltest.c (mymain): Likewise. * tests/xencapstest.c (mymain): Likewise. * tests/xmconfigtest.c (mymain): Likewise. * tests/xml2sexprtest.c (mymain): Likewise. * tests/xml2vmxtest.c (mymain): Likewise.
-
- 20 8月, 2010 1 次提交
-
-
由 Patrick Dignan 提交于
I wrote a patch to add support for listing the Vendor and Model of a storage pool in the storage pool XML. This would allow vendor extensions of specific devices. The patch includes a test for the new attributes as well. Patrick Dignan
-
- 09 6月, 2010 1 次提交
-
-
由 David Allan 提交于
* Fix broken rng schema * Add test input & output files
-
- 10 2月, 2010 1 次提交
-
-
由 Daniel P. Berrange 提交于
The virConnectPtr is no longer required for error reporting since that is recorded in a thread local. Remove use of virConnectPtr from all APIs in storage_conf.{h,c} and storage_encryption_conf.{h,c} and update all callers to match
-