mirror of
https://github.com/containers/podman.git
synced 2025-07-03 17:27:18 +08:00
Remove more FIXMEs
Mostly, just removing the comments. These either have been done, or are no longer a good idea. No code changes. [NO NEW TESTS NEEDED] as such. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
@ -22,9 +22,6 @@ import (
|
|||||||
|
|
||||||
var json = jsoniter.ConfigCompatibleWithStandardLibrary
|
var json = jsoniter.ConfigCompatibleWithStandardLibrary
|
||||||
|
|
||||||
// TODO: We should add syntax for specifying plugins to containers.conf, and
|
|
||||||
// support for loading based on that.
|
|
||||||
|
|
||||||
// Copied from docker/go-plugins-helpers/volume/api.go - not exported, so we
|
// Copied from docker/go-plugins-helpers/volume/api.go - not exported, so we
|
||||||
// need to do this to get at them.
|
// need to do this to get at them.
|
||||||
// These are well-established paths that should not change unless the plugin API
|
// These are well-established paths that should not change unless the plugin API
|
||||||
@ -185,8 +182,7 @@ func (p *VolumePlugin) getURI() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Verify the plugin is still available.
|
// Verify the plugin is still available.
|
||||||
// TODO: Do we want to ping with an HTTP request? There's no ping endpoint so
|
// Does not actually ping the API, just verifies that the socket still exists.
|
||||||
// we'd need to hit Activate or Capabilities?
|
|
||||||
func (p *VolumePlugin) verifyReachable() error {
|
func (p *VolumePlugin) verifyReachable() error {
|
||||||
if _, err := os.Stat(p.SocketPath); err != nil {
|
if _, err := os.Stat(p.SocketPath); err != nil {
|
||||||
if os.IsNotExist(err) {
|
if os.IsNotExist(err) {
|
||||||
@ -307,7 +303,6 @@ func (p *VolumePlugin) ListVolumes() ([]*volume.Volume, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Can probably unify response reading under a helper
|
|
||||||
volumeRespBytes, err := ioutil.ReadAll(resp.Body)
|
volumeRespBytes, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrapf(err, "error reading response body from volume plugin %s", p.Name)
|
return nil, errors.Wrapf(err, "error reading response body from volume plugin %s", p.Name)
|
||||||
|
@ -152,8 +152,8 @@ func (p *Pod) stopWithTimeout(ctx context.Context, cleanup bool, timeout int) (m
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: There may be cases where it makes sense to order stops based on
|
// Stopping pods is not ordered by dependency. We haven't seen any case
|
||||||
// dependencies. Should we bother with this?
|
// where this would actually matter.
|
||||||
|
|
||||||
ctrErrChan := make(map[string]<-chan error)
|
ctrErrChan := make(map[string]<-chan error)
|
||||||
|
|
||||||
@ -162,8 +162,9 @@ func (p *Pod) stopWithTimeout(ctx context.Context, cleanup bool, timeout int) (m
|
|||||||
c := ctr
|
c := ctr
|
||||||
logrus.Debugf("Adding parallel job to stop container %s", c.ID())
|
logrus.Debugf("Adding parallel job to stop container %s", c.ID())
|
||||||
retChan := parallel.Enqueue(ctx, func() error {
|
retChan := parallel.Enqueue(ctx, func() error {
|
||||||
// TODO: Might be better to batch stop and cleanup
|
// Can't batch these without forcing Stop() to hold the
|
||||||
// together?
|
// lock for the full duration of the timeout.
|
||||||
|
// We probably don't want to do that.
|
||||||
if timeout > -1 {
|
if timeout > -1 {
|
||||||
if err := c.StopWithTimeout(uint(timeout)); err != nil {
|
if err := c.StopWithTimeout(uint(timeout)); err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -412,7 +412,6 @@ func makeRuntime(runtime *Runtime) (retErr error) {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
runtime.eventer = eventer
|
runtime.eventer = eventer
|
||||||
// TODO: events for libimage
|
|
||||||
|
|
||||||
// Set up containers/image
|
// Set up containers/image
|
||||||
if runtime.imageContext == nil {
|
if runtime.imageContext == nil {
|
||||||
@ -517,8 +516,6 @@ func makeRuntime(runtime *Runtime) (retErr error) {
|
|||||||
}
|
}
|
||||||
// Acquire the lock and hold it until we return
|
// Acquire the lock and hold it until we return
|
||||||
// This ensures that no two processes will be in runtime.refresh at once
|
// This ensures that no two processes will be in runtime.refresh at once
|
||||||
// TODO: we can't close the FD in this lock, so we should keep it around
|
|
||||||
// and use it to lock important operations
|
|
||||||
aliveLock.Lock()
|
aliveLock.Lock()
|
||||||
doRefresh := false
|
doRefresh := false
|
||||||
defer func() {
|
defer func() {
|
||||||
|
Reference in New Issue
Block a user