# Data migration to the new galaxy.ansible.com

**URL:** <https://forum.ansible.com/t/data-migration-to-the-new-galaxy-ansible-com/1321>\
**Category:** Get Help\
**Tags:** bug, namespace, galaxy-ng\
**Created:** [October 1, 2023, 5:53pm UTC](https://forum.ansible.com/t/data-migration-to-the-new-galaxy-ansible-com/1321 "2023-10-01T17:53:51Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![bittner](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/bittner/32/900_2.png) [@bittner](https://forum.ansible.com/u/bittner)\
**Post date:** [October 1, 2023, 5:53pm UTC](https://forum.ansible.com/t/data-migration-to-the-new-galaxy-ansible-com/1321/1 "2023-10-01T17:53:51Z")

</div>

We had some things (namespaces, roles, collections) corrected - probably manually - on the legacy Galaxy instance, in the past (see GitHub [ansible/galaxy#2535](https://github.com/ansible/galaxy/issues/2535)). It looks like the data was attempted to migrate, but the - presumably manual - corrections seem to have caused duplicate namespaces and roles.

See, for example, the role `painless.software` I maintain:

- Role: “painless.software” → `https://galaxy.ansible.com/ui/standalone/roles/painless/software/`
- GitHub repository: “painless-software/ansible-role-software” → `https://github.com/painless-software/ansible-role-software`

Note that the content on the role page of the new Galaxy instance points to a non-existing repository on GitHub, because it assumes the 1:1 mapping of Ansible namespace and GitHub user or org name.

Note that I do _not_ own the “painless” user or org name on GitHub.

The resources now found on Galaxy are:

- Searching in _Roles \> Role Namespaces_ for “painless” yields 2 results:
  1. “painless-software” (_incorrect_ namespace, correct icon)
  2. “painless” (correct namespace, _incorrect_ icon → looks like GitHub user “painless”)

- Searching in _Collections \> Namespaces_ for “painless” yields only 1 result:
  1. “painless” (correct namespace, correct icon)
  2. (Note: Nothing is found searching for “painless-software”)

- Role “painless-software.software” → `https://galaxy.ansible.com/ui/standalone/roles/painless-software/software/` (_incorrect_ namespace, correct icon)
- Role “painless.software” → `https://galaxy.ansible.com/ui/standalone/roles/painless/software/` (correct namespace, _incorrect_ icon → looks like GitHub user “painless”)
- Namespace for Roles, “painless-software” → `https://galaxy.ansible.com/ui/standalone/namespaces/5371/` (_incorrect_ namespace, correct icon)
- Namespace for Roles, “painless” → `https://galaxy.ansible.com/ui/standalone/namespaces/9580/` (correct namespace, _incorrect_ icon → looks like GitHub user “painless”)
- Namespace for Collections, “painless-software” → `https://galaxy.ansible.com/ui/namespaces/painless-software/` (404 Not Found → which is correct)
- Namespace for Collections, “painless” → `https://galaxy.ansible.com/ui/namespaces/painless/` (correct namespace, correct icon)

_Sorry for the plain URLs; as a new user I’m not allowed to have more than 2 URLs in a post._

Also, as a consequence, my users cannot install the `painless.software` role anymore; it must now be called `painless-software.software` for the installation to succeed: 💣

 

```console
$ ansible-galaxy install painless.software
Starting galaxy role install process
- downloading role 'software', owned by painless
- downloading role from https://github.com/painless/ansible-role-software/archive/master.tar.gz
 [ERROR]: failed to download the file: HTTP Error 404: Not Found
[WARNING]: - painless.software was NOT installed successfully.
ERROR! - you can use --ignore-errors to skip failed roles and finish processing the list.

```

 

Will this be corrected in an already-planned cleanup task?

Should users report such discrepancies?

---

<div class="post-metadata">

**Author:** ![bittner](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/bittner/32/900_2.png) [@bittner](https://forum.ansible.com/u/bittner)\
**Post date:** [October 3, 2023, 10:20am UTC](https://forum.ansible.com/t/data-migration-to-the-new-galaxy-ansible-com/1321/2 "2023-10-03T10:20:00Z")

</div>

Similar, if not identical, issue: [Namespace issue with new galaxy.ansible.com](http://forum.ansible.com/t/namespace-issue-with-new-galaxy-ansible-com/1325)

---

<div class="post-metadata">

**Author:** ![bittner](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/bittner/32/900_2.png) [@bittner](https://forum.ansible.com/u/bittner)\
**Post date:** [October 3, 2023, 10:25am UTC](https://forum.ansible.com/t/data-migration-to-the-new-galaxy-ansible-com/1321/3 "2023-10-03T10:25:20Z")

</div>

I’d like to suggest to RedHat personnel responsible for Ansible Galaxy to make the link to the source code repository a user-modifiable project setting. Linking it hard to both GitHub as such and a GitHub namespace identical to the Ansible (role) namespace is not practical.

Not with the many exceptions that seem to have been added to the projects, seemingly in a manual fashion (on the legacy Galaxy instance). That said, please don’t make the same mistake - of manual changes while keeping the automatic namespace scheme in place - again on the now-new Galaxy.

---

<div class="post-metadata">

**Author:** ![bittner](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/bittner/32/900_2.png) [@bittner](https://forum.ansible.com/u/bittner)\
**Post date:** [October 6, 2023, 12:07pm UTC](https://forum.ansible.com/t/data-migration-to-the-new-galaxy-ansible-com/1321/4 "2023-10-06T12:07:40Z")

</div>

Any feedback when this will be fixed? My users cannot install the `painless.software` role. At least a timeline would be good. ⏲

---

<div class="post-metadata">

**Author:** ![tannerjc](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/tannerjc/32/985_2.png) [@tannerjc](https://forum.ansible.com/u/tannerjc)\
**Post date:** [October 6, 2023, 7:43pm UTC](https://forum.ansible.com/t/data-migration-to-the-new-galaxy-ansible-com/1321/5 "2023-10-06T19:43:27Z")

</div>

I have confirmed that the issue being tracked here [Loading...](https://issues.redhat.com/browse/AAH-2740) and being fixed here [github\_user should override namespace.name for legacy roles. by jctanner · Pull Request #1923 · ansible/galaxy\_ng · GitHub](https://github.com/ansible/galaxy_ng/pull/1923) will resolve the painless role installs.

```auto
(venv) [jtanner@p1 galaxy_ng.legacy_role_mapping]$ rm -rf ~/.ansible; rm -rf roles; ansible-galaxy role install -p roles -s 'http://localhost:5001' painless.software
Starting galaxy role install process
- downloading role 'software', owned by painless
- downloading role from https://github.com/painless-software/ansible-role-software/archive/master.tar.gz
- extracting painless.software to /home/jtanner/workspace/github/jctanner.redhat/galaxy_ng.legacy_role_mapping/roles/painless.software
- painless.software (master) was installed successfully

```

---

<div class="post-metadata">

**Author:** ![bittner](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/bittner/32/900_2.png) [@bittner](https://forum.ansible.com/u/bittner)\
**Post date:** [October 6, 2023, 10:00pm UTC](https://forum.ansible.com/t/data-migration-to-the-new-galaxy-ansible-com/1321/6 "2023-10-06T22:00:04Z")

</div>

Sounds good, thank you!

Related to that, what about the branch? Why is the new Gelaxy still resolving to `master` although `github_branch: main` is defined in [`meta/main.yml`](https://github.com/painless-software/ansible-role-software/blob/main/meta/main.yml#L11)?

---

<div class="post-metadata">

**Author:** ![tannerjc](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/tannerjc/32/985_2.png) [@tannerjc](https://forum.ansible.com/u/tannerjc)\
**Post date:** [October 7, 2023, 1:49pm UTC](https://forum.ansible.com/t/data-migration-to-the-new-galaxy-ansible-com/1321/7 "2023-10-07T13:49:27Z")

</div>

@bittner good question. I’ll look at that field as well.

---

<div class="post-metadata">

**Author:** ![tannerjc](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/tannerjc/32/985_2.png) [@tannerjc](https://forum.ansible.com/u/tannerjc)\
**Post date:** [October 10, 2023, 7:58pm UTC](https://forum.ansible.com/t/data-migration-to-the-new-galaxy-ansible-com/1321/8 "2023-10-10T19:58:36Z")

</div>

The PR got merged and deployed. Branches are captured and exposed now, and the github\_user and github\_repo fields look correct as well as my installation testing for the related roles.

---

<div class="post-metadata">

**Author:** ![bittner](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/bittner/32/900_2.png) [@bittner](https://forum.ansible.com/u/bittner)\
**Post date:** [October 11, 2023, 2:20pm UTC](https://forum.ansible.com/t/data-migration-to-the-new-galaxy-ansible-com/1321/9 "2023-10-11T14:20:50Z")

</div>

Now it works correctly. Thanks for fixing the issue! 👍

```shell
$ ansible-galaxy install painless.software
Starting galaxy role install process
- downloading role 'software', owned by painless
- downloading role from https://github.com/painless-software/ansible-role-software/archive/main.tar.gz
- extracting painless.software to /home/peter/.ansible/roles/painless.software
- painless.software (main) was installed successfully

```

---

<div class="post-metadata">

**Author:** ![bittner](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/bittner/32/900_2.png) [@bittner](https://forum.ansible.com/u/bittner)\
**Post date:** [October 13, 2023, 10:37pm UTC](https://forum.ansible.com/t/data-migration-to-the-new-galaxy-ansible-com/1321/10 "2023-10-13T22:37:35Z")

</div>

While installing the `painless.software` role now works, there is still data on the new Galaxy that probably shouldn’t be there or is still not correct.

1. The role [painless-software.software](https://galaxy.ansible.com/ui/standalone/roles/painless-software/software/) should probably be deleted?
2. The [role namespace 9580](https://galaxy.ansible.com/ui/standalone/namespaces/9580/) shows the logo of the GitHub user “painless”, which the “wrong” GitHub user.
3. When you click on the `painless.software` link [on the same page](https://galaxy.ansible.com/ui/standalone/namespaces/9580/) it points to the [painless-software.software](https://galaxy.ansible.com/ui/standalone/roles/painless-software/software/) role. That seems odd.

Will this be fixed? - If I’m not wrong I can’t clean this up all by myself.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [November 12, 2023, 10:37pm UTC](https://forum.ansible.com/t/data-migration-to-the-new-galaxy-ansible-com/1321/11 "2023-11-12T22:37:45Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
