Skip to content

Commit

Permalink
Merge caffd11 into 87684fd
Browse files Browse the repository at this point in the history
  • Loading branch information
yitsushi authored May 19, 2023
2 parents 87684fd + caffd11 commit a7d6e55
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
1 change: 0 additions & 1 deletion core/models/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ type NetworkInterface struct {
//
// NOTE: This field is not exposed via the gRPC API, it is automatically
// populated when converting from the API model to this internal model.
// TODO: we may hide this within the firecracker plugin. #179
AllowMetadataRequests bool `json:"allow_mmds,omitempty"`
// GuestMAC allows the specifying of a specifi MAC address to use for the interface. If
// not supplied a autogenerated MAC address will be used.
Expand Down
3 changes: 0 additions & 3 deletions infrastructure/controllers/microvm_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,13 @@ func (r *MicroVMController) runEventListener(ctx context.Context, resyncPeriod t
return
case evt := <-evtCh:
if err := r.handleEvent(evt, logger); err != nil {
// TODO: should we exit here? #233
logger.Errorf("handling events: %s", err)
}
case <-ticker.C:
if err := r.resyncSpecs(ctx, logger); err != nil {
// TODO: should we exit here? #233
logger.Errorf("resyncing specs: %s", err)
}
case evtErr := <-errCh:
// TODO: should we exit here? #233
logger.Errorf("error from event service: %s", evtErr)
}
}
Expand Down
2 changes: 0 additions & 2 deletions infrastructure/godisk/disk_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ func TestDiskCreation(t *testing.T) {
info, err := fs.Stat(imagePath)
g.Expect(err).NotTo(g.HaveOccurred())
g.Expect(info.Size()).To(g.Equal(expectedSize))

//TODO: in the future we could consider inspecting the created image.
}

func TestDiskCreationExistsNoOverwrite(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions infrastructure/network/network_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ func (n *networkService) IfaceCreate(ctx context.Context, input ports.IfaceCreat
link = &netlink.Tuntap{
LinkAttrs: netlink.LinkAttrs{
Name: input.DeviceName,
// TODO: add Namespace #206
},
Mode: netlink.TUNTAP_MODE_TAP,
}
Expand All @@ -85,7 +84,7 @@ func (n *networkService) IfaceCreate(ctx context.Context, input ports.IfaceCreat
Name: input.DeviceName,
MTU: parentLink.Attrs().MTU,
ParentIndex: parentLink.Attrs().Index,
Namespace: parentLink.Attrs().Namespace, // TODO: add namespace specific to vm #206
Namespace: parentLink.Attrs().Namespace,
TxQLen: parentLink.Attrs().TxQLen,
},
Mode: netlink.MACVLAN_MODE_BRIDGE,
Expand Down
10 changes: 9 additions & 1 deletion internal/command/run/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ func runServer(ctx context.Context, cfg *config.Config) error {

if err := runPProf(ctx, cfg); err != nil {
logger.Errorf("failed serving api: %v", err)
// Cancel all processes if at least one fails.
cancel()
}
}()
}
Expand All @@ -121,6 +123,8 @@ func runServer(ctx context.Context, cfg *config.Config) error {

if err := serveAPI(ctx, cfg); err != nil {
logger.Errorf("failed serving api: %v", err)
// Cancel all processes if at least one fails.
cancel()
}
}()
}
Expand All @@ -132,6 +136,8 @@ func runServer(ctx context.Context, cfg *config.Config) error {
defer wg.Done()
if err := serveHTTP(ctx, cfg); err != nil {
logger.Errorf("failed serving http api: %v", err)
// Cancel all processes if at least one fails.
cancel()
}
}()
}
Expand All @@ -144,6 +150,8 @@ func runServer(ctx context.Context, cfg *config.Config) error {

if err := runControllers(ctx, cfg); err != nil {
logger.Errorf("failed running controllers: %v", err)
// Cancel all processes if at least one fails.
cancel()
}
}()
}
Expand Down Expand Up @@ -202,7 +210,7 @@ func serveAPI(ctx context.Context, cfg *config.Config) error {
reflection.Register(grpcServer)

if err := grpcServer.Serve(listener); err != nil {
logger.Fatalf("serving grpc api: %v", err) // TODO: remove this fatal #235
return fmt.Errorf("failed to start grpc server: %w", err)
}

return nil
Expand Down

0 comments on commit a7d6e55

Please sign in to comment.