Bug #4728
closedapipie dynamic bindings prevent foretello hammer from working
Description
Prior to dynamic bindings, whenever the generate katello_api script was run against a foretello server, it would need to be restarted. This is due to the Organization model not getting the katello extensions, causing errors later when a katello field was being accessed (error message is: undefined method `without_deleting'). The server would need to be restarted after the generate script.
With the introduction of dynamic bindings, this happens every time a hammer command is run and the cache needs to be refreshed (which is every server restart). I am unaware of any work arounds.
To reproduce:
% hammer system list --organization-id ACME_Corporation
Updated by Ivan Necas almost 11 years ago
the workaround for development should be setting `use_cache = true` in https://github.com/theforeman/foreman/blob/develop/config/initializers/apipie.rb#L10 (maybe also reload_controllers = false) and generating the the cache with `rake apipie:cache`. This way, the api is loaded from cache in development as well, so this issues should not appear: to refresh the cache, one should need just run the rake task again
Updated by Adam Price almost 11 years ago
- Project changed from Hammer CLI to Katello
- Category changed from Hammer core to 106
Updated by Adam Price almost 11 years ago
- Assignee changed from Adam Price to Ivan Necas
Updated by Ivan Necas almost 11 years ago
Proper apipie fix proposal is here:
Updated by Ivan Necas almost 11 years ago
- Status changed from New to Assigned
Workaround tested as well: all you need is setting `use_cache = true` in https://github.com/theforeman/foreman/blob/develop/config/initializers/apipie.rb#L10 and run `bundle exec rake apipie:cache`.
Martin should also work on a PR to foreman to use the cache even in devel when it's generated.
Updated by Ivan Necas almost 11 years ago
- Status changed from Assigned to Ready For Testing
apipie-rails-0.1.2 released with the fix, rpms build as well (although the production mode was not affected).
Updated by Ivan Necas almost 11 years ago
- Status changed from Ready For Testing to Resolved
Updated by Eric Helms over 10 years ago
- Translation missing: en.field_release set to 13