-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update docker client version to 18.06.3 #4430
Conversation
Todo:
|
In the latest docker, so I am looking into the way to utilize |
The issue was previously container information was stored in After changing mounting directory, it seems working as expected. |
I have discussed this issue with @sven-lange-last.
So if we upgrade the docker version to 18.06.x rather than 18.09, it would give more time to downstream at the same time resolve the CVE. |
I did benchmarking to comparison any performance issue in docker-18.06.3.
For more information, you can refer to this. I think it would be good to go with |
7c8cab1
to
19f03eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - I think there's a readme/doc we have to update also regarding the docker version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need a similar change in the core/controller/Dockerfile as well for the "lean" deployment.
@rabbah I will cover what you mentioned as well |
We should really try to decouple from this. Sure, downstream will always be slower than upstream but we should not need to hold back on innovation and advancement because of that fact. Is there any possibility for us to have different versions of |
I think we need to differentiate the build step of the invoker Dockerfile to achieve that. Regarding the downstream version, I will defer to @sven-lange-last as he wanted to make sure this PR does not break IBM production system. As the binary name of runc is changed from |
I like the suggestion from Markus. Did I understand correctly that the conditioning is relatively easier for ansible than the dockerfile? |
The Dockerfile only ships docker binaries, right? How much overhead would it be to have multiple versions inside of the Dockerfile that we simply pick through configuration? |
@markusthoemmes $ ll -h docker-18.06
total 141M
drwxrwxr-x 2 style95 style95 4.0K Feb 20 11:26 ./
drwxr-xr-x 4 style95 style95 4.0K Apr 15 19:03 ../
-rwxr-xr-x 1 style95 style95 36M Feb 20 11:26 docker*
-rwxr-xr-x 1 style95 style95 26M Feb 20 11:26 docker-containerd*
-rwxr-xr-x 1 style95 style95 15M Feb 20 11:26 docker-containerd-ctr*
-rwxr-xr-x 1 style95 style95 4.0M Feb 20 11:26 docker-containerd-shim*
-rwxr-xr-x 1 style95 style95 51M Feb 20 11:26 dockerd*
-rwxr-xr-x 1 style95 style95 747K Feb 20 11:26 docker-init*
-rwxr-xr-x 1 style95 style95 2.8M Feb 20 11:26 docker-proxy*
-rwxr-xr-x 1 style95 style95 7.2M Feb 20 11:26 docker-runc* @rabbah Docker 1.12 -> 18.06 or higher
Docker 18.06 -> 18.09The name of IMHO, there are few options to have multiple versions of docker, but I think it would be easier to configure the version at the deployment time. For example, we can have both versions of docker binaries in the invoker as @markusthoemmes suggested. Keeping docker-1.12Besides of the above things, If we want to keep docker-1.12, we need to differentiate the ansible script based on the version flag as well. |
I see, thanks for the writeup. It looks like moving to 18.06 introduces the least friction for now and makes all parties kinda happy? If so, it's reasonable to make that move first and think about unblocking future upgrade later. |
@style95 thanks a lot for providing this PR - very thorough work. Particularly, the performance tests are helpful for deciding whether the update to a newer Docker version is a feasible. Some thoughts around the transient data directory
|
@style95 concerning the failing Jenkins test:
Wouldn't it be possible to work around this problem by setting |
|
||
Seq(docker, "--host", host + ":" + dockerPort, cmd, component) | ||
Seq(docker, cmd, component) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is the test supposed to work if there is more than one controller running and the controllers run on different systems?
The original test code determines which host is running the first controller and would ask the remote host's Docker daemon to start, stop and restart the controller container. With the change, the test permanently fails in our test environment that uses multiple systems in parallel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just want to completely disable remote Docker API from the code as we don't use it anymore in our normal use cases.
It seems remote docker API is only required for test cases.
We can selectively enable/disable remote API based on the deployment type such as
production or unit tests.
But it depends on the OW operator, there is still a possibility that Docker remote API is enabled without consciousness. And it could induce a security breach.
How about making this test rely on ssh
command instead?
Then what we need is just to make ssh connection available between target hosts and machine which runs tests.
(Generally, tests are executed in build machines such as jenkins, this requirement would be highly likely already met.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually opt for keeping the current approach with running Docker commands against remote systems. From a security perspective, it's a matter of how you run your Docker daemon. In test environments, you can open a TCP listening socket to accept connections from remote systems - and on production systems, you can just disable the TCP listening socket. The rest is how you configure openwhisk.
Today, the DockerClientWithFileAccess()
is created with an empty host
parameter anyway such that the local Docker daemon BSD stream socket is used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sense.
I just wanted to clean up this configuration as well: https://github.com/apache/incubator-openwhisk/pull/4430/files#diff-85b6ff9e51a5005c641ac4690b975b2cL55
But that's also a viable option.
I will work on it.
Thank you for the suggestion, I will try it. |
@sven-lange-last It seems introducing
|
2265246
to
bfa6fa9
Compare
…nd runc and the type of user
Let me share the discussion with @sven-lange-last on Slack for history. He suggested using We discussed to add Now let's see what happens in Jenkins CI. |
@style95 thanks a lot for the valuable discussion and your recent updates. Jenkins is working now. We still have two different problems in Travis:
The problem with
|
a377698
to
3f22d34
Compare
PG 4 / 2840 completed successfully. No failures. |
Finally! |
@@ -36,3 +36,4 @@ runtimes_enable_concurrency: true | |||
limit_action_concurrency_max: 500 | |||
|
|||
invoker1_machine: openwhisk-vm3-he-de | |||
invoker_use_runc: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@houshengbo do you have plans to update Jenkins VMs to a higher Docker version once this PR is merged? This PR will update Docker to a higher version on the CLI side so that we needed to switch off runc usage in the invoker...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for addressing all review feedback. Looks good to me now.
What do you think about giving a heads-up on the dev mailing list (again)? When merging this PR, a high Docker version is expected in development, test and production environments. So I suggest to ask whether somebody anticipates a general problem and to announce that this PR gets merged in 48 hours if nobody objects. Does that approach make sense to you?
@sven-lange-last Got it. |
81bea87
to
31603d2
Compare
Codecov Report
@@ Coverage Diff @@
## master #4430 +/- ##
==========================================
- Coverage 83.97% 80.91% -3.07%
==========================================
Files 170 170
Lines 7940 7943 +3
Branches 536 539 +3
==========================================
- Hits 6668 6427 -241
- Misses 1272 1516 +244
Continue to review full report at Codecov.
|
* Update docker version in the controller and guides * Update travis configuration to install docker=18.06.3 * Separate docker installation from the travis setup script * Add docker setup script * Add CoordinatedShutdown to cleanup runtime containers * add a configuration for root runc dir * Disable runc use in Jenkins environment * Add comments which explain the correlation among the version docker and runc and the type of user * Reenable Docker remote API again
Description
With this change, it is required to install Docker=18.06.3 on target servers.
This is a breaking change.
Related issue and scope
My changes affect the following components
Types of changes
Checklist: