Bug 1653467 - python-molecule is not functional, provisioner ansible directory is missing
Summary: python-molecule is not functional, provisioner ansible directory is missing
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-molecule
Version: 31
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Brett Lentz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-26 22:27 UTC by Nicolas Hicher
Modified: 2023-09-14 04:42 UTC (History)
7 users (show)

Fixed In Version: python-molecule-3.0.2-6.fc32 python-molecule-3.0.2-6.fc31
Clone Of:
Environment:
Last Closed: 2020-05-04 04:55:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
spec file (7.42 KB, text/plain)
2019-02-16 16:01 UTC, chedi toueiti
no flags Details
adding support for resources files in the python build (578 bytes, patch)
2019-02-16 16:01 UTC, chedi toueiti
no flags Details | Diff

Description Nicolas Hicher 2018-11-26 22:27:07 UTC
Description of problem:

When I try to create and test a simple scenario molecule failed when it try to destroy the instance

Version-Release number of selected component (if applicable):
python3-molecule-2.19-2.fc29.noarch

How reproducible:
Always

Steps to Reproduce:
dnf install python3-molecule yamllint python3-ansible-lint docker -y

molecule init role -r dummy
cd dummy
molecule test

Actual results:
Command failed with:
...
--> Scenario: 'default'
--> Action: 'destroy'
ERROR! the playbook: None could not be found
ERROR: 
An error occurred during the test sequence action: 'destroy'. Cleaning up.
--> Scenario: 'default'
--> Action: 'destroy'
ERROR! the playbook: None could not be found
ERROR: 


Expected results:
command finish with error

Additional info:

On https://github.com/ansible/molecule/tree/master/molecule/provisioner there is  an ansible directory which containts create.yml and destroy.yml for docker, lxc and vagrant. Adding this directory on /usr/lib/python3.7/site-packages/molecule/provisioner/ fix the issue (the job failed, but I didn't debug yet)

...
--> Scenario: 'default'
--> Action: 'destroy'
    
    PLAY [Destroy] *****************************************************************
    
    TASK [Destroy molecule instance(s)] ********************************************
    changed: [localhost] => (item=None)
    changed: [localhost]

Thanks

Comment 1 chedi toueiti 2019-02-10 20:58:17 UTC
I confirm that there is a missing folder for the provisioning drivers. Had to copy it manually from a virtual environment to get molecule working again.

sudo cp -r ~/.cache/virtualenv/molecule/lib/python3.7/site-packages/molecule/provisioner/ansible/ /usr/lib/python3.7/site-packages/molecule/provisioner/

tree ~/.cache/virtualenv/molecule/lib/python3.7/site-packages/molecule/provisioner/ansible/

~/.cache/virtualenv/molecule/lib/python3.7/site-packages/molecule/provisioner/ansible/
├── playbooks
│   ├── docker
│   │   ├── create.yml
│   │   └── destroy.yml
│   ├── lxd
│   │   ├── create.yml
│   │   ├── destroy.yml
│   │   └── prepare.yml
│   └── vagrant
│       ├── create.yml
│       └── destroy.yml
└── plugins
    ├── filters
    │   ├── molecule_core.py
    │   └── __pycache__
    └── libraries
        ├── molecule_vagrant.py
        └── __pycache__

Comment 2 chedi toueiti 2019-02-16 16:01:01 UTC
Created attachment 1535524 [details]
spec file

Comment 3 chedi toueiti 2019-02-16 16:01:46 UTC
Created attachment 1535525 [details]
adding support for resources files in the python build

Comment 4 chedi toueiti 2019-02-16 16:19:48 UTC
Quick update:

after some fiddling, I found the issue with the missing files. The %prep stage that executes 


python2 setup.py build '--executable=/usr/bin/python2 -s'

fails to capture the ansible folder under provisionner because it's not a python module. So the solution
is the change the setup.py and add a Manifest.in file to force it to do so.

the details are in this issue 

https://github.com/ansible/molecule/issues/1753

the dev team at molecule were favourable to my proposed changes. So now we will just have to wait for them
to review and bump the version.

as for the fedora side, I uploaded a modified spec file and a patch that fix this issue to, so it's up to the 
packager to rebuild them.

Comment 5 Fedora Update System 2019-08-31 16:04:43 UTC
FEDORA-2019-95a631828d has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-95a631828d

Comment 6 Ben Cotton 2019-10-31 18:53:35 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 7 Drew Northup 2019-10-31 21:09:23 UTC
This bug applies for Fedora 30, and so far as I can tell for Fedora 31 as well. Please fix promptly. It is not necessary to move to 2.22 if that's what is holding things back. The same fix applies for 2.20.1 of the molecule code as built with 4bf5f65 from the Fedora Sources python-molecule repository on Fedora 30.

Comment 8 Ben Cotton 2019-11-27 18:21:41 UTC
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 9 Fedora Update System 2020-04-25 15:14:09 UTC
FEDORA-2020-da7af6e03f has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2020-da7af6e03f

Comment 10 Fedora Update System 2020-04-25 15:14:10 UTC
FEDORA-2020-0c221024ae has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-0c221024ae

Comment 11 Fedora Update System 2020-04-25 15:14:11 UTC
FEDORA-2020-fd94e0d12d has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-fd94e0d12d

Comment 12 Fedora Update System 2020-04-26 04:15:07 UTC
FEDORA-2020-0c221024ae has been pushed to the Fedora 31 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-0c221024ae`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-0c221024ae

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2020-04-26 04:29:08 UTC
FEDORA-2020-fd94e0d12d has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-fd94e0d12d`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-fd94e0d12d

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 14 Fedora Update System 2020-04-26 04:51:20 UTC
FEDORA-2020-da7af6e03f has been pushed to the Fedora 30 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-da7af6e03f`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-da7af6e03f

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 15 Fedora Update System 2020-05-04 04:55:58 UTC
FEDORA-2020-fd94e0d12d has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 16 Fedora Update System 2020-05-04 05:49:07 UTC
FEDORA-2020-0c221024ae has been pushed to the Fedora 31 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 17 Red Hat Bugzilla 2023-09-14 04:42:48 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


Note You need to log in before you can comment on or make changes to this bug.