Previously working hammer commands return ISE on Fresh 3.0 install

Problem:

Fresh install of 3.0 returns internal server errors on previously working hammer commands. All other commands are working except for some 'hammer set ’ based ones.

Expected outcome:

To be able to use: ‘hammer settings set --name default_pxe_item_global --value discovery default’ and other commands.

Foreman and Proxy versions:

3.0.0 for both

Foreman and Proxy plugin versions:

Distribution and version:

Centos8 Stream

Other relevant data:
hammer settings is failing on several items, which worked in 2.5.
eg:

  • hammer settings set --name default_pxe_item_global --value discovery
  • hammer settings set --name discovery_auto --value true
  • hammer settings set --name root_pass --value ‘removed_hash_value’

hammer> settings set --name default_pxe_item_global --value discovery

Could not update the setting:

Internal Server Error: the server was unable to finish the request. This may be caused by unavailability of some required service, incorrect API call or a server-side bug. There may be more information in the server’s logs.

Could you please capture the ~foreman/logs/production.log while executing the command? That will probably have some pointers.

Hi @TheDudeAbides,

I guess you’ve encountered the same issue as I did a while ago: Bug #33347: Settings search is broken in hammer - Foreman. The fix has been merged already and should lend into 3.0.1.

The production.log would help though to confirm if this is the same issue.

2 Likes

@Marek_Hulan @ofedoren - thanks for the response. I rebased to 2.5 already. I’ll go tear it down, and catpure the relevant bits. Thanks for responding - I’ll update the thread later today with info, if it still persists. Otherwise, I should be OK if latest pulls the 3.0.1 bits down.

Reinstalled to 3.0 and same error. Stack trace in production.log shows undefined method.

I assume I get get 3.0.1 from rawhide/daily? If so, I can go install that to verify the issue is resolved.

Hi again,

Thanks for the logs :slight_smile: It really is the same issue I was mentioning, so you could wait until Foreman 3.0.1 is released or you could try to apply the patch yourself: https://github.com/theforeman/foreman/pull/8742.patch

@ofedoren thanks for the link. You saved the day. I’m up and running on the 3.0.0 codebase. Thanks!

@ofedoren - just a quick update, installed ‘foreman-release-3.0.0-1.el8.noarch’ today (fresh install) didn’t see your code in there. Manually updated files, works as expected now.

According to 33347, it appears https://github.com/theforeman/foreman/pull/8742/files was merged though (Revision 2bafa941 - Fixes #33347 - Fix settings index API - Foreman).

Yeap, but it’s still the 3.0.0 version. The fix should be in 3.0.1, at least I hope. @evgeni marked the Redmine issue, but I don’t see the fix in 3.0-stable branch :frowning: I’ll do the CP then.

Yeah, I marked it for “target 3.0.1”, so whenever @upadhyeammit or @tbrisker do the picks, they’ll have it on their list, but you can of course also pick it yourself :slight_smile:

1 Like

Just to make the CP visible: https://github.com/theforeman/foreman/pull/8825