GithubHelp home page GithubHelp logo

Comments (4)

mshonichev avatar mshonichev commented on June 19, 2024 1

Yep, you're absolutely right!

So, production setting to proxy for https://galaxy.ansible.com is to use --api-version v3.

AND

Don't forget to clear response cache at client side, e.g.:

$ ansible-galaxy collection install --server http://galaxy.local --clear-response-cache cisco.nxos

Starting galaxy collection install process
Process install dependency map
Starting collection install process
Downloading http://galaxy.local/download/cisco-nxos-5.2.1.tar.gz?galactory_upstream_url=https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/artifacts/cisco-nxos-5.2.1.tar.gz to /Users/m.shonichev/.ansible/tmp/ansible-local-70469xx4sc8et/tmptjzewn3r/cisco-nxos-5.2.1-4crdg6b1
Installing 'cisco.nxos:5.2.1' to '/Users/m.shonichev/.ansible/collections/ansible_collections/cisco/nxos'
cisco.nxos:5.2.1 was installed successfully

I see you don't plan to automatically forward v2 request for v3 upstream for now, so this issue can be closed.

Thank you so much for your support!

from galactory.

briantist avatar briantist commented on June 19, 2024

Hi @mshonichev , welcome! Thanks for the including so much info in this report, that's very helpful.

This line is especially interesting:

Tue, Oct 10 2023 5:52:46 pm INFO:galactory:Rewriting 'http://galaxy.local/api/v2/collections/cisco/nxos/' to 'https://galaxy.ansible.com/api/v2/collections/cisco/nxos/'

It means that the request from the ansible-galaxy client came in as v2.

Typically that means that the client detected no v3 from the server. The only reason that should have been the case is that galactory was not serving it.

If you hit http://galaxy.local/api/ what do you see?

Also, because you're using the INFO log level, the output from when galactory first starts should show which Galaxy API versions it's initializing.

Finally, it might be helpful to add -vvvv to the ansible-galaxy run.


I have one theory so far: ansible-galaxy caches upstream API responses, so perhaps it's using a cached v2 response? Try adding --no-cache to the galaxy call as well.

from galactory.

briantist avatar briantist commented on June 19, 2024

Glad to hear that worked!

Indeed I don't plan to explicitly support v2 <-> v3 proxying; if it comes it would be as a side effect of re-doing how proxying is done using an actual client that's aware of both versions, but I doubt it will be any time soon.

Thanks very much for your interest in the software, I'd love to hear more about how you're using it and what your experience has been.

from galactory.

briantist avatar briantist commented on June 19, 2024

So, production setting to proxy for https://galaxy.ansible.com is to use --api-version v3.

One other thing to clarify (for anyone reading) is that you don't have to use --api-version v3 unless you want to never serve v2. By default it will serve both (but proxying would not work cross-versions).

In this case clearing the cache (or using --no-cache) is what would have fixed the issue.

from galactory.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.