- 22 8月, 2019 11 次提交
-
-
由 Michal Privoznik 提交于
This module contains function to get host boot time. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Michal Privoznik 提交于
If user has two domains, each have the same disk (configured for RW) but each runs with different seclabel then we deny start of the second domain because in order to do that we would need to relabel the disk but that would cut the first domain off. Even if we did not do that, qemu would fail to start because it would be unable to lock the disk image for the second time. So far, this behaviour is expected. But what is not expected is that we increase the refcounter in XATTRs and leave it like that. What happens is that when the second domain starts, virSecuritySetRememberedLabel() is called, and since there are XATTRs from the first domain it increments the refcounter and returns it (refcounter == 2 at this point). Then callers (virSecurityDACSetOwnership() and virSecuritySELinuxSetFileconHelper()) realize that refcounter is greater than 1 and desired seclabel doesn't match the one the disk image already has and an error is produced. But the refcounter is never decremented. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1740024Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Ján Tomko 提交于
Also get rid of the temporary 'type' variable. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
Simplify the command line formatter by complicating the validator. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
This lets us get rid of the error label. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
We usually use 'cmd' for a virCommand(Ptr) variable. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Andrea Bolognani 提交于
Apparently /proc/self is automatically converted to /proc/@{pid} before checking rules, which makes spelling it out explicitly redundant. Suggested-by: NJamie Strandboge <jamie@canonical.com> Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Michal Privoznik 提交于
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Michal Privoznik 提交于
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Michal Privoznik 提交于
The function takes raw UUID and formats it into string representation. However, the comment mistakenly states that the expected size of raw UUID buffer is VIR_UUID_RAW_LEN bytes. We don't have such constant since v0.3.2~24. It should have been VIR_UUID_BUFLEN. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
- 21 8月, 2019 22 次提交
-
-
由 Ján Tomko 提交于
Store the namespace URI as const char*, instead of in a function. Suggested-by: NJiri Denemark <jdenemar@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
A wrapper around xmlXPathRegisterNs that will save us from having to include xpathInternals.h everywhere we want to use a custom namespace and open-coding the strings already contained in virXMLNamespace. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
A function to automatically format the xmlns:<prefix>='<uri>' attribute for per-driver namespaces. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
We have hardcoded the namespace prefix in various places: 1) the xmlns string stored in the 'href' function 2) the xmlXPathRegisterNs call in each parser 3) all the parsing and formatting code actually dealing with these elements While eliminating the third one is probably a job for an actual XML-aware formatter, let's store the prefix separately here in the virXMLNamespace structure so that future patches can get rid of the first two bullets. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
Now that virDomainXMLNamespace matches virXMLNamespace, we no longer need to keep both around. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
There is no need to copy and paste the same types pointing to void all over the place. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
There is no need to copy and paste the same types pointing to void all over the place. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
For various XMLs, we allow a custom namespace for passing unsupported configurations. Introduce a single structure to hold all the driver-specific functions to remove duplication. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
In the future we will perform more actions if ns.parse is present. Decouple the condition from the actual call. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
We do not need to pass the root node, since it's already included in the XPathContext. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
Neither the xmlDocPtr nor the root xmlNode (also passed in the XPathContext) are interesting to the callees. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jim Fehlig 提交于
After a successful call to libxl_domain_suspend_only(), set domain state to VIR_DOMAIN_PMSUSPENDED and send lifecycle event. Signed-off-by: NJim Fehlig <jfehlig@suse.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
由 Jim Fehlig 提交于
A libxl event with shutdown reason LIBXL_SHUTDOWN_REASON_SUSPEND is sent after a domain is successfully suspended, which could result from suspending the domain to file (virDomainSave), suspending it to socket (virDomainMigrate), or suspending it to memory (virDomainPMSuspendForDuration). Commit d00c77ae changed the event handler to always set domain state to VIR_DOMAIN_PMSUSPENDED when LIBXL_SHUTDOWN_REASON_SUSPEND is received. The causes a persistent domain to show state "pmsuspended" after a successful migrate or save operation. Revert the commit and ignore the suspend event as before. This reverts commit d00c77ae. Signed-off-by: NJim Fehlig <jfehlig@suse.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
- 20 8月, 2019 6 次提交
-
-
由 Pavel Hrdina 提交于
If the first value in cpu.max is "max" return from function. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1741837Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Pavel Hrdina 提交于
Our virStrToLong* helpers converts string to integers where it wraps strtol standard function. After the conversion happens and there are some remaining invalid characters our helpers will fail if the second argument is NULL. We need to pass pointer to string in cases where there are multiple values in a single file. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1741825Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Wang Huaqiang 提交于
resctrl object stored in def->resctrls is shared by cachetune and memorytune. The domain xml configuration is parsed firstly for cachetune then memorytune, and the resctrl object will not be created in parsing settings for memorytune once it found sharing exists. But resctrl is improperly freed when sharing happens. Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Andrea Bolognani 提交于
Tried previously in commit b1eb8b3e Author: Andrea Bolognani <abologna@redhat.com> Date: Mon Aug 19 10:23:42 2019 +0200 virt-aa-helper: Fix AppArmor profile v5.6.0-243-gb1eb8b3e with somewhat disappointing results. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
If LXC is disabled at build time then there is no libvirt_driver_lxc_impl_la-*.lo to run the 'check-protocol' against. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
由 Eric Blake 提交于
Gnulib has added a patch that allows configmake.h to be included without causing build failures on mingw if <winsock2.h> is later included (whether directly, or indirectly such as through gnulib's <unistd.h>). This reverts commit fed58d83 ("build: Fix checkpoint_conf on mingw"), now that we don't have to worry about header inclusion ordering issues. Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 19 8月, 2019 1 次提交
-
-
由 Andrea Bolognani 提交于
Since commit 432faf25 Author: Michal Privoznik <mprivozn@redhat.com> Date: Tue Jul 2 19:49:51 2019 +0200 virCommand: use procfs to learn opened FDs When spawning a child process, between fork() and exec() we close all file descriptors and keep only those the caller wants us to pass onto the child. The problem is how we do that. Currently, we get the limit of opened files and then iterate through each one of them and either close() it or make it survive exec(). This approach is suboptimal (although, not that much in default configurations where the limit is pretty low - 1024). We have /proc where we can learn what FDs we hold open and thus we can selectively close only those. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> v5.5.0-173-g432faf25 programs using the virCommand APIs on Linux need read access to /proc/self/fd, or they will fail like error : virCommandWait:2796 : internal error: Child process (LIBVIRT_LOG_OUTPUTS=3:stderr /usr/lib/libvirt/virt-aa-helper -c -u libvirt-b20e9a8e-091a-45e0-8823-537119e98bc6) unexpected exit status 1: libvirt: error : cannot open directory '/proc/self/fd': Permission denied virt-aa-helper: error: apparmor_parser exited with error Update the AppArmor profile for virt-aa-helper so that read access to the relevant path is granted. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-