-
Notifications
You must be signed in to change notification settings - Fork 52
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
Some changes to calls to Docker API for podman compatibility #463
Conversation
With that and this change synapse side I can run complement with podman rootless using:
|
9ea2e32
to
c5a43c0
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.
Looks reasonable to me
216f54c
to
5171c0e
Compare
It seems like the hack here was only needed because of the fact that the network name was not the one used when launching the container. |
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.
In theory LGTM, but I have outstanding questions on why seemingly unrelated things were modified. The most dangerous is the blunt removal of network disconnection code, which the comments explained why it existed, and yet this PR just removes without any reason.
EDIT: I see the reasoning now in your above comment.
internal/docker/deployer.go
Outdated
@@ -283,7 +275,7 @@ func deployImage( | |||
Mounts: mounts, | |||
}, &network.NetworkingConfig{ | |||
EndpointsConfig: map[string]*network.EndpointSettings{ | |||
contextStr: { | |||
"complement_" + pkgNamespace + "_" + blueprintName: { |
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.
Why aren't we using the contextStr
anymore?
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.
This needs to be the name of the network, which is not the case here.
We could also use the contextStr as the name of the network in createNetworkIfNotExists
, or makes createNetworkIfNotExists
returns both the ID and the network name and store both in Deployer
.
The latter looks like the cleaner way to do it so leaning towards that.
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.
Actually it seems like we can just use the name, ID is optional, at least with Podman.
I've push a change to return and use the network name instead of the ID, let's see if Docker is happy.
9b86309
to
f6a86a1
Compare
- Podman expects the network name specified when launching the container to match the name used when creating it, the spec is unclear about that - Adding labels when commiting a container needs to use "changes" query parameter instead of a POST json, which is unspecified - Add a config to specify the hostname where Complement on the host can be reached when inside a container. Podman uses "host.containers.internal"
f6a86a1
to
9e88e44
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.
Otherwise LGTM
@kegsay thanks for the review, I'll let you do a final round and merge. My Fedora is happy :) . |
changes
query parameter instead of a POST json, which is unspecifiedhost.containers.internal