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

molecule fails to reset itself when driver is changed in config #2540

Open
ssbarnea opened this issue Feb 7, 2020 · 2 comments
Open

molecule fails to reset itself when driver is changed in config #2540

ssbarnea opened this issue Feb 7, 2020 · 2 comments
Labels

Comments

@ssbarnea
Copy link
Member

ssbarnea commented Feb 7, 2020

I observed that molecule gets confused when a driver is swithced inside a scenario, like moving from delegated to docker casing confusing errors that do not give a hint about what caused them.

--> Action: 'destroy'
ERROR! the playbook: None could not be found

An error occurred during the test sequence action: 'destroy'. Cleaning up.
ERROR:
--> Scenario: 'foo'
--> Action: 'cleanup'
Skipping, cleanup playbook not configured.
--> Scenario: 'foo'
--> Action: 'destroy'
ERROR! the playbook: None could not be found

Funny part is that this scenario is not supposed to have these playbooks.

Removing temp files of molecule does solve the issue, but most users do not even know where these are located.

I am not yet sure how we can decide when we are in a tainted environment and to suggest performing a reset as we do want to do it by accident. Maybe timestamping molecule.yml file would be enough? When this is changed we can throw a clearly visible warning which tells user that config was tainted since last run and that they may want to do a reset if somethign fails.

@ssbarnea ssbarnea added the bug label Feb 7, 2020
@Daniel-Sanchez-Fabregas

Thanks @ssbarnea, removed temporal files (in my case ~/.cache/molecule/) as workaround and everything ok.

@ssbarnea ssbarnea changed the title molecule fails to reset itself when driver is changes molecule fails to reset itself when driver is changed in config Feb 10, 2020
@ssbarnea ssbarnea self-assigned this Feb 10, 2020
@ssbarnea
Copy link
Member Author

There is now the molecule reset command that can do this but is not run automatically.

If anyone wants to implement this it would be really nice first feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Community
Development

No branches or pull requests

2 participants