mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 07:17:44 +00:00
lxc: Don't report error in Wait/SendContinue
We will reuse these shortly, and each use should have a different error message.
This commit is contained in:
parent
eee1763c8c
commit
6973594ca8
@ -195,13 +195,10 @@ int lxcContainerSendContinue(int control)
|
|||||||
|
|
||||||
writeCount = safewrite(control, &msg, sizeof(msg));
|
writeCount = safewrite(control, &msg, sizeof(msg));
|
||||||
if (writeCount != sizeof(msg)) {
|
if (writeCount != sizeof(msg)) {
|
||||||
virReportSystemError(errno, "%s",
|
|
||||||
_("Unable to send container continue message"));
|
|
||||||
goto error_out;
|
goto error_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = 0;
|
rc = 0;
|
||||||
|
|
||||||
error_out:
|
error_out:
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
@ -224,13 +221,8 @@ static int lxcContainerWaitForContinue(int control)
|
|||||||
readLen = saferead(control, &msg, sizeof(msg));
|
readLen = saferead(control, &msg, sizeof(msg));
|
||||||
if (readLen != sizeof(msg) ||
|
if (readLen != sizeof(msg) ||
|
||||||
msg != LXC_CONTINUE_MSG) {
|
msg != LXC_CONTINUE_MSG) {
|
||||||
virReportSystemError(errno, "%s",
|
|
||||||
_("Failed to read the container continue message"));
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
VIR_FORCE_CLOSE(control);
|
|
||||||
|
|
||||||
VIR_DEBUG("Received container continue message");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -793,8 +785,12 @@ static int lxcContainerChild( void *data )
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
/* Wait for interface devices to show up */
|
/* Wait for interface devices to show up */
|
||||||
if (lxcContainerWaitForContinue(argv->monitor) < 0)
|
if (lxcContainerWaitForContinue(argv->monitor) < 0) {
|
||||||
|
virReportSystemError(errno, "%s",
|
||||||
|
_("Failed to read the container continue message"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
}
|
||||||
|
VIR_DEBUG("Received container continue message");
|
||||||
|
|
||||||
/* rename and enable interfaces */
|
/* rename and enable interfaces */
|
||||||
if (lxcContainerRenameAndEnableInterfaces(argv->nveths,
|
if (lxcContainerRenameAndEnableInterfaces(argv->nveths,
|
||||||
@ -814,6 +810,7 @@ static int lxcContainerChild( void *data )
|
|||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(ttyPath);
|
VIR_FREE(ttyPath);
|
||||||
VIR_FORCE_CLOSE(ttyfd);
|
VIR_FORCE_CLOSE(ttyfd);
|
||||||
|
VIR_FORCE_CLOSE(argv->monitor);
|
||||||
|
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
/* this function will only return if an error occured */
|
/* this function will only return if an error occured */
|
||||||
|
@ -731,8 +731,11 @@ lxcControllerRun(virDomainDefPtr def,
|
|||||||
if (lxcControllerMoveInterfaces(nveths, veths, container) < 0)
|
if (lxcControllerMoveInterfaces(nveths, veths, container) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (lxcContainerSendContinue(control[0]) < 0)
|
if (lxcContainerSendContinue(control[0]) < 0) {
|
||||||
|
virReportSystemError(errno, "%s",
|
||||||
|
_("Unable to send container continue message"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
/* Now the container is running, there's no need for us to keep
|
/* Now the container is running, there's no need for us to keep
|
||||||
any elevated capabilities */
|
any elevated capabilities */
|
||||||
|
Loading…
Reference in New Issue
Block a user