Skip to content

Commit f49ce4d

Browse files
committed
Merge branch 'qemu' into qemu-capabilities
2 parents f914f92 + 72c0d9d commit f49ce4d

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

cmd/api/api/cp.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,4 +419,3 @@ func (s *ApiService) handleCopyFrom(ctx context.Context, ws *websocket.Conn, ins
419419
}
420420
return bytesReceived, nil
421421
}
422-

cmd/api/main.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323
"github.com/onkernel/hypeman/cmd/api/api"
2424
"github.com/onkernel/hypeman/cmd/api/config"
2525
"github.com/onkernel/hypeman/lib/guest"
26+
"github.com/onkernel/hypeman/lib/hypervisor/qemu"
2627
"github.com/onkernel/hypeman/lib/instances"
2728
mw "github.com/onkernel/hypeman/lib/middleware"
2829
"github.com/onkernel/hypeman/lib/oapi"
@@ -125,6 +126,11 @@ func run() error {
125126
}
126127
logger.Info("KVM access verified")
127128

129+
// Check if QEMU is available (optional - only warn if not present)
130+
if _, err := (&qemu.Starter{}).GetBinaryPath(nil, ""); err != nil {
131+
logger.Warn("QEMU not available - QEMU hypervisor will not work", "error", err)
132+
}
133+
128134
// Validate log rotation config
129135
var logMaxSize datasize.ByteSize
130136
if err := logMaxSize.UnmarshalText([]byte(app.Config.LogMaxSize)); err != nil {

lib/instances/exec_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func waitForExecAgent(ctx context.Context, mgr *manager, instanceID string, time
2222
deadline := time.Now().Add(timeout)
2323
for time.Now().Before(deadline) {
2424
logs, err := collectLogs(ctx, mgr, instanceID, 100)
25-
if err == nil && strings.Contains(logs, "[exec-agent] listening on vsock port 2222") {
25+
if err == nil && strings.Contains(logs, "[guest-agent] listening on vsock port 2222") {
2626
return nil
2727
}
2828
time.Sleep(500 * time.Millisecond)

lib/instances/manager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ func (m *manager) RotateLogs(ctx context.Context, maxBytes int64, maxFiles int)
264264
m.paths.InstanceHypemanLog(inst.Id),
265265
}
266266
for _, logPath := range logPaths {
267-
if err := rotateLogIfNeeded(logPath, maxBytes, maxFiles); err != nil {
267+
if err := rotateLogIfNeeded(logPath, maxBytes, maxFiles); err != nil {
268268
lastErr = err // Continue with other logs, but track error
269269
}
270270
}

lib/instances/network_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func TestCreateInstanceWithNetwork(t *testing.T) {
110110

111111
// Wait for exec agent to be ready
112112
t.Log("Waiting for exec agent...")
113-
err = waitForLogMessage(ctx, manager, inst.Id, "[exec-agent] listening", 10*time.Second)
113+
err = waitForLogMessage(ctx, manager, inst.Id, "[guest-agent] listening", 10*time.Second)
114114
require.NoError(t, err, "Exec agent should be listening")
115115
t.Log("Exec agent is ready")
116116

0 commit comments

Comments
 (0)