mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Automated rollback of changelist 621996848
PiperOrigin-RevId: 623223878
This commit is contained in:
committed by
gVisor bot
parent
5b9642a0f2
commit
e243aa6b91
@@ -266,8 +266,9 @@ func (proc *Proc) execAsync(args *ExecArgs) (*kernel.ThreadGroup, kernel.ThreadI
|
||||
initArgs.Filename = resolved
|
||||
}
|
||||
|
||||
containerName := proc.Kernel.ContainerNameGivenID(args.ContainerID)
|
||||
ttyFile, err := fdimport.Import(ctx, fdTable, args.StdioIsPty, args.KUID, args.KGID, fdMap, containerName)
|
||||
// TODO(gvisor.dev/issue/1956): Container name is not really needed because
|
||||
// exec processes are not restored, but add it for completeness.
|
||||
ttyFile, err := fdimport.Import(ctx, fdTable, args.StdioIsPty, args.KUID, args.KGID, fdMap, "")
|
||||
if err != nil {
|
||||
return nil, 0, nil, err
|
||||
}
|
||||
|
||||
@@ -348,9 +348,6 @@ type Kernel struct {
|
||||
// devGofers maps container ID to its device gofer client.
|
||||
devGofers map[string]*devutil.GoferClient `state:"nosave"`
|
||||
devGofersMu sync.Mutex `state:"nosave"`
|
||||
|
||||
// cid -> name.
|
||||
containerNames map[string]string
|
||||
}
|
||||
|
||||
// InitKernelArgs holds arguments to Init.
|
||||
@@ -457,7 +454,6 @@ func (k *Kernel) Init(args InitKernelArgs) error {
|
||||
args.MaxFDLimit = MaxFdLimit
|
||||
}
|
||||
k.MaxFDLimit.Store(args.MaxFDLimit)
|
||||
k.containerNames = make(map[string]string)
|
||||
|
||||
ctx := k.SupervisorContext()
|
||||
if err := k.vfs.Init(ctx); err != nil {
|
||||
@@ -1960,13 +1956,3 @@ func (k *Kernel) cleaupDevGofers() {
|
||||
}
|
||||
k.devGofers = nil
|
||||
}
|
||||
|
||||
// RegisterContainerName registers a container name for a given container ID.
|
||||
func (k *Kernel) RegisterContainerName(cid, containerName string) {
|
||||
k.containerNames[cid] = containerName
|
||||
}
|
||||
|
||||
// ContainerNameGivenID returns the container name for a given container ID.
|
||||
func (k *Kernel) ContainerNameGivenID(cid string) string {
|
||||
return k.containerNames[cid]
|
||||
}
|
||||
|
||||
@@ -543,7 +543,6 @@ func New(args Args) (*Loader, error) {
|
||||
}
|
||||
}
|
||||
|
||||
k.RegisterContainerName(args.ID, info.containerName)
|
||||
eid := execID{cid: args.ID}
|
||||
l := &Loader{
|
||||
k: k,
|
||||
@@ -955,7 +954,6 @@ func (l *Loader) startSubcontainer(spec *specs.Spec, conf *config.Config, cid st
|
||||
})
|
||||
}
|
||||
|
||||
l.k.RegisterContainerName(cid, info.containerName)
|
||||
l.k.StartProcess(ep.tg)
|
||||
// No more failures from this point on.
|
||||
cu.Release()
|
||||
|
||||
Reference in New Issue
Block a user