- 01 3月, 2016 1 次提交
-
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=872166 When the login session doesn't have an ssh -X type display agent in order for libvirtd to run the polkit session authentication, attempts to run 'virsh -c qemu:///system list' from an unauthorized user (or one that isn't part of the libvirt /etc/group) will fail with the following error from libvirtd: error: authentication unavailable: no polkit agent available to authenticate action 'org.libvirt.unix.manage' In order to handle the local authentication, we will use the new virPolkitAgentCreate API in order to create a text based authentication agent for our non readonly session to authenticate with. The new code will execute in a loop allowing 5 failures to authenticate before failing out. With this patch in place, the following occurs: $ virsh -c qemu:///system list ==== AUTHENTICATING FOR org.libvirt.unix.manage === System policy prevents management of local virtualized systems Authenticating as: Some User (SUser) Password: ==== AUTHENTICATION COMPLETE === Id Name State ---------------------------------------------------- 1 somedomain running $
-
- 26 2月, 2016 1 次提交
-
-
由 Nitesh Konkar 提交于
Signed-off-by: NNitesh Konkar <nitkon12@linux.vnet.ibm.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 22 2月, 2016 2 次提交
-
-
由 Michal Privoznik 提交于
Since we have the macro there's no need for us to unwind it by hand and check for mutually exclusive flags ourselves. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
We have macros that check and reject mutually exclusive parameters to our commands. Use those instead of if-else tree. At the same time, the variable @current becomes useless therefore it is dropped. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 19 2月, 2016 2 次提交
-
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
Rather than setting flags to -1 if none were specified, move the logic to use the old API to the place where we need to decide. It simplifies the logic a bit.
-
- 18 2月, 2016 2 次提交
-
-
由 Ján Tomko 提交于
Use virBufferTrim to strip the extra newline at the end of the message instead of open-coding it after the buffer's string is formatted.
-
由 Peter Krempa 提交于
Since the code is changing the source image path by modifying the existing XML snippet the <backingStore> stays in place. As <backingStore> is relevant to the <source> part of the image, the update of that part makes the element invalid. CD/floppy images usually don't have a backing chain and the element is currently ignored though but it might start being used in the future so let's start behaving correctly. Drop the <backingStore> subtree once we want to update the XML. Before this patch, you'd get: $ virsh change-media --eject --print-xml 10 hdc <disk type="file" device="cdrom"> <driver name="qemu" type="qcow2"/> <backingStore type="file" index="1"> <format type="qcow2"/> <source file="/var/lib/libvirt/images/vm.1436949097"/> <backingStore/> </backingStore> <target dev="hdc" bus="ide"/> ... </disk> After: $ virsh change-media --eject --print-xml 10 hdc <disk type="file" device="cdrom"> <driver name="qemu" type="qcow2"/> <target dev="hdc" bus="ide"/> ... </disk>
-
- 17 2月, 2016 1 次提交
-
-
由 Erik Skultety 提交于
Since we introduced listing API earlier in these series, it's time to wire up the API to the virt-admin client. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
- 15 2月, 2016 3 次提交
-
-
由 Ján Tomko 提交于
Replace all occurrences of VMWare outside the news.
-
由 Peter Krempa 提交于
The macro would eat the first parameter. In some cases the format string for vshPrint was eaten. In other cases the calls referenced variables which did not exist in the given context. Avoid errors by doing compile time checking.
-
由 Peter Krempa 提交于
When we hit OOM it doesn't really make sense to format the error message by attempting to allocate it. Introduce a simple helper that prints a static message and terminates the execution.
-
- 12 2月, 2016 2 次提交
-
-
由 Michal Privoznik 提交于
We have the same argument to many other commands that produce an XML based on what user typed. But unfortunately vol-create-as was missing it. Maybe nobody had needed it yet. Well, I did just now. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
The way we usually write functions is that we start the work and if something goes bad we goto cleanup and roll back there. Or just free resources that are no longer needed. Do the same here. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 04 2月, 2016 1 次提交
-
-
由 Roman Bogorodskiy 提交于
Make 'virsh -V' list ZFS storage backend if it's enabled.
-
- 02 2月, 2016 4 次提交
-
-
由 Michael Chapman 提交于
After a block job hits 100%, we only need to apply a timeout waiting for a block job event if exactly one of the BLOCK_JOB or BLOCK_JOB_2 callbacks were able to be registered. If neither callback could be registered, there's clearly no need for a timeout. If both callbacks were registered, then we're guaranteed to eventually get one of the events. The path being used by virsh must be exactly the source path or target device in the domain's disk definition, and these are the respective strings sent back in these two events. Signed-off-by: NMichael Chapman <mike@very.puzzling.org>
-
由 Michael Chapman 提交于
If virTimeMillisNow() fails, the SIGINT action must be reset back to its previous state. Signed-off-by: NMichael Chapman <mike@very.puzzling.org>
-
由 Michael Chapman 提交于
When waiting for a block job, the various statuses (COMPLETED, READY, CANCELED, etc.) should all be treated consistently by having the loop be exited with "break". Use "goto cleanup" for the error cases only, when no block job status is available. Signed-off-by: NMichael Chapman <mike@very.puzzling.org>
-
由 Michael Chapman 提交于
There is no need to call virshPrintJobProgress() unless the block job's cur or end cursors have changed since the last iteration. Signed-off-by: NMichael Chapman <mike@very.puzzling.org>
-
- 30 1月, 2016 1 次提交
-
-
由 Wido den Hollander 提交于
This new algorithm adds support for wiping volumes using TRIM. It does not overwrite all the data in a volume, but it tells the backing storage pool/driver that all bytes in a volume can be discarded. It depends on the backing storage pool how this is handled. A SCSI backend might send UNMAP commands to remove all data present on a LUN. A Ceph backend might use rbd_discard() to instruct the Ceph cluster that all data on that RBD volume can be discarded. Signed-off-by: NWido den Hollander <wido@widodh.nl>
-
- 26 1月, 2016 3 次提交
-
-
由 Luyao Huang 提交于
After commit 57177f1a, the cpu-stats command format change to: CPU0: cpu_time 14401.507878990 seconds vcpu_time 14378732785511 vcpu_time is not user friendly. After this patch, it will change back: CPU0: cpu_time 14401.507878990 seconds vcpu_time 14378.732785511 seconds https://bugzilla.redhat.com/show_bug.cgi?id=1301807Signed-off-by: NLuyao Huang <lhuang@redhat.com>
-
由 Peter Krempa 提交于
virDomainGetCPUStats doesn't support flags so there's no need to carry the 'flags' variable around. Additionally since the API is poorly designed I doubt that it will be extended.
-
由 Peter Krempa 提交于
Simplify the code by extracting a common code path.
-
- 25 1月, 2016 3 次提交
-
-
由 Michal Privoznik 提交于
From the code it seems to me that we need user namespace if configured in domain XML. Otherwise we don't use it at all. However our tool is more strict about that. Fix this discrepancy. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Since the introduction of virt-host-validate tool the set of cgroup controllers we use has changed so the tool is checking for some cgroups that we don't need (e.g. net_cls, although I doubt we have ever used that one) and is not checking for those we actually use (e.g. cpuset). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1250331 It all works like this. The change-media command dumps domain XML, finds the corresponding cdrom device we want to change media in and returns it in the xmlNodePtr form. This way we don't have to bother with keeping all the subelements or attributes that we don't care about in the XML that is fed back to libvirt for the update API. Now, the problem is we try to be clever here and detect if disk already has a source (indicated by <source/> subelement). However, bare fact that the element is there does not mean disk has source. Make our clever check better. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 21 1月, 2016 2 次提交
-
-
由 Jiri Denemark 提交于
The VIR_DOMAIN_EVENT_ID_MIGRATION_ITERATION event will be triggered whenever VIR_DOMAIN_JOB_MEMORY_ITERATION changes its value, i.e., whenever a new iteration over guest memory pages is started during migration. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Michal Privoznik 提交于
We are getting the list of domains and after that we iterate over the list and try to get status for each domain hoping it will skip over domains that disappeared meanwhile. However, this solution to race is bogus - domain may disappear right after we have checked its state and before we exec another API over it (e.g. virDomainHasManagedSaveImage()). Also, when printing just names or uuids (list --name / --uuid) we issue APIs to obtain the values, however these require no RPC call as all requested info is in virDomain object that client already has. Therefore move the status obtaining only to the place that really needs it. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 14 1月, 2016 2 次提交
-
-
由 Michal Privoznik 提交于
In 50078cfb I've tried to fix distcheck but accidentally broke rpm build. The problem is that rpm build not only sets DESTDIR but also passes plugindir path. This results in double DESTDIR being in the plugin path, Drop one. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Guido Günther 提交于
Mention that we run a command in that namespace
-
- 13 1月, 2016 3 次提交
-
-
由 Cole Robinson 提交于
Even though the Makefile has WITH_WIRESHARK guards, the _SOURCES variables are still processed when adding bits to the dist archive. plugin.c is a generated file that is only built when wireshark is enabled and it shouldn't be distributed, so use 'nodist'
-
由 Michal Privoznik 提交于
Like everything we install, it should be prefixed with DESTDIR. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Cole Robinson 提交于
Just handle it all in tools/Makefile.am. I verified the generated output looks similar to the pre patch output, but I didn't test it.
-
- 12 1月, 2016 7 次提交
-
-
由 Andrea Bolognani 提交于
-
由 John Ferlan 提交于
Rather than continually cut-n-paste the strings into each command, create a common macro to be used generically. Note that not all '{.name = "interface",' entries are replaced, just those that have the common .help string of "interface name or MAC address". Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Rather than continually cut-n-paste the strings into each command, create a common macro to be used generically. Note that not all '{.name = "network",' entries are replaced, just those that have the common .help string of "network name or uuid". Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Rather than continually cut-n-paste the strings into each command, create common macros to be used generically. Replace the more commonly used "vol" option with a macro. This also adjusts 2 commands that didn't have the correct helpstr - 'vol-create-from' and 'vol-clone'. Both are described in the man page as taking vol, path, or key and the code uses the virshCommandOptVol instead of virshCommandOptVolBy. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Rather than continually cut-n-paste the strings into each command, create a common macro to be used generically. The macro will take a single argument _helpstr for the less common help string for each command option. Note that only file options using "OT_DATA" and "OFLAG_REQ" will be replace - others are left as is. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Rather than continually cut-n-paste the strings into each command, create a common macro to be used generically. The macro will take a single argument _helpstr which for many options in virsh-domain.c is simply "affect current domain". So, create a second macro within that file in order to define the more common use as a revector to the common macro with the common _helpstr. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Rather than continually cut-n-paste the strings into each command, create a common macro to be used generically. The macro will take a single argument _helpstr which for many options in virsh-domain.c is simply "affect running domain". So, create a second macro within that file in order to define the more common use as a revector to the common macro with the common _helpstr. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-