- 21 5月, 2013 1 次提交
-
-
由 Osier Yang 提交于
-
- 10 5月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
-
- 08 5月, 2013 1 次提交
-
-
由 Osier Yang 提交于
If the volume is of a clustered volume group, and not active, the related pool APIs fails on opening /dev/vg/lv. If the volume is suspended, it hangs on open(2) the volume. Though the best solution is to expose the volume status in volume XML, and even better to provide API to activate/deactivate the volume, but it's not the work I want to touch currently. Volume status in other status is just fine to skip. About the 5th field of lv_attr (from man lvs[8]) <quote> 5 State: (a)ctive, (s)uspended, (I)nvalid snapshot, invalid (S)uspended snapshot, snapshot (m)erge failed,suspended snapshot (M)erge failed, mapped (d)evice present without tables, mapped device present with (i)nactive table </quote>
-
- 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.
-
- 29 3月, 2013 1 次提交
-
-
由 Martin Kletzander 提交于
When logical pool has no PVs associated with itself (user-created), virCommandFree(cmd) is called twice with the same pointer and that causes a segfault in daemon.
-
- 06 3月, 2013 1 次提交
-
-
由 Jiri Denemark 提交于
This patch plugs two memory leaks, removes some useless and confusing constructs and renames renames "cleanup" label as "error" since it is only used for error path rather then being common for both success and error paths.
-
- 18 1月, 2013 1 次提交
-
-
由 Atsushi Kumagai 提交于
When virStorageBackendLogicalCreateVol() creates a snapshot for a logical volume with backingStore element, it fails with the message below: 2013-01-17 03:10:18.869+0000: 1967: error : virCommandWait:2345 : internal error Child process (/sbin/lvcreate --name lvm-snapshot -L 51200K -s=/dev/lvm-pool/lvm-volume) unexpected exit status 3: /sbin/lvcreate: invalid option -- '=' Error during parsing of command line. This is because virCommandAddArgPair() uses '=' to connect the two parameters, it's unsuitable for -s option of the lvcreate. Signed-off-by: NAtsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
-
- 15 1月, 2013 1 次提交
-
-
由 John Ferlan 提交于
Commit-id 'afc4631b' added the regfree(reg) to free resources alloc'd during regcomp; however, reg still needed to be VIR_FREE()'d. The call to regfree() also didn't account for possible NULL value. Reformatted the call to be closer to usage.
-
- 08 1月, 2013 1 次提交
-
-
由 Ján Tomko 提交于
Use regfree instead of VIR_FREE.
-
- 21 12月, 2012 4 次提交
-
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
- 26 11月, 2012 1 次提交
-
-
由 Ján Tomko 提交于
Commit 258e06c8 removed setting of the volume type to VIR_STORAGE_VOL_BLOCK, which leads to failures in storageVolumeCreateXMLFrom. The type (and target.format) of the volume was set to zero. In virStorageBackendGetBuildVolFromFunction, this gets interpreted as VIR_STORAGE_FILE_NONE and the qemu-img tool is called with unknown "none" format. Bug: https://bugzilla.redhat.com/show_bug.cgi?id=879780
-
- 17 10月, 2012 2 次提交
-
-
由 Cole Robinson 提交于
On F17 at least, this command fails: $ sudo /usr/sbin/lvcreate --name sparsetest -L 0K --virtualsize 16384K vgvirt Unable to create new logical volume with no extents Which is unfortunate since allocation=0 is what virt-manager tries to use by default. Rather than telling the user 'don't do that', let's just give them the smallest allocation possible if alloc=0 is requested. https://bugzilla.redhat.com/show_bug.cgi?id=866481
-
由 Cole Robinson 提交于
Before: $ sudo virsh vol-create-as --pool vgvirt sparsetest --capacity 16M --allocation 0 error: Failed to create vol sparsetest error: internal error Child process (/usr/sbin/lvchange -aln vgvirt/sparsetest) unexpected exit status 5: One or more specified logical volume(s) not found. After: $ sudo virsh vol-create-as --pool vgvirt sparsetest --capacity 16M --allocation 0 error: Failed to create vol sparsetest error: internal error Child process (/usr/sbin/lvcreate --name sparsetest -L 0K --virtualsize 16384K vgvirt) unexpected exit status 5: Unable to create new logical volume with no extents
-
- 21 9月, 2012 1 次提交
-
-
由 Eric Blake 提交于
https://www.gnu.org/licenses/gpl-howto.html recommends that the 'If not, see <url>.' phrase be a separate sentence. * tests/securityselinuxhelper.c: Remove doubled line. * tests/securityselinuxtest.c: Likewise. * globally: s/; If/. If/
-
- 23 7月, 2012 1 次提交
-
-
由 Osier Yang 提交于
Per the FSF address could be changed from time to time, and GNU recommends the following now: (http://www.gnu.org/licenses/gpl-howto.html) You should have received a copy of the GNU General Public License along with Foobar. If not, see <http://www.gnu.org/licenses/>. This patch removes the explicit FSF address, and uses above instead (of course, with inserting 'Lesser' before 'General'). Except a bunch of files for security driver, all others are changed automatically, the copyright for securify files are not complete, that's why to do it manually: src/security/security_selinux.h src/security/security_driver.h src/security/security_selinux.c src/security/security_apparmor.h src/security/security_apparmor.c src/security/security_driver.c
-
- 19 7月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
Update the storage driver to use virReportError instead of the virStorageReportError custom macro Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 12 7月, 2012 2 次提交
-
-
由 Daniel P. Berrange 提交于
When calling 'lvcreate' if specifying both the '-L' and '--virtualsize' options, the latter will be treated as the capacity and the former as the allocation. This can be used to support sparse volume creation. In addition, when listing volumes it is necessary to include the 'size' field in lvs output, so that we can detect sparse volume allocation correctly. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
To make it easier to dynamically change the command line ARGV, switch all storage code over to use virCommandPtr APIs for running programs Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 16 4月, 2012 1 次提交
-
-
由 Cole Robinson 提交于
lvcreate want's the parent pool's name, not the pool path lvchange and lvremove want lv specified as $vgname/$lvname This largely worked before because these commands strip off a starting /dev. But https://bugzilla.redhat.com/show_bug.cgi?id=714986 is from a user using a 'nested VG' that was having problems. I couldn't find any info on nested LVM and the reporter never responded, but I reproduced with XML that specified a valid source name, and set target path to a symlink.
-
- 13 12月, 2011 1 次提交
-
-
由 Osier Yang 提交于
If the vol object is newly created, it increases the volumes count, but doesn't decrease the volumes count when do cleanup. It can cause libvirtd to crash when one trying to free the volume objects like: for (i = 0; i < pool->volumes.count; i++) virStorageVolDefFree(pool->volumes.objs[i]); It's more reliable if we add the newly created vol object in the end.
-
- 12 12月, 2011 1 次提交
-
-
由 Rommer 提交于
Current "-ay | -an" has problems on pool starting/refreshing if the volumes are clustered. Rommer has posted a patch to list 2 months ago. https://www.redhat.com/archives/libvir-list/2011-October/msg01116.html But IMO we shouldn't skip the inactived vols. So this is a squashed patch by Rommer. Signed-off-by: NRommer <rommer@active.by>
-
- 22 11月, 2011 1 次提交
-
-
由 Chang Liu 提交于
virStorageBackendLogicalDeleteVol() could not remove the lv with error "could not remove open logical volume" sometimes. Generally it's caused by the volume is still active, even if lvremove tries to remove it with option "--force". This patch is to fix it by disbale the lv first using "lvchange -aln" and "lvremove -f" afterwards if the direct "lvremove -f" failed.
-
- 21 11月, 2011 1 次提交
-
-
由 Osier Yang 提交于
lvs outputs "[$lvname_vorigin]" for the virtual snapshot lv (created with "--virtualsize"), and the original device pointed by "$lvname_vorigin" is just for lvm internal use, one should never use it. Per lvm's nameing rules, "[" is not valid as part of the vg/lv name. (man 8 lvm). <quote> VALID NAMES The following characters are valid for VG and LV names: a-z A-Z 0-9 + _ . - VG and LV names cannot begin with a hyphen. There are also various reserved names that are used internally by lvm that can not be used as LV or VG names. A VG cannot be called anything that exists in /dev/ at the time of creation, nor can it be called '.' or '..'. A LV cannot be called '.' '..' 'snapshot' or 'pvmove'. The LV name may also not con‐ tain the strings '_mlog' or '_mimage' </quote> So we can skip the set the lv's backingStore by checking if the name begins with a "[".
-
- 25 10月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Splitting into two functions allows the user to call the right function, rather than having to remember that a *Free function is an exception to the rule. * src/conf/storage_conf.h (virStoragePoolSourceClear): New function. * src/libvirt_private.syms (storage_conf.h): Export it. * src/conf/storage_conf.c (virStoragePoolSourceFree): Split... (virStoragePoolSourceClear): ...into new function. (virStoragePoolDefFree, virStoragePoolDefParseSourceString): Update callers. * src/test/test_driver.c (testStorageFindPoolSources): Likewise. * src/storage/storage_backend_fs.c (virStorageBackendFileSystemNetFindPoolSourcesFunc) (virStorageBackendFileSystemNetFindPoolSources): Likewise. * src/storage/storage_backend_iscsi.c (virStorageBackendISCSIFindPoolSources): Likewise. * src/storage/storage_backend_logical.c (virStorageBackendLogicalFindPoolSources): Likewise.
-
- 14 10月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Detected by Coverity. Present since commit 82c1740a. * src/storage/storage_backend_logical.c (virStorageBackendLogicalMakeVol): Fix leak.
-
- 11 10月, 2011 1 次提交
-
-
由 Eric Blake 提交于
I noticed a couple typos in recent commits, and fixed the remaining instances of them. * docs/internals/command.html.in: Fix spelling errors. * include/libvirt/libvirt.h.in (virConnectDomainEventCallback): Likewise. * python/libvirt-override.py (virEventAddHandle): Likewise. * src/lxc/lxc_container.c (lxcContainerChild): Likewise. * src/util/hash.c (virHashCreateFull): Likewise. * src/storage/storage_backend_logical.c (virStorageBackendLogicalMakeVol): Likewise. * src/esx/esx_driver.c (esxFormatVMXFileName): Likewise. * src/vbox/vbox_tmpl.c (vboxIIDIsEqual_v3_x): Likewise.
-
- 10 10月, 2011 1 次提交
-
-
由 Osier Yang 提交于
* src/storage/storage_backend_logical.c: If a logical vol is created as striped. (e.g. --stripes 3), the "device" field of lvs output will have multiple fileds which are seperated by comma. Thus the RE we write in the codes will not work well anymore. E.g. (lvs output for a stripped vol, uses "#" as seperator here): test_stripes##fSLSZH-zAS2-yAIb-n4mV-Al9u-HA3V-oo9K1B#\ /dev/sdc1(10240),/dev/sdd1(0)#42949672960#4194304 The RE we use: const char *regexes[] = { "^\\s*(\\S+),(\\S*),(\\S+),(\\S+)\\((\\S+)\\),(\\S+),([0-9]+),?\\s*$" }; Also the RE doesn't match the "devices" field of striped vol properly, it contains multiple "device path" and "offset". This patch mainly does: 1) Change the seperator into "#" 2) Change the RE for "devices" field from "(\\S+)\\((\\S+)\\)" into "(\\S+)". 3) Add two new options for lvs command, (segtype, stripes) 4) Extend the RE to match the value for the two new fields. 5) Parse the "devices" field seperately in virStorageBackendLogicalMakeVol, multiple "extents" info are generated if the vol is striped. The number of "extents" is equal to the stripes number of the striped vol. A incidental fix: (virStorageBackendLogicalMakeVol) Free "vol" if it's new created and there is error. Demo on striped vol with the patch applied: % virsh vol-dumpxml /dev/test_vg/vol_striped2 <volume> <name>vol_striped2</name> <key>QuWqmn-kIkZ-IATt-67rc-OWEP-1PHX-Cl2ICs</key> <source> <device path='/dev/sda5'> <extent start='79691776' end='88080384'/> </device> <device path='/dev/sda6'> <extent start='62914560' end='71303168'/> </device> </source> <capacity>8388608</capacity> <allocation>8388608</allocation> <target> <path>/dev/test_vg/vol_striped2</path> <permissions> <mode>0660</mode> <owner>0</owner> <group>6</group> <label>system_u:object_r:fixed_disk_device_t:s0</label> </permissions> </target> </volume> RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=727474
-
- 01 10月, 2011 1 次提交
-
-
由 Serge E. Hallyn 提交于
If the regexes supported (?:pvs)?, then we could handle this by optionally matching but not returning the initial command name. But it doesn't. So add a new char* argument to virStorageBackendRunProgRegex(). If that argument is NULL then we act as usual. Otherwise, if the string at that argument is found at the start of a returned line, we drop that before running the regex. With this patch, virt-manager shows me lvs with command_names 1 or 0. The definitions of PVS_BASE etc may want to be moved into the configure scripts (though given how PVS is found, IIUC that could only happen if pvs was a link to pvs_real), but in any case no sense dealing with that until we're sure this is an ok way to handle it. Signed-off-by: NSerge Hallyn <serge.hallyn@canonical.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 22 9月, 2011 1 次提交
-
-
由 Osier Yang 提交于
Related #BZ: https://bugzilla.redhat.com/show_bug.cgi?id=702260. There are two problems described in the BZ: 1) "Can't remove open logical volume". 2) "Unable to deactivate logical volume "foo"" This patch just intends to fix 2), as 1) is expected if the vol is still used by something, and you never known if "lvchange -an" will fail or not either (sometime, it will succeed, sometimes not). We'd better not look for trouble, :-) For 2), that's caused by race between lvremove and udev event handling, the only workable way now is to wait the events handling are finished, though it might introduce latencies, as "udevadmin settle" exits after *all* events are handled, it's the only way we can fix the racing in libvirt layer. See https://bugzilla.redhat.com/show_bug.cgi?id=570359 for more details.
-
- 01 9月, 2011 1 次提交
-
-
由 Osier Yang 提交于
Commit 0376f4a6 intended to fix incorrect use of VIR_ERR_NO_SUPPORT, but replacing it with VIR_ERR_OPERATION_INVALID is not proper either.
-
- 23 8月, 2011 1 次提交
-
-
由 Osier Yang 提交于
-
- 19 8月, 2011 1 次提交
-
-
由 Michal Privoznik 提交于
Although we are flushing cache after some critical writes (e.g. volume creation), after some others we do not (e.g. volume cloning). This patch fix this issue. That is for volume cloning, writing header of logical volume, and storage wipe.
-
- 22 7月, 2011 1 次提交
-
-
由 Eric Blake 提交于
In preparation for a future patch adding new virFile APIs. * src/util/files.h, src/util/files.c: Move... * src/util/virfile.h, src/util/virfile.c: ...here, and rename functions to virFile prefix. Macro names are intentionally left alone. * *.c: All '#include "files.h"' uses changed. * src/Makefile.am (UTIL_SOURCES): Reflect rename. * cfg.mk (exclude_file_name_regexp--sc_prohibit_close): Likewise. * src/libvirt_private.syms: Likewise. * docs/hacking.html.in: Likewise. * HACKING: Regenerate.
-
- 13 7月, 2011 1 次提交
-
-
由 Eric Blake 提交于
* src/storage/storage_backend.c (virStorageBackendCreateBlockFrom) (virStorageBackendCreateQemuImg) (virStorageBackendCreateQcowCreate): Reject unknown flags. * src/storage/storage_backend_disk.c (virStorageBackendDiskBuildPool) (virStorageBackendDiskDeleteVol): Likewise. * src/storage/storage_backend_fs.c (virStorageBackendFileSystemNetFindPoolSources) (virStorageBackendFileSystemBuild) (virStorageBackendFileSystemDelete, createFileDir) (virStorageBackendFileSystemVolBuildFrom) (virStorageBackendFileSystemVolDelete): Likewise. * src/storage/storage_backend_iscsi.c (virStorageBackendISCSIFindPoolSources): Likewise. * src/storage/storage_backend_logical.c (virStorageBackendLogicalFindPoolSources) (virStorageBackendLogicalBuildPool) (virStorageBackendLogicalDeletePool) (virStorageBackendLogicalDeleteVol): Likewise. * src/storage/storage_driver.c (storageOpen, storagePoolCreate) (storagePoolDefine, storagePoolRefresh, storagePoolGetXMLDesc) (storageVolumeCreateXML, storageVolumeCreateXMLFrom) (storageVolumeGetXMLDesc): Likewise.
-
- 08 6月, 2011 1 次提交
-
-
由 Cole Robinson 提交于
Seems reasonable to have all command wrappers in the same place v2: Dont move SetInherit v3: Comment spelling fix Adjust WARN0 comment Remove spurious #include movement Don't include sys/types.h Combine virExec enums Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 17 5月, 2011 1 次提交
-
-
由 Cole Robinson 提交于
Some clients overwrite the error from the regex helper, or do half-baked error reporting with the exitstatus.
-
- 12 5月, 2011 1 次提交
-
-
由 Lai Jiangshan 提交于
These VIR_XXXX0 APIs make us confused, use the non-0-suffix APIs instead. How do these coversions works? The magic is using the gcc extension of ##. When __VA_ARGS__ is empty, "##" will swallow the "," in "fmt," to avoid compile error. example: origin after CPP high_level_api("%d", a_int) low_level_api("%d", a_int) high_level_api("a string") low_level_api("a string") About 400 conversions. 8 special conversions: VIR_XXXX0("") -> VIR_XXXX("msg") (avoid empty format) 2 conversions VIR_XXXX0(string_literal_with_%) -> VIR_XXXX(%->%%) 0 conversions VIR_XXXX0(non_string_literal) -> VIR_XXXX("%s", non_string_literal) (for security) 6 conversions Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
-