Skip to content

Should /containers/(id)/update take HostConfig or only Resources #18957

@vdemeester

Description

@vdemeester

The current implementation of update(#15078), and thus the endpoint /containers/(id)/update, is using HostConfig struct although it's only updating Resources.

This raises few concerns :

  • We decided that update should only update stuff that are in Resources struct, but it's possible to send a complete HostConfig struct which could lead to confusion — like why is some fields not taken care of, etc….
  • If a complete HostConfig struct is passed, it will completely and silently ignore all attributes except Resources. It should at least put a warning.

I think we should reduce what we send and change the API /containers/(id)/update to just take Resoures struct instead of HostConfig — it would make it clear that only stuff in this struct are supported (and it's simpler to implement than doing some diff or something and warn that something that is not in Resources has been wrongly set).

/cc @hqhq @tiborvass @thaJeztah @runcom @duglin @unclejack @icecrime @calavera

Metadata

Metadata

Assignees

Labels

area/apiAPIkind/questionpriority/P0Urgent: Security, critical bugs, blocking issues. drop everything until this issue is addressed.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions