mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
lxc: Modify/add some debug messages
Modify the VIR_DEBUG message in virLXCProcessCleanup to make it clearer about the path. Also add some more VIR_DEBUG messages in virLXCProcessStart in order to help debug error flow.
This commit is contained in:
parent
72129907c1
commit
2b8e018ad8
@ -154,7 +154,7 @@ static void virLXCProcessCleanup(virLXCDriverPtr driver,
|
|||||||
virNetDevVPortProfilePtr vport = NULL;
|
virNetDevVPortProfilePtr vport = NULL;
|
||||||
virLXCDriverConfigPtr cfg = virLXCDriverGetConfig(driver);
|
virLXCDriverConfigPtr cfg = virLXCDriverGetConfig(driver);
|
||||||
|
|
||||||
VIR_DEBUG("Stopping VM name=%s pid=%d reason=%d",
|
VIR_DEBUG("Cleanup VM name=%s pid=%d reason=%d",
|
||||||
vm->def->name, (int)vm->pid, (int)reason);
|
vm->def->name, (int)vm->pid, (int)reason);
|
||||||
|
|
||||||
/* now that we know it's stopped call the hook if present */
|
/* now that we know it's stopped call the hook if present */
|
||||||
@ -1163,6 +1163,7 @@ int virLXCProcessStart(virConnectPtr conn,
|
|||||||
vm->def, NULL) < 0)
|
vm->def, NULL) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
VIR_DEBUG("Setting up consoles");
|
||||||
for (i = 0; i < vm->def->nconsoles; i++) {
|
for (i = 0; i < vm->def->nconsoles; i++) {
|
||||||
char *ttyPath;
|
char *ttyPath;
|
||||||
|
|
||||||
@ -1180,9 +1181,11 @@ int virLXCProcessStart(virConnectPtr conn,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VIR_DEBUG("Setting up Interfaces");
|
||||||
if (virLXCProcessSetupInterfaces(conn, vm->def, &nveths, &veths) < 0)
|
if (virLXCProcessSetupInterfaces(conn, vm->def, &nveths, &veths) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
VIR_DEBUG("Preparing to launch");
|
||||||
if ((logfd = open(logfile, O_WRONLY | O_APPEND | O_CREAT,
|
if ((logfd = open(logfile, O_WRONLY | O_APPEND | O_CREAT,
|
||||||
S_IRUSR|S_IWUSR)) < 0) {
|
S_IRUSR|S_IWUSR)) < 0) {
|
||||||
virReportSystemError(errno,
|
virReportSystemError(errno,
|
||||||
@ -1240,6 +1243,7 @@ int virLXCProcessStart(virConnectPtr conn,
|
|||||||
VIR_WARN("Unable to seek to end of logfile: %s",
|
VIR_WARN("Unable to seek to end of logfile: %s",
|
||||||
virStrerror(errno, ebuf, sizeof(ebuf)));
|
virStrerror(errno, ebuf, sizeof(ebuf)));
|
||||||
|
|
||||||
|
VIR_DEBUG("Launching container");
|
||||||
virCommandRawStatus(cmd);
|
virCommandRawStatus(cmd);
|
||||||
if (virCommandRun(cmd, &status) < 0)
|
if (virCommandRun(cmd, &status) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
Loading…
Reference in New Issue
Block a user