Merge pull request #2294 from coryb/gateway-exec-extra-hosts

add missing ExtraHosts to gateway exec
master
Tõnis Tiigi 2021-08-16 07:26:37 -07:00 committed by GitHub
commit 7658c78597
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 435 additions and 156 deletions

View File

@ -23,6 +23,7 @@ import (
"github.com/moby/buildkit/solver/pb"
"github.com/moby/buildkit/util/entitlements"
utilsystem "github.com/moby/buildkit/util/system"
"github.com/moby/buildkit/util/testutil/echoserver"
"github.com/moby/buildkit/util/testutil/integration"
"github.com/pkg/errors"
"github.com/stretchr/testify/require"
@ -48,6 +49,7 @@ func TestClientGatewayIntegration(t *testing.T) {
testClientGatewayExecError,
testClientGatewaySlowCacheExecError,
testClientGatewayExecFileActionError,
testClientGatewayContainerExtraHosts,
}, integration.WithMirroredImages(integration.OfficialImages("busybox:latest")))
integration.Run(t, []integration.Test{
@ -58,6 +60,16 @@ func TestClientGatewayIntegration(t *testing.T) {
"insecure": securityInsecure,
}),
)
integration.Run(t, []integration.Test{
testClientGatewayContainerHostNetworking,
},
integration.WithMirroredImages(integration.OfficialImages("busybox:latest")),
integration.WithMatrix("netmode", map[string]interface{}{
"default": defaultNetwork,
"host": hostNetwork,
}),
)
}
func testClientGatewaySolve(t *testing.T, sb integration.Sandbox) {
@ -1594,6 +1606,173 @@ func testClientGatewayContainerSecurityMode(t *testing.T, sb integration.Sandbox
checkAllReleasable(t, c, sb, true)
}
func testClientGatewayContainerExtraHosts(t *testing.T, sb integration.Sandbox) {
requiresLinux(t)
ctx := sb.Context()
product := "buildkit_test"
c, err := New(ctx, sb.Address())
require.NoError(t, err)
defer c.Close()
b := func(ctx context.Context, c client.Client) (*client.Result, error) {
st := llb.Image("busybox")
def, err := st.Marshal(ctx)
if err != nil {
return nil, errors.Wrap(err, "failed to marshal state")
}
r, err := c.Solve(ctx, client.SolveRequest{
Definition: def.ToPB(),
})
if err != nil {
return nil, errors.Wrap(err, "failed to solve")
}
ctr, err := c.NewContainer(ctx, client.NewContainerRequest{
Mounts: []client.Mount{{
Dest: "/",
MountType: pb.MountType_BIND,
Ref: r.Ref,
}},
ExtraHosts: []*pb.HostIP{{
Host: "some.host",
IP: "169.254.11.22",
}},
})
if err != nil {
return nil, err
}
stdout := bytes.NewBuffer(nil)
stderr := bytes.NewBuffer(nil)
pid, err := ctr.Start(ctx, client.StartRequest{
Args: []string{"grep", "169.254.11.22\tsome.host", "/etc/hosts"},
Stdout: &nopCloser{stdout},
Stderr: &nopCloser{stderr},
})
if err != nil {
ctr.Release(ctx)
return nil, err
}
defer ctr.Release(ctx)
err = pid.Wait()
t.Logf("Stdout: %q", stdout.String())
t.Logf("Stderr: %q", stderr.String())
require.NoError(t, err)
return &client.Result{}, nil
}
_, err = c.Build(ctx, SolveOpt{}, product, b, nil)
require.NoError(t, err)
checkAllReleasable(t, c, sb, true)
}
func testClientGatewayContainerHostNetworking(t *testing.T, sb integration.Sandbox) {
if os.Getenv("BUILDKIT_RUN_NETWORK_INTEGRATION_TESTS") == "" {
t.SkipNow()
}
if sb.Rootless() && sb.Value("netmode") == defaultNetwork {
// skip "default" network test for rootless, it always runs with "host" network
// https://github.com/moby/buildkit/blob/v0.9.0/docs/rootless.md#known-limitations
t.SkipNow()
}
requiresLinux(t)
ctx := sb.Context()
product := "buildkit_test"
var allowedEntitlements []entitlements.Entitlement
netMode := pb.NetMode_UNSET
if sb.Value("netmode") == hostNetwork {
netMode = pb.NetMode_HOST
allowedEntitlements = []entitlements.Entitlement{entitlements.EntitlementNetworkHost}
}
c, err := New(sb.Context(), sb.Address())
require.NoError(t, err)
defer c.Close()
s, err := echoserver.NewTestServer("foo")
require.NoError(t, err)
addrParts := strings.Split(s.Addr().String(), ":")
port := addrParts[len(addrParts)-1]
b := func(ctx context.Context, c client.Client) (*client.Result, error) {
st := llb.Image("busybox")
def, err := st.Marshal(ctx)
if err != nil {
return nil, errors.Wrap(err, "failed to marshal state")
}
r, err := c.Solve(ctx, client.SolveRequest{
Definition: def.ToPB(),
})
if err != nil {
return nil, errors.Wrap(err, "failed to solve")
}
ctr, err := c.NewContainer(ctx, client.NewContainerRequest{
Mounts: []client.Mount{{
Dest: "/",
MountType: pb.MountType_BIND,
Ref: r.Ref,
}},
NetMode: netMode,
})
if err != nil {
return nil, err
}
stdout := bytes.NewBuffer(nil)
stderr := bytes.NewBuffer(nil)
pid, err := ctr.Start(ctx, client.StartRequest{
Args: []string{"/bin/sh", "-c", fmt.Sprintf("nc 127.0.0.1 %s | grep foo", port)},
Stdout: &nopCloser{stdout},
Stderr: &nopCloser{stderr},
})
if err != nil {
ctr.Release(ctx)
return nil, err
}
defer ctr.Release(ctx)
err = pid.Wait()
t.Logf("Stdout: %q", stdout.String())
t.Logf("Stderr: %q", stderr.String())
if netMode == pb.NetMode_HOST {
require.NoError(t, err)
} else {
require.Error(t, err)
}
return &client.Result{}, nil
}
solveOpts := SolveOpt{
AllowedEntitlements: allowedEntitlements,
}
_, err = c.Build(ctx, solveOpts, product, b, nil)
require.NoError(t, err)
checkAllReleasable(t, c, sb, true)
}
type nopCloser struct {
io.Writer
}

View File

@ -25,6 +25,7 @@ type Client interface {
type NewContainerRequest struct {
Mounts []Mount
NetMode pb.NetMode
ExtraHosts []*pb.HostIP
Platform *pb.Platform
Constraints *pb.WorkerConstraints
}

View File

@ -28,6 +28,7 @@ import (
type NewContainerRequest struct {
ContainerID string
NetMode opspb.NetMode
ExtraHosts []executor.HostIP
Mounts []Mount
Platform *opspb.Platform
Constraints *opspb.WorkerConstraints
@ -52,13 +53,14 @@ func NewContainer(ctx context.Context, w worker.Worker, sm *session.Manager, g s
platform = *req.Platform
}
ctr := &gatewayContainer{
id: req.ContainerID,
netMode: req.NetMode,
platform: platform,
executor: w.Executor(),
errGroup: eg,
ctx: ctx,
cancel: cancel,
id: req.ContainerID,
netMode: req.NetMode,
extraHosts: req.ExtraHosts,
platform: platform,
executor: w.Executor(),
errGroup: eg,
ctx: ctx,
cancel: cancel,
}
var (
@ -276,18 +278,19 @@ func PrepareMounts(ctx context.Context, mm *mounts.MountManager, cm cache.Manage
}
type gatewayContainer struct {
id string
netMode opspb.NetMode
platform opspb.Platform
rootFS executor.Mount
mounts []executor.Mount
executor executor.Executor
started bool
errGroup *errgroup.Group
mu sync.Mutex
cleanup []func() error
ctx context.Context
cancel func()
id string
netMode opspb.NetMode
extraHosts []executor.HostIP
platform opspb.Platform
rootFS executor.Mount
mounts []executor.Mount
executor executor.Executor
started bool
errGroup *errgroup.Group
mu sync.Mutex
cleanup []func() error
ctx context.Context
cancel func()
}
func (gwCtr *gatewayContainer) Start(ctx context.Context, req client.StartRequest) (client.ContainerProcess, error) {
@ -300,6 +303,7 @@ func (gwCtr *gatewayContainer) Start(ctx context.Context, req client.StartReques
Cwd: req.Cwd,
Tty: req.Tty,
NetMode: gwCtr.netMode,
ExtraHosts: gwCtr.extraHosts,
SecurityMode: req.SecurityMode,
},
Stdin: req.Stdin,

View File

@ -272,6 +272,11 @@ func (c *bridgeClient) NewContainer(ctx context.Context, req client.NewContainer
return nil, err
}
ctrReq.ExtraHosts, err = gateway.ParseExtraHosts(req.ExtraHosts)
if err != nil {
return nil, err
}
w, err := c.workers.GetDefault()
if err != nil {
return nil, err

View File

@ -888,6 +888,11 @@ func (lbf *llbBridgeForwarder) NewContainer(ctx context.Context, in *pb.NewConta
return nil, stack.Enable(err)
}
ctrReq.ExtraHosts, err = ParseExtraHosts(in.ExtraHosts)
if err != nil {
return nil, stack.Enable(err)
}
ctr, err := NewContainer(context.Background(), w, lbf.sm, group, ctrReq)
if err != nil {
return nil, stack.Enable(err)

View File

@ -709,6 +709,8 @@ func (c *grpcClient) NewContainer(ctx context.Context, req client.NewContainerRe
Mounts: mounts,
Platform: req.Platform,
Constraints: req.Constraints,
Network: req.NetMode,
ExtraHosts: req.ExtraHosts,
})
if err != nil {
return nil, err

View File

@ -40,6 +40,10 @@ const (
// containers directly through the gateway
CapGatewayExec apicaps.CapID = "gateway.exec"
// CapGatewayExecExtraHosts is the capability to add additional hosts to
// /etc/hosts for containers created via gateway exec.
CapGatewayExecExtraHosts apicaps.CapID = "gateway.exec.extrahosts"
// CapFrontendCaps can be used to check that frontends define support for certain capabilities
CapFrontendCaps apicaps.CapID = "frontend.caps"
@ -156,6 +160,13 @@ func init() {
Status: apicaps.CapStatusExperimental,
})
Caps.Init(apicaps.Cap{
ID: CapGatewayExecExtraHosts,
Name: "gateway exec extra-hosts",
Enabled: true,
Status: apicaps.CapStatusExperimental,
})
Caps.Init(apicaps.Cap{
ID: CapFrontendCaps,
Name: "frontend capabilities",

View File

@ -1337,6 +1337,7 @@ type NewContainerRequest struct {
Network pb.NetMode `protobuf:"varint,3,opt,name=Network,proto3,enum=pb.NetMode" json:"Network,omitempty"`
Platform *pb.Platform `protobuf:"bytes,4,opt,name=platform,proto3" json:"platform,omitempty"`
Constraints *pb.WorkerConstraints `protobuf:"bytes,5,opt,name=constraints,proto3" json:"constraints,omitempty"`
ExtraHosts []*pb.HostIP `protobuf:"bytes,6,rep,name=extraHosts,proto3" json:"extraHosts,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -1410,6 +1411,13 @@ func (m *NewContainerRequest) GetConstraints() *pb.WorkerConstraints {
return nil
}
func (m *NewContainerRequest) GetExtraHosts() []*pb.HostIP {
if m != nil {
return m.ExtraHosts
}
return nil
}
type NewContainerResponse struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@ -2059,127 +2067,128 @@ func init() {
func init() { proto.RegisterFile("gateway.proto", fileDescriptor_f1a937782ebbded5) }
var fileDescriptor_f1a937782ebbded5 = []byte{
// 1909 bytes of a gzipped FileDescriptorProto
// 1932 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x58, 0x4f, 0x6f, 0x1b, 0xc7,
0x15, 0xd7, 0x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 0x80, 0x52, 0xb2, 0xcb, 0x11, 0x3b, 0x05, 0xba, 0x60, 0x40, 0x30,
0x9b, 0x2b, 0xf3, 0xab, 0x03, 0xbf, 0xc3, 0x09, 0x75, 0xb6, 0x03, 0x92, 0x56, 0xaa, 0x3b, 0x16,
0xf6, 0x5a, 0xf3, 0xc1, 0x5a, 0x18, 0x75, 0xb8, 0x13, 0x77, 0x58, 0xd5, 0x45, 0x49, 0x7a, 0xc3,
0x98, 0x74, 0x62, 0x73, 0x45, 0xbe, 0x86, 0xf1, 0xb1, 0xd1, 0x2e, 0x7d, 0xff, 0xe6, 0xae, 0xf1,
0xaf, 0x37, 0x77, 0x8d, 0xff, 0xbc, 0xb9, 0x6b, 0x5c, 0x6c, 0xcb, 0x7f, 0x73, 0x1f, 0xfc, 0x3f,
0x00, 0x00, 0xff, 0xff, 0xf5, 0x6a, 0xee, 0x8e, 0x1f, 0x17, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -3878,6 +3887,20 @@ func (m *NewContainerRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.ExtraHosts) > 0 {
for iNdEx := len(m.ExtraHosts) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.ExtraHosts[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintGateway(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x32
}
}
if m.Constraints != nil {
{
size, err := m.Constraints.MarshalToSizedBuffer(dAtA[:i])
@ -5035,6 +5058,12 @@ func (m *NewContainerRequest) Size() (n int) {
l = m.Constraints.Size()
n += 1 + l + sovGateway(uint64(l))
}
if len(m.ExtraHosts) > 0 {
for _, e := range m.ExtraHosts {
l = e.Size()
n += 1 + l + sovGateway(uint64(l))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
@ -8825,6 +8854,40 @@ func (m *NewContainerRequest) Unmarshal(dAtA []byte) error {
return err
}
iNdEx = postIndex
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ExtraHosts", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGateway
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGateway
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGateway
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ExtraHosts = append(m.ExtraHosts, &pb.HostIP{})
if err := m.ExtraHosts[len(m.ExtraHosts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGateway(dAtA[iNdEx:])

View File

@ -176,6 +176,7 @@ message NewContainerRequest {
pb.NetMode Network = 3;
pb.Platform platform = 4;
pb.WorkerConstraints constraints = 5;
repeated pb.HostIP extraHosts = 6;
}
message NewContainerResponse{}

24
frontend/gateway/util.go Normal file
View File

@ -0,0 +1,24 @@
package gateway
import (
"net"
"github.com/moby/buildkit/executor"
"github.com/moby/buildkit/solver/pb"
"github.com/pkg/errors"
)
func ParseExtraHosts(ips []*pb.HostIP) ([]executor.HostIP, error) {
out := make([]executor.HostIP, len(ips))
for i, hip := range ips {
ip := net.ParseIP(hip.IP)
if ip == nil {
return nil, errors.Errorf("failed to parse IP %s", hip.IP)
}
out[i] = executor.HostIP{
IP: ip,
Host: hip.Host,
}
}
return out, nil
}

View File

@ -16,5 +16,5 @@ buildxCmd build \
# --build-arg "PROTOBUF_VERSION=$protobuf_version" \
cp -R "$output/generated-files/" .
cp -R "$output/generated-files/." .
rm -rf $output

View File

@ -5,7 +5,6 @@ import (
"context"
"encoding/json"
"fmt"
"net"
"os"
"path"
"sort"
@ -290,7 +289,7 @@ func (e *execOp) Exec(ctx context.Context, g session.Group, inputs []solver.Resu
return nil, err
}
extraHosts, err := parseExtraHosts(e.op.Meta.ExtraHosts)
extraHosts, err := gateway.ParseExtraHosts(e.op.Meta.ExtraHosts)
if err != nil {
return nil, err
}
@ -377,21 +376,6 @@ func proxyEnvList(p *pb.ProxyEnv) []string {
return out
}
func parseExtraHosts(ips []*pb.HostIP) ([]executor.HostIP, error) {
out := make([]executor.HostIP, len(ips))
for i, hip := range ips {
ip := net.ParseIP(hip.IP)
if ip == nil {
return nil, errors.Errorf("failed to parse IP %s", hip.IP)
}
out[i] = executor.HostIP{
IP: ip,
Host: hip.Host,
}
}
return out, nil
}
func (e *execOp) Acquire(ctx context.Context) (solver.ReleaseFunc, error) {
if e.parallelism == nil {
return func() {}, nil