-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Not working in Bitbucket pipeline: "authorization denied by plugin pipelines: Command not supported." #700
Comments
testcontainers |
Hey @4ntoine, thank for the feedback regarding Bitbucket pipeline. |
Hey @kiview test-containers works in pipelines, the issue above (as I described here: https://bitbucket.org/site/master/issues/15844/bug-in-authorization-plugin#comment-45561539) is not an issue in the auth plugin interaction with the custom java docker client nor an issue with how the library talks to docker (its working fine over tcp) its in how the MySqlContainer class by default mounts the mysql.conf file. Users will (in order for this to work on pipelines), need to reconfigure the default (hostPath) directory for this file as we limit what paths can be mounted into docker containers due to the layout of how the containers and filesystems interact, and than the library works fine :) |
Hi @nathanburrell, thanks a lot for the clarification. |
…ization denied by plugin pipelines: Command not supported." Detecting Bitbucket build and creating temporary files/dirs within BITBUCKET_CLONE_DIR.
sorry i did not have time to fix, but i was able to use https://github.com/palantir/docker-compose-rule instead (it works) |
Can you provide a way to disable Ryuk?
It's ignoring first exception caused by Ryuk trying to connect to |
Hi @dstepanov, DIsabling Ryuk doesn't fix the issue, rather delays it. Does it work if you disable the startup checks? See here how to do that: https://www.testcontainers.org/usage/properties.html |
It doesn’t, you cannot mount docker.sock which is outside bitbucket directory.
Bitbucket pipeline doesn’t need Ryuk anyway, it will do cleaning anyway.
Is there a way at least to let Ryuk use tcp?
6. 8. 2018 v 16:23, Sergei Egorov <[email protected]>:
… Hi @dstepanov,
DIsabling Ryuk doesn't fix the issue, rather delays it. Does it work if you disable the startup checks? See here how to do that: https://www.testcontainers.org/usage/properties.html
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Hi, Im a developer on bitbucket pipelines, since ryuk can only communicate with a docker daemon over its unix socket currently (and the fact that pipelines only allows communication with the steps docker daemon over TCP), we have since relaxed the mounts allowed in pipelines to allow mounting in the unix socket for the steps docker daemon, which now allows ryuk to run correctly :) Kind Regards, |
Note that the MySqlContainer probably still needs work if it uses a mount point for the |
@nathanburrell |
@erikvanzijst We're working on mount-less file sharing (with copyFileToContainer with InputStream on container creation), it should fix the issue you mentioned. Will be released very soon :) |
@nathanburrell Awesome, thanks! |
@nathanburrell Great news! Thanks! |
@nathanburrell As of today's morning versions testcontainers fail on Bitbucket pipelines with:
|
@nathanburrell Older versions fails with old error:
|
@dstepanov is it with 1.9.1? |
@bsideup 1.9.0 and 1.9.1 |
Hi, We rolled out a change yesterday to enable user namespace remapping on the docker daemons we provide to users for security reasons. Thats an odd failure but, with this change I would expect to see
Have you got a link to a reproducible test case showing this, or alternatively can you raise a support ticket at https://support.atlassian.com/contact, so I can investigate further. Kind Regards, |
@nathanburrell Why wouldn't you include a simple testcontainers project to test your changes? Now all our builds are down because of this. |
I understand your frustration when we make changes like this and I apoligise, but unfortunately security fixes may sometimes break some builds for the good of all the users of pipelines. For test containers we don't test it specifically as we have lots of users that use 1000s of different libraries from a broad range of different languages that perform similar functionality and we can't test all the things unfortunately. I haven't had a chance to look into why test containers is failing yet due to other urgencies, and as I listed above I'm surprised a connection to local host is failing as I expect only the two cases above to fail. For now I have added your account to the exclusion list to allow you to work, next time can you raise a support ticket with Atlassian directly so we can back to you in a more timely manner as I also don't monitor GitHub issues alot only in my spare time :) Kind Regards |
Hi @nathanburrell! Thanks for checking it at all 👍 |
being able to disable ryuk would be great. For many cases this should be sufficient since the cloud provider will cleanup by itself. Even if it does not solve the problem completely, it would at least allow to work around it. |
is there an interest in a PR for such a property? For our use cases we don't really need ryuk. |
I've been trying to get up to speed on this issue, as seen here and in #712. Sorry for only recently looking into this. To summarise my understanding so far:
I'd like to think carefully about the options; disabling Ryuk might be one way of avoiding access from TC-spawned to the docker daemon. However, it's less desirable because it is not the only feature that will suffer (Docker Compose is another). Also, it creates yet another permutation for Testcontainers to operate in, one which lacks a lot of the safeguards for cleanup that we think are important. I don't feel comfortable yet with the implications of that. Still, this is probably something that @kiview, @bsideup and I need to have a discussion about soon. |
Hey :) Any updates on this, as we are planning on removing the exclusion list in the next month from pipelines. Kind Regards, |
Hey @rnorth , Any updates on this? Have you guys discussed it internally (cc: @kiview @bsideup)? Having an opt-out parameter to disable Ryuk would work for all CI/CD use cases (like Bitbucket Pipelines). At the moment we have two sets of customers impacted:
I would appreciate your help here, so that we reduce the impact to our customers and they can keep using testcontainers happily in Bitbucket Pipelines. Cheers, |
Hi Raul, Nathan, @bsideup is working on it and we’d like to get this released very soon and communicated out to users. Thank you for your help, and I apologise again. Richard Sent with GitHawk |
Hi @raulgomis, This will be a quite non invasive hack/fix and most probably won't impact the Testcontainers UX on Bitbucket Pipelines negatively, since the containers should be removed by CI environment automatically after the build. |
Great news! Thanks a lot team 🙌, our users will love that you guys are planning to fix it. Cheers, |
Hi @raulgomis & @nathanburrell, I just pushed a PR: If you set Please try it with Jitpack (revision |
@schrieveslaach thanks for trying! FYI the |
@bsideup, thanks for pointing out this PR. I was going to ask you exactly that question. 😉 |
We've now released this in Testcontainers 1.10.6! Please upgrade as soon as you can and follow the steps here for disabling Ryuk: https://www.testcontainers.org/features/configuration/#disabling-ryuk I'll close this ticket now, but please keep us posted if there are any new issues with this. |
Thanks a lot, this is working like a charm in Bitbucket 😄 |
Thanks for actioning this quickly :) We are organising some communicuations to customers in the coming weeks to tell them to update and set that variable, and I can also continue to start using test-containers more in the pipelines codebase itself ;) |
Hey, @nathanburrell is test-containers fully working on the bitbucket pipeline at this point? I'm, guessing that it is, but I'm having some problems using it with Cassandra. Basically, locally the tests passed but on bitbucket pipeline that seems to be a problem to communicate with the Cassandra container. |
Hi, Thanks a lot. The issues #700 and #1135 helped me, to get testcontainers running in Jenkins with
|
It seems upgrading test containers version to 1.16.0 solved the issue. |
It seems to be both docker and testcontainers issue:
Fabric docker plugin had the same issue and they were able to fix it with relatively small changes in plugin. See issues:
This is blocker issue and can be easily fixed.
The text was updated successfully, but these errors were encountered: