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

ansible-galaxy collection build failing to find meta file #59451

Closed
ironfroggy opened this issue Jul 23, 2019 · 1 comment · Fixed by #59452
Closed

ansible-galaxy collection build failing to find meta file #59451

ironfroggy opened this issue Jul 23, 2019 · 1 comment · Fixed by #59452
Labels
affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. has_pr This issue has an associated PR. python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team. traceback This issue/PR includes a traceback.

Comments

@ironfroggy
Copy link

ironfroggy commented Jul 23, 2019

SUMMARY

ansible-galaxy collection build fails when unable to locate new lib/ansible/galaxy/data/collections_galaxy_meta.yml data file.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

ansible-galaxy

ANSIBLE VERSION
ansible 2.9.0.dev0
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/calvin/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/calvin/projects/ansible/lib/ansible
  executable location = /home/calvin/.local/share/virtualenvs/orion/bin/ansible
  python version = 3.6.8 (default, Mar 21 2019, 10:08:12) [GCC 8.3.1 20190223 (Red Hat 8.3.1-2)]

CONFIGURATION

OS / ENVIRONMENT

Fedora 28, should affect all versions OS tho

STEPS TO REPRODUCE
  • Install latest devel branch of ansible without the pip -e flag
  • Attempt to build a collection with ansible-galaxy collection build
EXPECTED RESULTS

Expect the collection to be built and a .tar.gz artifact to be created.

ACTUAL RESULTS
ansible-galaxy 2.9.0.dev0
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/calvin/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/calvin/.local/share/virtualenvs/orion/lib/python3.6/site-packages/ansible
  executable location = /home/calvin/.local/share/virtualenvs/orion/bin/ansible-galaxy
  python version = 3.6.8 (default, Mar 21 2019, 10:08:12) [GCC 8.3.1 20190223 (Red Hat 8.3.1-2)]
Using /etc/ansible/ansible.cfg as config file
Opened /home/calvin/.ansible_galaxy
ERROR! Unexpected Exception, this is probably a bug: [Errno 2] No such file or directory: b'/home/calvin/.local/share/virtualenvs/orion/lib/python3.6/site-packages/ansible/galaxy/data/collections_galaxy_meta.yml'
the full traceback was:

Traceback (most recent call last):
  File "/home/calvin/.local/share/virtualenvs/orion/bin/ansible-galaxy", line 111, in <module>
    exit_code = cli.run()
  File "/home/calvin/.local/share/virtualenvs/orion/lib/python3.6/site-packages/ansible/cli/galaxy.py", line 269, in run
    context.CLIARGS['func']()
  File "/home/calvin/.local/share/virtualenvs/orion/lib/python3.6/site-packages/ansible/cli/galaxy.py", line 398, in execute_build
    build_collection(collection_path, output_path, force)
  File "/home/calvin/.local/share/virtualenvs/orion/lib/python3.6/site-packages/ansible/galaxy/collection.py", line 360, in build_collection
    collection_meta = _get_galaxy_yml(b_galaxy_path)
  File "/home/calvin/.local/share/virtualenvs/orion/lib/python3.6/site-packages/ansible/galaxy/collection.py", line 528, in _get_galaxy_yml
    meta_info = get_collections_galaxy_meta_info()
  File "/home/calvin/.local/share/virtualenvs/orion/lib/python3.6/site-packages/ansible/galaxy/__init__.py", line 38, in get_collections_galaxy_meta_info
    with open(to_bytes(meta_path, errors='surrogate_or_strict'), 'rb') as galaxy_obj:
FileNotFoundError: [Errno 2] No such file or directory: b'/home/calvin/.local/share/virtualenvs/orion/lib/python3.6/site-packages/ansible/galaxy/data/collections_galaxy_meta.yml'

@sivel
Copy link
Member

sivel commented Jul 23, 2019

#59452 should resolve this.

Thank you for reporting this.

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. has_pr This issue has an associated PR. needs_triage Needs a first human triage before being processed. python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team. traceback This issue/PR includes a traceback. labels Jul 23, 2019
@sivel sivel removed the needs_triage Needs a first human triage before being processed. label Jul 24, 2019
@ansible ansible locked and limited conversation to collaborators Aug 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. has_pr This issue has an associated PR. python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team. traceback This issue/PR includes a traceback.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants