Skip to content
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

Setting ipcMode to container:[...] always results in a change #1354

Open
kumavis opened this issue Feb 6, 2025 · 1 comment
Open

Setting ipcMode to container:[...] always results in a change #1354

kumavis opened this issue Feb 6, 2025 · 1 comment
Labels
awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). kind/bug Some behavior is incorrect or out of spec

Comments

@kumavis
Copy link

kumavis commented Feb 6, 2025

Describe what happened

ipc docs https://docs.docker.com/reference/cli/docker/container/run/#ipc

setting ipcMode to container:${otherContainerName} results in pulumi always recognizing a change, bc docker resolves otherContainerName to its container id and responds with the container state having ipcMode container:$idOfOtherContainer

understanding this i tried setting it as a computed value of the output of the other container, but this resulted in pulumi also always recognizing it as having changed bc its set as a computed value (?)

ipcMode: otherContainer.id.apply(id => `container:${id}`)

Sample program

const imageA = new docker.RemoteImage(serviceNameA, { name: imageNameA }, { provider });
const containerA = new docker.Container(serviceNameA, {
  image: imageA.imageId,
  name: serviceNameA,
  // this works fine, marks container A as the host for another's ipcMode=container
  ipcMode: 'shareable',
});

const imageB = new docker.RemoteImage(serviceNameB, { name: imageNameB }, { provider });
const containerB = new docker.Container(serviceNameB, {
  image: imageB.imageId,
  name: serviceNameB,

  // either of this configurations always result in pulumi detecting a change
  ipcMode: `container:${serviceNameA}`,
  // ipcMode: containerA.id.apply(id => `container:${id}`)
}, { dependsOn: [containerA] });

Log output

from pulumi up details

      ~ ipcMode: "container:481c0030d79235f891145fd0db303c53c5c1180f02979de6584cf73091b72047" => "container:otherContainerName"

Affected Resource(s)

pulumi-docker

Output of pulumi about

x

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@kumavis kumavis added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Feb 6, 2025
@rquitales
Copy link
Member

Thanks for bringing to our attention. This seems like an error with how the ipcMode field is normalized in the upstream provider. We'll keep an eye on this in the meantime to see if there are any workarounds possible.

@rquitales rquitales added awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). and removed needs-triage Needs attention from the triage team labels Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

2 participants