mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
OpenVZ: Fix some overwritten error codes
Don't overwrite errors during domain creation/definition to ease tracking down problems.
This commit is contained in:
parent
50a7c59bb3
commit
2d626c7d08
@ -58,6 +58,7 @@
|
|||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "bridge.h"
|
#include "bridge.h"
|
||||||
#include "files.h"
|
#include "files.h"
|
||||||
|
#include "logging.h"
|
||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_OPENVZ
|
#define VIR_FROM_THIS VIR_FROM_OPENVZ
|
||||||
|
|
||||||
@ -210,8 +211,7 @@ static int openvzSetInitialConfig(virDomainDefPtr vmdef)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (openvzDomainDefineCmd(prog, OPENVZ_MAX_ARG, vmdef) < 0) {
|
if (openvzDomainDefineCmd(prog, OPENVZ_MAX_ARG, vmdef) < 0) {
|
||||||
openvzError(VIR_ERR_INTERNAL_ERROR, "%s",
|
VIR_ERROR0(_("Error creating command for container"));
|
||||||
_("Error creating command for container"));
|
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -878,8 +878,7 @@ openvzDomainDefineXML(virConnectPtr conn, const char *xml)
|
|||||||
vm->persistent = 1;
|
vm->persistent = 1;
|
||||||
|
|
||||||
if (openvzSetInitialConfig(vm->def) < 0) {
|
if (openvzSetInitialConfig(vm->def) < 0) {
|
||||||
openvzError(VIR_ERR_INTERNAL_ERROR, "%s",
|
VIR_ERROR0(_("Error creating initial configuration"));
|
||||||
_("Error creating initial configuration"));
|
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -967,8 +966,7 @@ openvzDomainCreateXML(virConnectPtr conn, const char *xml,
|
|||||||
vm->persistent = 1;
|
vm->persistent = 1;
|
||||||
|
|
||||||
if (openvzSetInitialConfig(vm->def) < 0) {
|
if (openvzSetInitialConfig(vm->def) < 0) {
|
||||||
openvzError(VIR_ERR_INTERNAL_ERROR, "%s",
|
VIR_ERROR0(_("Error creating initial configuration"));
|
||||||
_("Error creating initial configuration"));
|
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user