rascasoft
(Raoul Scarazzini)
December 4, 2023, 4:32pm
1
Hi everybody,
I ended up in opening this bug Unable to import roles anymore: namespace different from github organization · Issue #3299 · ansible/galaxy · GitHub because I can’t find out how to import my roles anymore.
Even if my Galaxy namespace (mmul
) is different from my GitHub organization (mmul-it
), things worked before, but today if I do:
$ ansible-galaxy role import -vvvv --token <REDACTED> --role-name mmul.kubelab mmul-it kubelab
I’m getting this error message:
ansible-galaxy [core 2.16.0]
config file = /home/rasca/Git/mmul-it/kubelab/ansible.cfg
configured module search path = ['/home/rasca/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/rasca/Labs/venvs/ansible/lib/python3.10/site-packages/ansible
ansible collection location = /home/rasca/.ansible/collections:/usr/share/ansible/collections
executable location = /home/rasca/Labs/venvs/ansible/bin/ansible-galaxy
python version = 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] (/home/rasca/Labs/venvs/ansible/bin/python3)
jinja version = 3.1.2
libyaml = True
Using /home/rasca/Git/mmul-it/kubelab/ansible.cfg as config file
Initial connection to galaxy_server: https://galaxy.ansible.com/api/
Opened /home/rasca/.ansible/galaxy_token
Calling Galaxy at https://galaxy.ansible.com/api/
Found API version 'v3, pulp-v3, v1' with Galaxy server beta (https://galaxy.ansible.com/api/)
Calling Galaxy at https://galaxy.ansible.com/api/v1/imports/
ERROR! None (HTTP Code: 403, Message: Forbidden)
Does anyone have any suggestion on this?
Many thanks,
Raoul
markuman
(Markus)
December 4, 2023, 7:17pm
2
I’ve lost also access to my namespace. After login, I become markuman0
which has not access to my former namespace markuman
.
Youe issue might be solved if you just import from public, without using the --token
or import from SCM/github.com.
tannerjc
(James Tanner)
December 4, 2023, 7:54pm
3
@markuman I just fixed your namespaces. Can you check again please?
markuman
(Markus)
December 4, 2023, 7:58pm
4
Yes, looks good now @tannerjc
But is this behaviour somewhere announced?
Or the workflow how to retain the access?
tannerjc
(James Tanner)
December 4, 2023, 7:59pm
5
@markuman it’s a longstanding bug in the new galaxy that I’ve been trying to find the root cause of for a while now.
markuman
(Markus)
December 4, 2023, 8:01pm
6
@tannerjc somewhere it was linked correctly
tannerjc
(James Tanner)
December 4, 2023, 8:08pm
7
@markuman it’s no longer like that though …
tannerjc
(James Tanner)
December 4, 2023, 8:11pm
8
@rascasoft I’ve set mmul as the provider of mmul-it which should give you permission to upload/delete roles from that namespace.
I don’t think that the galaxy cli or API have ever supported <namespace>.<name>
for the --role-name argument. Had you been using this up till now?
rascasoft
(Raoul Scarazzini)
December 4, 2023, 8:47pm
9
It seems ti work now, thanks.
About the namespace.role name it was just a test, so nothing to worry about.
Many thanks!
rascasoft
(Raoul Scarazzini)
December 4, 2023, 8:52pm
10
@tannerjc there’s another bit that it’s worth fixing, if you can. There’s still the mmul-it
namespace, that can be removed to make everything clean.
Many thanks again,
Raoul
rascasoft
(Raoul Scarazzini)
December 5, 2023, 4:49pm
11
@tannerjc hi again, I feel like this is not a “bit” as I was writing before: today I’ve tried to import the third role (kpa_generator
) inside my mmul
namespace ( Use native GitHub Action for Galaxy import · mmul-it/kpa_generator@9ec1c88 · GitHub ), and it seems to have worked, but it imported the role inside mmul-it
which at this point needs to be deleted at all.
Can you help me also on this?
Many thanks,
Raoul
tannerjc
(James Tanner)
December 5, 2023, 6:22pm
12
If the role is hosted in MMUL · GitHub , it’s expected that it get’s imported into the “mmul-it”. Currently, the only way a role hosted in MMUL · GitHub could end up in the “mmul” namespace is if it existed on old-galaxy and was grandfathered in. There are plans in the roadmap to try to enable the workflow you desire, but it’s not currently possible.
Do you own “mmul” on github? docs for changing a role namespace
rascasoft
(Raoul Scarazzini)
December 6, 2023, 8:09am
13
@tannerjc I’m really confused. Actually I’ve a mixed situation that needs to be fixed. It’s no big deal to me to change to namespace to mmul-it
(I don’t own GitHub’s mmul
), but I need help on this since I cannot do it on my own, and actually even if I see two roles under mmul-it
a namespace with that name doesn’t exists.
My rascasoft
user in Galaxy can see just its namespace and the mmul
one:
Can this be fixed on your side?
rascasoft
(Raoul Scarazzini)
December 11, 2023, 10:49am
14
@tannerjc are there news on this? I need to understand how I to set up the import process and then, in case, revisit the documentation of my projects.
Let me know if I can do anything to accelerate the fixing process.
Many thanks.
rascasoft
(Raoul Scarazzini)
December 14, 2023, 5:42pm
15
Hey @tannerjc any news on this?
tannerjc
(James Tanner)
December 14, 2023, 8:37pm
16
@rascasoft I’ve been working on a possible solution here support legacy role import overrides for namespace and name. by jctanner · Pull Request #2011 · ansible/galaxy_ng · GitHub
Documentation and examples to follow once the rest of the team and some of the regular stakeholders have chimed in.
rascasoft
(Raoul Scarazzini)
December 21, 2023, 3:08pm
17
Many thanks @tannerjc I see that the commit got merged, and I have two questions:
What do I need to wait to get things working? Because at the moment I still see the import going to the wrong namespace.
Can I (or you) remove the mmul
Galaxy namespace that will create a lot of confusion when everything will be working again?
Many thanks again for your support.
tannerjc
(James Tanner)
December 21, 2023, 3:36pm
18
Here’s what needs to happen before the patch lands in production:
We need to keep the mmul namespace around until we’ve vetted that you have a way to continue uploading role[versions].
rascasoft
(Raoul Scarazzini)
February 7, 2024, 5:39pm
19
Hey @tannerjc hi! I don’t know where we are with all the needed steps, but I can confirm that things now work as expected, and the fix was good.
So I feel like we can remove the mmul-it
namespace, since I’m able to upload roles there https://galaxy.ansible.com/ui/standalone/namespaces/9440/ .
NOTE that in the previous messages I asked for mmul
namespace to be removed, but that’s an error , it is mmul-it
that needs to be removed.
Many thanks!
Raoul