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

Missing driver.json #3895

Closed
konstruktoid opened this issue Apr 25, 2023 · 6 comments
Closed

Missing driver.json #3895

konstruktoid opened this issue Apr 25, 2023 · 6 comments
Labels

Comments

@konstruktoid
Copy link
Contributor

Issue Type

  • Bug report

Molecule and Ansible details

Ubuntu 22.04.2 LTS Server:
https://gist.github.com/konstruktoid/664d9ca3d3f88941ecd69b45b4dd8d81

Molecule installation method (one of):

  • pip

Ansible installation method (one of):

  • pip

Desired Behavior

A working molecule run.

Actual Behaviour

 FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.11/site-packages/molecule_docker/driver.json'

https://gist.github.com/konstruktoid/4f5849e65989ecd2421b1aa52132d09a#file-vagrant_log-L38

$ molecule check
Traceback (most recent call last):
  File "/home/ubuntu/py310/bin/molecule", line 8, in <module>
    sys.exit(main())
  File "/home/ubuntu/py310/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/ubuntu/py310/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/ubuntu/py310/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/ubuntu/py310/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/ubuntu/py310/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/ubuntu/py310/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/ubuntu/py310/lib/python3.10/site-packages/molecule/command/check.py", line 70, in check
    base.execute_cmdline_scenarios(scenario_name, args, command_args)
  File "/home/ubuntu/py310/lib/python3.10/site-packages/molecule/command/base.py", line 94, in execute_cmdline_scenarios
    get_configs(args, command_args, ansible_args, glob_str),
  File "/home/ubuntu/py310/lib/python3.10/site-packages/molecule/command/base.py", line 185, in get_configs
    configs = [
  File "/home/ubuntu/py310/lib/python3.10/site-packages/molecule/command/base.py", line 186, in <listcomp>
    config.Config(
  File "/home/ubuntu/py310/lib/python3.10/site-packages/molecule/config.py", line 64, in __call__
    obj.after_init()
  File "/home/ubuntu/py310/lib/python3.10/site-packages/molecule/config.py", line 118, in after_init
    self._validate()
  File "/home/ubuntu/py310/lib/python3.10/site-packages/molecule/config.py", line 456, in _validate
    errors = schema_v3.validate(self.config)
  File "/home/ubuntu/py310/lib/python3.10/site-packages/molecule/model/schema_v3.py", line 61, in validate
    with open(schema_file, encoding="utf-8") as f:
FileNotFoundError: [Errno 2] No such file or directory
fauust added a commit to fauust/ansible-role-mariadb that referenced this issue Apr 26, 2023
Add ansible collection specific requirements since they are no more
installed by default. Also, installing molecule-podman cause error
(ansible/molecule#3895)
fauust added a commit to fauust/ansible-role-mariadb that referenced this issue Apr 26, 2023
Add ansible collection specific requirements since they are no more
installed by default. Also, installing molecule-podman cause error
(ansible/molecule#3895)
@apatard
Copy link
Contributor

apatard commented Apr 26, 2023

for non irc/matrix users, I've written a patch, found in draft PR #3898

It may solve the issue but I'd like to get testing before thinking about getting the PR merged. So, feedback welcome

@fauust
Copy link
Contributor

fauust commented Apr 26, 2023

Hi!
I had the exact same problem with the podman driver and I "resolved" this by not installing molecule-podman but only molecule-plugins, see https://github.com/fauust/ansible-role-mariadb/pull/35/files#diff-4d7c51b1efe9043e44439a949dfd92e5827321b34082903477fd04876edb7552.

But I am not sure what's going on, also I did not had the problem with python3.9 (only with python3.10 and python3.11).

@apatard
Copy link
Contributor

apatard commented Apr 26, 2023

@fauust yeah, I found out later that the error was also related to having the "old" plugin modules like molecule-podman or molecule-docker or molecule-vagrant. They should not be used any more and molecule-plugins should be used. Still, it's not fine to break systems for people having both installed. Unused code should not break things.

fauust added a commit to fauust/molecule that referenced this issue Apr 26, 2023
If one upgrade from previous molecule versions, and since drivers are now
provided by the molecule-plugins, molecule-podman|docker|vagrant
packages needs to be removed.

See: ansible#3895
@fauust
Copy link
Contributor

fauust commented Apr 26, 2023

@apatard I could not agree more with you but I am kind of used that molecule release break stuff :)
Here is a documentation improvement suggestion #3899.

@fauust
Copy link
Contributor

fauust commented Apr 26, 2023

Seems like a duplicate of #3883.

fauust added a commit to fauust/molecule that referenced this issue Apr 26, 2023
If one upgrade from previous molecule versions, and since drivers are now
provided by the molecule-plugins, molecule-podman|docker|vagrant
packages needs to be removed.

See:
- ansible#3883
- ansible#3895
fauust added a commit to fauust/molecule that referenced this issue Apr 26, 2023
If one upgrade from previous molecule versions, and since drivers are now
provided by the molecule-plugins, molecule-podman|docker|vagrant
packages needs to be removed.

See:
- ansible#3883
- ansible#3895
@apatard
Copy link
Contributor

apatard commented Apr 26, 2023

The backtrace is different. While it's triggered by installing molecule[docker] instead of molecule-plugins[docker], molecule should catch this properly. IMHO, a backtrace due to missing driver should not exist and be fixed.

ziegenberg added a commit that referenced this issue Jun 7, 2023
If one upgrade from previous molecule versions, and since drivers are now
provided by the molecule-plugins, molecule-podman|docker|vagrant
packages needs to be removed.

See:
- #3883
- #3895

Co-authored-by: Daniel Ziegenberg <daniel@ziegenberg.at>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants