Fix/login command
Description
When using Podman the login is not working the way it should.
Issues Resolved
N/A
Type of Change
This is just a quick fix
The most important prefixes you should have in mind are:
_fix_: which represents bug fixes, and correlates to a SemVer patch._feat_: which represents a new feature, and correlates to a SemVer minor._feat!_:, orfix!:,refactor!:, etc., which represent a breaking change (indicated by the !) and will result in a major version change.
If you have not included a conventional commit message, this can be fixed on merge.
Hello,
Any love regarding this PR?
hello @jmauro I tried to reproduce the login issue with podman but was unable to do so. Could you please create the issue, write the detailed steps to reproduce it, and link to this PR?
Hello,
To reproduce: just use podman has test-kitchen driver then kitchen-test login <your_suite> once the kitchen-test suite have been created.
The login command hard coded the docker binary so I don't see how you could manage, but I might be wrong.
Kind regards, JM
@jmauro Which OS you are using ? Yeah agree, it's Hardcode.
Thing is to use Podman API , usually we change reference the DOCKER_HOST variable to Podman socket
Hello,
I am running on Linux (Debian). I don't see how this is related to the definition of the DOCKER_HOST, I don't have docker install on my computer, so no work around could help me. I am fully using podman service to do all the API work, meaning any docker reference is not working on my computer.
Kind regards, JM
Hello @matschaffer,
Any news ? Were you able to reproduce the issue ?
Kind Regards, JM
@jmauro
To interact with Docker kitchen-dokken determine the socket on which DOCKER_HOST is currently running. In this podman scenario we usually change the DOCKER_HOST to podman.socket. So communication happens with Podman. By default podman.socket runs on ///run/user/1000/podman/podman.sock
Can you please share the log what happens actually when you exec login command? And can you also verify is kitchen test is working fine
@jmauro To interact with Docker
kitchen-dokkendetermine the socket on whichDOCKER_HOSTis currently running. In this podman scenario we usually change theDOCKER_HOSTto podman.socket. So communication happens with Podman. By default podman.socket runs on///run/user/1000/podman/podman.sockCan you please share the log what happens actually when you exec login command? And can you also verify is
kitchen testis working fine
Hello, Sorry for the delay. So I think I was not clear enough: Here is the trick I used:
$ ls -al /usr/bin/docker
lrwxrwxrwx 1 root root 8 Apr 26 14:44 /usr/bin/docker -> ./podman
$ $ kitchen login workstation-debian-12
root@dokken:/#
logout
$
Now let's remove the link:
$ rm /usr/bin/docker
$ kitchen login workstation-debian-12
/home/debian/.gem/ruby/3.0.4/gems/test-kitchen-3.3.2/lib/kitchen/instance.rb:221:in `exec': No such file or directory - docker (Errno::ENOENT)
from /home/debian/.gem/ruby/3.0.4/gems/test-kitchen-3.3.2/lib/kitchen/instance.rb:221:in `login'
from /home/debian/.gem/ruby/3.0.4/gems/test-kitchen-3.3.2/lib/kitchen/command/login.rb:35:in `call'
from /home/debian/.gem/ruby/3.0.4/gems/test-kitchen-3.3.2/lib/kitchen/cli.rb:52:in `perform'
from /home/debian/.gem/ruby/3.0.4/gems/test-kitchen-3.3.2/lib/kitchen/cli.rb:257:in `login'
from /home/debian/.gem/ruby/3.0.4/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
from /home/debian/.gem/ruby/3.0.4/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
from /home/debian/.gem/ruby/3.0.4/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
from /home/debian/.gem/ruby/3.0.4/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
from /home/debian/.gem/ruby/3.0.4/gems/test-kitchen-3.3.2/bin/kitchen:11:in `block in <top (required)>'
from /home/debian/.gem/ruby/3.0.4/gems/test-kitchen-3.3.2/lib/kitchen/errors.rb:183:in `with_friendly_errors'
from /home/debian/.gem/ruby/3.0.4/gems/test-kitchen-3.3.2/bin/kitchen:11:in `<top (required)>'
from /home/debian/.gem/ruby/3.0.4/bin/kitchen:25:in `load'
from /home/debian/.gem/ruby/3.0.4/bin/kitchen:25:in `<main>'
So when applying my patch here works as expected.
I hope it is clearer.
Kind regards, JM