- 05 8月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
This configuration knob lets user to set the length of queue of connection requests waiting to be accept()-ed by the daemon. IOW, it just controls the @backlog passed to listen: int listen(int sockfd, int backlog);
-
- 11 7月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Convert the type of loop iterators named 'i', 'j', k', 'ii', 'jj', 'kk', to be 'size_t' instead of 'int' or 'unsigned int', also santizing 'ii', 'jj', 'kk' to use the normal 'i', 'j', 'k' naming Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 10 7月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
-
- 24 6月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Introduce annotations to all RPC messages to declare what access control checks are required. There are two new annotations defined: @acl: <object>:<permission> @acl: <object>:<permission>:<flagname> Declare the access control requirements for the API. May be repeated multiple times, if multiple rules are required. <object> is one of 'connect', 'domain', 'network', 'storagepool', 'interface', 'nodedev', 'secret'. <permission> is one of the permissions in access/viraccessperm.h <flagname> indicates the rule only applies if the named flag is set in the API call @aclfilter: <object>:<permission> Declare an access control filter that will be applied to a list of objects being returned by an API. This allows the returned list to be filtered to only show those the user has permissions against Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 05 6月, 2013 1 次提交
-
-
由 Ján Tomko 提交于
Change the socket path to match the one used by lockd driver. https://bugzilla.redhat.com/show_bug.cgi?id=968128
-
- 21 5月, 2013 1 次提交
-
-
由 Osier Yang 提交于
-
- 09 5月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
-
- 08 5月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Since PIDs can be reused, polkit prefers to be given a (PID,start time) pair. If given a PID on its own, it will attempt to lookup the start time in /proc/pid/stat, though this is subject to races. It is safer if the client app resolves the PID start time itself, because as long as the app has the client socket open, the client PID won't be reused. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 03 5月, 2013 3 次提交
-
-
由 Daniel P. Berrange 提交于
A 'uri' parameter was added for the benefit of sanlock. This causes a warning in the lockd driver though 2013-05-03 13:20:35.347+0000: 28403: error : virLockManagerLockDaemonNew:482 : internal error Unexpected parameter uri for object Ignore this parameter, since lockd does not require it and it is harmless if not used. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The lockd plugin for the lock manager was not correctly handling the release of resource locks. This meant that during migration, or when pausing a VM, the locks would not get released. This in turn made it impossible to resume the domain, or finish migration
-
由 Laine Stump 提交于
commit 7c9a2d88 missed adding in a few #include "virstring.h"s, causing builds to fail.
-
- 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.
-
- 23 4月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Currently the RPC protocol files can contain annotations after the protocol enum eg REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_CHILDREN_NAMES = 247, /* autogen autogen priority:high */ This is not very extensible as the number of annotations grows. Change it to use /** * @generate: both * @priority: high */ REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_CHILDREN_NAMES = 247, Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 30 1月, 2013 1 次提交
-
-
由 Martin Kletzander 提交于
Adding dots inside "exempli gratia" where missing. While on that, I took the liberty of changing it where found with simple grep.
-
- 25 1月, 2013 1 次提交
-
-
由 John Ferlan 提交于
-
- 17 1月, 2013 2 次提交
-
-
由 Peter Krempa 提交于
No need to check the run_dir variable twice for NULL.
-
由 John Ferlan 提交于
Both 'dir' and 'path' were not free'd on successful return
-
- 16 1月, 2013 1 次提交
-
-
由 John Ferlan 提交于
In virLockSpaceProtocolDispatchNew() the returned value of lockspace from virLockDaemonFindLockSpace() is overwritten by the virLockSpaceNew() return. Coverity complains that it's unused. In virLockSpaceProtocolDispatchCreateLockSpace() lockspace is also overwritten in a similar manner resulting in the same Coverity message.
-
- 14 1月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 09 1月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Add checks for existence of GNUTLS and automatically disable it if not found. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 08 1月, 2013 1 次提交
-
-
由 Eric Blake 提交于
POSIX does not guarantee whether uid_t and gid_t are signed or unsigned, nor does it guarantee whether they are smaller, same size, or larger than int (or even the same size as one another). Therefore, it is possible to have platforms where '(uid_t)-1==-1' is false or where 'uid = gid = -1' sets uid to the wrong value, thanks to integer promotion rules. The only portable way to use the placeholder value of these two types is to always use a cast. Thankfully, the issue is mostly theoretical - sanlock only compiles on Linux for now, and on Linux, these types do not suffer from strange promotion problems. * src/locking/lock_driver_sanlock.c (virLockManagerSanlockSetupLockspace, virLockManagerSanlockInit) (virLockManagerSanlockCreateLease): Cast -1 to proper type before comparing with uid_t or gid_t.
-
- 07 1月, 2013 2 次提交
-
-
由 Eric Blake 提交于
virtlockd.service could be installed to a configurable root, but virtlockd.socket was hardcoded to installation into a distro. * src/Makefile.am (virtlockd.service, virtlockd.socket): Drop unused substitutions. * src/locking/virtlockd.socket.in (ListenStream): Don't hard-code /var.
-
由 Eric Blake 提交于
We had several different styles of .in conversion in our Makefiles: ALLCAPS, @ALLCAPS@, @lower@, ::lower:: Canonicalize on one form, to make it easier to copy and paste between .in files. Also, we were using some non-portable sed constructs: \@ is an undefined escape sequence (it happens to be @ itself in GNU sed, but POSIX allows it to mean something else), as well as risky behavior (failure to consistently quote things means a space in $(sysconfdir) could throw things off; also, Autoconf recommends using | rather than , or ! in the s||| operator, because | has to be quoted in shell and is therefore less likely to appear in file names than , or !). Fix all of these uses to follow the same syntax. * daemon/libvirtd.8.in: Switch to @var@. * tools/virt-xml-validate.in: Likewise. * tools/virt-pki-validate.in: Likewise. * src/locking/virtlockd.init.in: Likewise. * daemon/Makefile.am: Prefer | over ! in sed. (libvirtd.8): Prefer consistent substitution. (libvirtd.init, libvirtd.service): Avoid non-portable sed. * tools/Makefile.am (libvirt-guests.sh, libvirt-guests.init) (libvirt-guests.service): Likewise. (virt-xml-validate, virt-pki-validate, virt-sanlock-cleanup): Prefer consistent capitalization. * src/Makefile.am (virtlockd.init, virtlockd.service) (virtlockd.socket): Prefer consistent substitution.
-
- 28 12月, 2012 1 次提交
-
-
由 Michal Privoznik 提交于
Since sanlock doesn't run under root:root, we have chown()'ed the __LIBVIRT__DISKS__ lease file to the user:group defined in the sanlock config. However, when writing the patch I've forgot about lease files for each disk (this is the /var/lib/libvirt/sanlock/<md5>) file.
-
- 21 12月, 2012 7 次提交
-
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
- 14 12月, 2012 1 次提交
-
-
由 Michal Privoznik 提交于
Currently, if sanlock is already registering a lockspace other libvirtd instances (from other hosts) obtain -EINPROGRESS. On sufficiently new sanlock, sanlock_inq_lockspace() is called, which suspend execution until lockspace state is changed. With current libvirt implementation, we fail to retry adding the lockspace again but continue in error path. Therefore we produce meaningless error message: virLockManagerSanlockSetupLockspace:363 : Unable to add lockspace /var/lib/libvirt/sanlock/__LIBVIRT__DISKS__: Success qemudLoadDriverConfig:558 : Failed to load lock manager sanlock We should try to re-add the lockspace after its state change to be sure it was added successfully. In fact, with sufficiently new sanlock we can just avoid dummy usleep() which is used if there's no inquire API.
-
- 13 12月, 2012 8 次提交
-
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
The default lockd driver behavour is to acquire leases directly on the disk files. This introduces an alternative mode, where leases are acquire indirectly on a file that is based on a SHA256 hash of the disk filename. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
This adds a 'lockd' lock driver which is just a client which talks to the lockd daemon to perform all locking. This will be the default lock driver for any hypervisor which needs one. * src/Makefile.am: Add lockd.so plugin * src/locking/lock_driver_lockd.c: Lockd driver impl Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The virtlockd daemon maintains file locks on behalf of libvirtd and any VMs it is running. These file locks must be held for as long as any VM is running. If virtlockd itself ever quits, then it is expected that a node would be fenced/rebooted. Thus to allow for software upgrads on live systemd, virtlockd needs the ability to re-exec() itself. Upon receipt of SIGUSR1, virtlockd will save its current live state out to a file /var/run/virtlockd-restart-exec.json It then re-exec()'s itself with exactly the same argv as it originally had, and loads the state file, reconstructing any objects as appropriate. The state file contains information about all locks held and all network services and clients currently active. An example state document is { "server": { "min_workers": 1, "max_workers": 20, "priority_workers": 0, "max_clients": 20, "keepaliveInterval": 4294967295, "keepaliveCount": 0, "keepaliveRequired": false, "services": [ { "auth": 0, "readonly": false, "nrequests_client_max": 1, "socks": [ { "fd": 6, "errfd": -1, "pid": 0, "isClient": false } ] } ], "clients": [ { "auth": 0, "readonly": false, "nrequests_max": 1, "sock": { "fd": 9, "errfd": -1, "pid": 0, "isClient": true }, "privateData": { "restricted": true, "ownerPid": 1722, "ownerId": 6, "ownerName": "f18x86_64", "ownerUUID": "97586ba9-df27-9459-c806-f016c8bbd224" } }, { "auth": 0, "readonly": false, "nrequests_max": 1, "sock": { "fd": 10, "errfd": -1, "pid": 0, "isClient": true }, "privateData": { "restricted": true, "ownerPid": 1784, "ownerId": 7, "ownerName": "f16x86_64", "ownerUUID": "7b8e5e42-b875-61e9-b981-91ad8fa46979" } } ] }, "defaultLockspace": { "resources": [ { "name": "/var/lib/libvirt/images/f16x86_64.raw", "path": "/var/lib/libvirt/images/f16x86_64.raw", "fd": 14, "lockHeld": true, "flags": 0, "owners": [ 1784 ] }, { "name": "/var/lib/libvirt/images/shared.img", "path": "/var/lib/libvirt/images/shared.img", "fd": 12, "lockHeld": true, "flags": 1, "owners": [ 1722, 1784 ] }, { "name": "/var/lib/libvirt/images/f18x86_64.img", "path": "/var/lib/libvirt/images/f18x86_64.img", "fd": 11, "lockHeld": true, "flags": 0, "owners": [ 1722 ] } ] }, "lockspaces": [ ], "magic": "30199" } Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
This enhancement virtlockd so that it can receive a pre-opened UNIX domain socket from systemd at launch time, and adds the systemd service/socket unit files * daemon/libvirtd.service.in: Require virtlockd to be running * libvirt.spec.in: Add virtlockd systemd files * src/Makefile.am: Install systemd files * src/locking/lock_daemon.c: Support socket activation * src/locking/virtlockd.service.in, src/locking/virtlockd.socket.in: systemd unit files * src/rpc/virnetserverservice.c, src/rpc/virnetserverservice.h: Add virNetServerServiceNewFD() method * src/rpc/virnetsocket.c, src/rpc/virnetsocket.h: Add virNetSocketNewListenFD method Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Introduce a lock_daemon_dispatch.c file which implements the server side dispatcher the RPC APIs previously defined in the lock protocol. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The virtlockd daemon will be responsible for managing locks on virtual machines. Communication will be via the standard RPC infrastructure. This provides the XDR protocol definition * src/locking/lock_protocol.x: Wire protocol for virtlockd * src/Makefile.am: Include lock_protocol.[ch] in virtlockd Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-