- 17 5月, 2011 2 次提交
-
-
由 Cole Robinson 提交于
Some clients overwrite the error from the regex helper, or do half-baked error reporting with the exitstatus.
-
由 Cole Robinson 提交于
v2: Use virCommand auto-cleanup
-
- 04 5月, 2011 1 次提交
-
-
由 Eric Blake 提交于
clang didn't like the last increment to nargs. But why even track nargs ourselves, when virCommand does it for us? * src/storage/storage_backend_iscsi.c (virStorageBackendISCSIConnection): Switch to virCommand to avoid a dead-store warning on nargs.
-
- 05 4月, 2011 2 次提交
-
-
由 Matthias Bolte 提交于
-
由 Eric Blake 提交于
Even with -Wuninitialized (which is part of autobuild.sh --enable-compile-warnings=error), gcc does NOT catch this use of an uninitialized variable: { if (cond) goto error; int a = 1; error: printf("%d", a); } which prints 0 (supposing the stack started life wiped) if cond was true. Clang will catch it, but we don't use clang as often. Using gcc -Wjump-misses-init catches it, but also gives false positives: { if (cond) goto error; int a = 1; return a; error: return 0; } Here, a was never used in the scope of the error block, so declaring it after goto is technically fine (and clang agrees). However, given that our HACKING already documents a preference to C89 decl-before-statement, the false positive warning is enough of a prod to comply with HACKING. [Personally, I'd _really_ rather use C99 decl-after-statement to minimize scope, but until gcc can efficiently and reliably catch scoping and uninitialized usage bugs, I'll settle with the compromise of enforcing a coding standard that happens to reject false positives if it can also detect real bugs.] * acinclude.m4 (LIBVIRT_COMPILE_WARNINGS): Add -Wjump-misses-init. * src/util/util.c (__virExec): Adjust offenders. * src/conf/domain_conf.c (virDomainTimerDefParseXML): Likewise. * src/remote/remote_driver.c (doRemoteOpen): Likewise. * src/phyp/phyp_driver.c (phypGetLparNAME, phypGetLparProfile) (phypGetVIOSFreeSCSIAdapter, phypVolumeGetKey) (phypGetStoragePoolDevice) (phypVolumeGetPhysicalVolumeByStoragePool) (phypVolumeGetPath): Likewise. * src/vbox/vbox_tmpl.c (vboxNetworkUndefineDestroy) (vboxNetworkCreate, vboxNetworkDumpXML) (vboxNetworkDefineCreateXML): Likewise. * src/xenapi/xenapi_driver.c (getCapsObject) (xenapiDomainDumpXML): Likewise. * src/xenapi/xenapi_utils.c (createVMRecordFromXml): Likewise. * src/security/security_selinux.c (SELinuxGenNewContext): Likewise. * src/qemu/qemu_command.c (qemuBuildCommandLine): Likewise. * src/qemu/qemu_hotplug.c (qemuDomainChangeEjectableMedia): Likewise. * src/qemu/qemu_process.c (qemuProcessWaitForMonitor): Likewise. * src/qemu/qemu_monitor_text.c (qemuMonitorTextGetPtyPaths): Likewise. * src/qemu/qemu_driver.c (qemudDomainShutdown) (qemudDomainBlockStats, qemudDomainMemoryPeek): Likewise. * src/storage/storage_backend_iscsi.c (virStorageBackendCreateIfaceIQN): Likewise. * src/node_device/node_device_udev.c (udevProcessPCI): Likewise.
-
- 23 11月, 2010 4 次提交
-
-
由 Daniel P. Berrange 提交于
When libvirt starts up all storage pools default to the inactive state, even if the underlying storage is already active on the host. This introduces a new API into the internal storage backend drivers that checks whether a storage pool is already active. If the pool is active at libvirtd startup, the volume list will be immediately populated. * src/storage/storage_backend.h: New internal API for checking storage pool state * src/storage/storage_driver.c: Check whether a pool is active upon driver startup * src/storage/storage_backend_fs.c, src/storage/storage_backend_iscsi.c, src/storage/storage_backend_logical.c, src/storage/storage_backend_mpath.c, src/storage/storage_backend_scsi.c: Add checks for pool state
-
由 Daniel P. Berrange 提交于
Since the previous patch added support for parsing the output of the 'sendtargets' command, it is now trivial to support the storage pool discovery API. Given a hostname and optional portnumber and initiator IQN, the code can return a full list of storage pool source docs, each one representing a iSCSI target. * src/storage/storage_backend_iscsi.c: Wire up target auto-discovery
-
由 Daniel P. Berrange 提交于
The Linux iSCSI initiator toolchain has the dubious feature that if you ever run the 'sendtargets' command to merely query what targets are available from a server, the results will be recorded in /var/lib/iscsi. Any time the '/etc/init.d/iscsi' script runs in the future, it will then automatically login to all those targets. /etc/init.d/iscsi is automatically run whenever a NIC comes online. So from the moment you ask a server what targets are available, your client will forever more automatically try to login to all targets without ever asking if you actually want it todo this. To stop this stupid behaviour, we need to run iscsiadm --portal $PORTAL --target $TARGET --op update --name node.startup --value manual For every target on the server. * src/storage/storage_backend_iscsi.c: Disable automatic login for targets found as a result of a 'sendtargets' command
-
由 Daniel P. Berrange 提交于
The following series of patches are adding significant extra functionality to the iSCSI driver. THe current internal helper methods are not sufficiently flexible to cope with these changes. This patch refactors the code to avoid needing to have a virStoragePoolObjPtr instance as a parameter, instead passing individual target, portal and initiatoriqn parameters. It also removes hardcoding of port 3260 in the portal address, instead using the XML value if any. * src/storage/storage_backend_iscsi.c: Refactor internal helper methods
-
- 17 11月, 2010 1 次提交
-
-
由 Stefan Berger 提交于
Similarly to deprecating close(), I am now deprecating fclose() and introduce VIR_FORCE_FCLOSE() and VIR_FCLOSE(). Also, fdopen() is replaced with VIR_FDOPEN(). Most of the files are opened in read-only mode, so usage of VIR_FORCE_CLOSE() seemed appropriate. Others that are opened in write mode already had the fclose()< 0 check and I converted those to VIR_FCLOSE()< 0. I did not find occurrences of possible double-closed files on the way.
-
- 10 11月, 2010 1 次提交
-
-
由 Stefan Berger 提交于
Using automated replacement with sed and editing I have now replaced all occurrences of close() with VIR_(FORCE_)CLOSE() except for one, of course. Some replacements were straight forward, others I needed to pay attention. I hope I payed attention in all the right places... Please have a look. This should have at least solved one more double-close error.
-
- 03 8月, 2010 1 次提交
-
-
由 Aurelien ROUGEMONT 提交于
- a pure typo error and a wrong command referenced in an error message.
-
- 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
-
- 09 2月, 2010 3 次提交
-
-
由 Matthias Bolte 提交于
It was used for error reporting only.
-
由 Matthias Bolte 提交于
-
由 Matthias Bolte 提交于
-
- 02 2月, 2010 1 次提交
-
-
由 Jim Meyering 提交于
* src/qemu/qemu_monitor_text.c (qemuMonitorTextGetAllPCIAddresses): Use %s. * src/storage/storage_backend_iscsi.c (virStorageBackendCreateIfaceIQN): Likewise. * tools/virsh.c (cmdSecretSetValue): Likewise.
-
- 21 1月, 2010 1 次提交
-
-
由 David Allan 提交于
Allows the initiator to use a variety of IQNs rather than just the system IQN when creating iSCSI pools. * docs/schemas/storagepool.rng: extends the syntax with <iqn name="..."/> * src/conf/storage_conf.[ch]: read and stores the iqn name * src/storage/storage_backend_iscsi.[ch]: implement the IQN selection when detected
-
- 21 9月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
* daemon/qemud.c, src/Makefile.am: Adapt for changed paths * src/storage*.c, src/storage/*.h, src/parthelpre.c: Move to src/storage/
-
- 02 4月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 29 1月, 2009 1 次提交
-
-
由 Jim Meyering 提交于
* src/uml_conf.c (VIR_FROM_THIS): Define to VIR_FROM_UML. * src/xs_internal.c (VIR_FROM_THIS): Define to VIR_FROM_XEN. * src/xml.c (VIR_FROM_THIS): Define to VIR_FROM_XML. * src/stats_linux.c (VIR_FROM_THIS): Define to VIR_FROM_STATS_LINUX. * src/datatypes.c (VIR_FROM_THIS): Define to VIR_FROM_NONE. * src/lxc_conf.c (VIR_FROM_THIS): Define to VIR_FROM_LXC. * src/libvirt.c (VIR_FROM_THIS): Define to VIR_FROM_NONE. * src/node_device_conf.c (VIR_FROM_THIS): Define to VIR_FROM_NODEDEV. * src/openvz_conf.c (VIR_FROM_THIS): Define to VIR_FROM_OPENVZ. * src/openvz_driver.c (VIR_FROM_THIS): Define to VIR_FROM_OPENVZ. * src/conf.c (VIR_FROM_THIS): Define to VIR_FROM_CONF. Note: this loses config_filename:config_lineno diagnostics, but that's ok. * src/node_device.c (VIR_FROM_THIS): Define to VIR_FROM_NODEDEV. * src/sexpr.c (VIR_FROM_THIS): Define to VIR_FROM_SEXPR. * po/POTFILES.in: remove src/sexpr.c and src/lxc_conf.c
-
- 28 1月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 21 1月, 2009 2 次提交
-
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
- 23 12月, 2008 1 次提交
-
-
由 Guido Günther 提交于
-
- 28 11月, 2008 1 次提交
-
-
由 Chris Lalancette 提交于
really should be synchronizing against udev. This is generally done by a call to udevsettle, which is exactly what this patch implements for the storage backends that are likely to create new /dev nodes. I believe I've read that even after udevsettle, you are not guaranteed that devices are all the way created, so we still need the polling in the rest of the sources, but this should give us a much better chance of things existing as we expect. Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
- 17 11月, 2008 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 05 11月, 2008 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 03 11月, 2008 1 次提交
-
-
由 Chris Lalancette 提交于
ability to resolve any kind of volume path to the pool target volume path. For instance, if the pool was defined with a <target><path>/dev/disk/by-id</path></target> section, and one of the volumes is /dev/disk/by-id/scsi-S_beaf11, then you would be able to call virStorageVolLookupByPath("/dev/sdc"), and get the correct volume back. Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
- 16 10月, 2008 1 次提交
-
-
由 Chris Lalancette 提交于
iSCSI volumes. This is implemented in the virStorageBackendUpdateVolInfoFD function, so all future callers will automatically benefit. This is a somewhat large patch because the conversion of the virStorageBackendPartTableTypeToString necessitated a change to the formatToString and formatFromString function pointers, which caused fallout in other places in the storage stuff. The good news is that most of these callers are now converted over to the VIR_ENUM_IMPL, which means a lot of redundant code is now gone. Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
- 10 10月, 2008 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 08 8月, 2008 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 17 6月, 2008 5 次提交
-
-
由 Jim Meyering 提交于
-
由 Chris Lalancette 提交于
to only rely on sysfs for finding LUNs, given a session number. Along the way, it also fixes the bug where we wouldn't find LUNs for older kernels (with the block:sda format), and also fixes a race condition where we could try to find the LUN before udev has finished connecting it. This patch fixes a few different bugs: 1) We weren't finding LUNs on pre 2.6.24 kernels 2) libvirtd sysfs scanning was racing with udev, so we didn't always see LUNs 3) We weren't showing the 0'th LUN, although that can be a valid LUN Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
由 Chris Lalancette 提交于
first logging in; we don't need to do it for logout. Move the sendtarget command into the Login() function. Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
由 Chris Lalancette 提交于
--mode session" command. However, just running "iscsiadm --mode session" seems to work on all version of iscsiadm commands back to FC-6, so just use that. Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
由 Chris Lalancette 提交于
*not* virStorageReportError() if the fork()/exec() process it spawned returned a != 0 exit code. Rather, it returns the exitcode in this case, and it is up to the higher level to determine whether this is a fatal error or not. The use case for this change is in the iSCSI stuff; older versions of iscsiadm tools would return a failure when getting the session number, despite the command succeeding. Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
- 06 6月, 2008 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 23 5月, 2008 1 次提交
-
-
由 Richard W.M. Jones 提交于
* qemud/internal.h, qemud/qemud.h: Rename this file so it doesn't conflict with src/internal.h. * HACKING: Document how header files should be used. * qemud/Makefile.am: Add src/ directory to includes. * qemud/event.c, qemud/mdns.c, qemud/qemud.c, qemud/remote.c, qemud/remote_protocol.c, qemud/remote_protocol.h, qemud/remote_protocol.x, src/buf.c, src/libvirt.c, src/nodeinfo.c, src/qemu_conf.c, src/qemu_driver.c, src/stats_linux.c, src/storage_backend.c, src/storage_backend_fs.c, src/storage_backend_iscsi.c, src/storage_backend_logical.c, src/storage_conf.c, src/storage_driver.c, src/util.c, src/util.h, src/virsh.c, src/virterror.c, src/xend_internal.c, src/xml.c, tests/reconnect.c, tests/xmlrpctest.c, tests/qparamtest.c: Standardize use of header files. * docs/*, po/*: Rebuild docs.
-
- 11 4月, 2008 1 次提交
-
-
由 Jim Meyering 提交于
Done with these commands: git grep -l Local.variab|xargs \ perl -0x3b -pi -e 's,\n+/\*\n \* vim:(.|\n)*,\n,' git grep -l Local.variab|xargs \ perl -0x3b -pi -e 's,\n+/\*\n \* Local variables:\n(.|\n)*,\n,'
-