mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-28 19:54:35 +00:00
hypervisor: waitSandbox is waitVM
renaming... Signed-off-by: Manohar Castelino <mcastelino@apple.com>
This commit is contained in:
parent
a6385c8fde
commit
fd24a695bf
@ -459,7 +459,7 @@ func (a *Acrn) startSandbox(ctx context.Context, timeoutSecs int) error {
|
||||
}
|
||||
a.state.PID = PID
|
||||
|
||||
if err = a.waitSandbox(ctx, timeoutSecs); err != nil {
|
||||
if err = a.waitVM(ctx, timeoutSecs); err != nil {
|
||||
a.Logger().WithField("acrn wait failed:", err).Debug()
|
||||
return err
|
||||
}
|
||||
@ -467,9 +467,9 @@ func (a *Acrn) startSandbox(ctx context.Context, timeoutSecs int) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// waitSandbox will wait for the Sandbox's VM to be up and running.
|
||||
func (a *Acrn) waitSandbox(ctx context.Context, timeoutSecs int) error {
|
||||
span, _ := katatrace.Trace(ctx, a.Logger(), "waitSandbox", acrnTracingTags, map[string]string{"sandbox_id": a.id})
|
||||
// waitVM will wait for the Sandbox's VM to be up and running.
|
||||
func (a *Acrn) waitVM(ctx context.Context, timeoutSecs int) error {
|
||||
span, _ := katatrace.Trace(ctx, a.Logger(), "waitVM", acrnTracingTags, map[string]string{"sandbox_id": a.id})
|
||||
defer span.End()
|
||||
|
||||
if timeoutSecs < 0 {
|
||||
|
@ -899,6 +899,7 @@ type hypervisor interface {
|
||||
setConfig(config *HypervisorConfig) error
|
||||
createSandbox(ctx context.Context, id string, networkNS NetworkNamespace, hypervisorConfig *HypervisorConfig) error
|
||||
startSandbox(ctx context.Context, timeout int) error
|
||||
|
||||
// If wait is set, don't actively stop the sandbox:
|
||||
// just perform cleanup.
|
||||
StopVM(ctx context.Context, waitOnly bool) error
|
||||
|
@ -851,7 +851,7 @@ func (q *qemu) startSandbox(ctx context.Context, timeout int) error {
|
||||
return fmt.Errorf("failed to launch qemu: %s, error messages from qemu log: %s", err, strErr)
|
||||
}
|
||||
|
||||
err = q.waitSandbox(ctx, timeout)
|
||||
err = q.waitVM(ctx, timeout)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -888,9 +888,9 @@ func (q *qemu) bootFromTemplate() error {
|
||||
return q.waitMigration()
|
||||
}
|
||||
|
||||
// waitSandbox will wait for the Sandbox's VM to be up and running.
|
||||
func (q *qemu) waitSandbox(ctx context.Context, timeout int) error {
|
||||
span, _ := katatrace.Trace(ctx, q.Logger(), "waitSandbox", qemuTracingTags, map[string]string{"sandbox_id": q.id})
|
||||
// waitVM will wait for the Sandbox's VM to be up and running.
|
||||
func (q *qemu) waitVM(ctx context.Context, timeout int) error {
|
||||
span, _ := katatrace.Trace(ctx, q.Logger(), "waitVM", qemuTracingTags, map[string]string{"sandbox_id": q.id})
|
||||
defer span.End()
|
||||
|
||||
if timeout < 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user