New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix transition of GpgKey to ContentCredential #79
Conversation
I am reluctant to break Scc Manager for all Katello versions < 4.2 (given that Katello 4.2 has not even been released, yet). So I would prefer to have a solution which takes into account the current Katello version and picks the relevant commands based on that. Luckily, it is not a lot of commands so might be manageable. |
c6878e9
to
bc183e4
Compare
Hello, /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_scc_manager-1.8.10/app/controllers/scc_accounts_controller.rb |
@SGetovski Did you do a fresh install or did you do an upgrade? |
@nadjaheitmann I have done a fresh install a couple of months ago and then I faced this issue. The installation was done by me as a proof of concept in order to show the management what we could achieve with a tool as Foreman. Today I have changed the files but maybe I have to change/do something more. |
@SGetovski There is a database migration which is failing due to unmet dependencies. So you need to run |
Hello, foreman-rake db:migrate --trace |
@SGetovski I have retested the patch that we have and it works just fine for me. So I am not sure what is wrong with your system. Can you verify that you have applied the patch correctly? |
@SGetovski We have merged the fix and I will bump a new version of the SCC manager, shortly. You can try to install the newest version once the packaging is done. |
@nadjaheitmann Maybe I am doing something wrong. Could you please provide me some instructions how to apply the patch after I download the source. |
@SGetovski I had to do another patch because the one we have here did not work on Foreman >= 3.0. https://github.com/ATIX-AG/foreman_scc_manager/pull/87/files If you need to use Foreman Scc Manager, you could probably install Foreman 2.5 for your showcase while we wrap up the patching. Is that an option for you? |
@nadjaheitmann thank you very much for your help and explanation. I can wait up to 3, 4 weeks more because I would like to continue with Foreman 3.0. Then if the patch still does not work on Foreman >= 3.0 I will make a clean installation using Foreman 2.5 - yes this is an option for me. |
I have applied v1.8.16 and performed foreman-rake db:migrate and foreman-maintain service restart but unfortunately the error still persists. On my system when I click on the button "Add SCC account" the fallowing error still appears: Maybe it is not related to no one of both fixes - Fix transition of GpgKey to ContentCredential #79 and Fix db migration for Katello 4.2 #87 and I have to make a fresh install with Foreman 2.5. Foreman version: 3.0.0 foreman-tasks 5.0.0 |
@SGetovski Any progress? Have you run |
@nadjaheitmann yes I have run foreman-installer after I have installed the plugin. Then I have run: and again when I click on the button "Add SCC account" the fallowing error still appears: |
@SGetovski I am sorry that you are having a hard time with the new patch. I have tested again on Foreman 3.0.0 and Katello 4.2.0.1 rc3, and I cannot reproduce your error. I did the following:
The error you get is definitely related to the new patch - looks like it was not applied correctly, at least I cannot reproduce. Maybe, you can try creating an SCC account via API and see if you still get errors:
Edit: There is also an SCC manager plugin for Hammer CLI, if you are familiar with that. |
@nadjaheitmann I think we have made some progress. First I have installed the SCC manager plugin for Hammer CLI. Now I am able to see the created account:
Unfortunately I am not able to manage them. When I click on some button - Add SCC Account or even on the already created SUSE_Repo the error still appears: |
Hello again, Label: Actions::SccManager::SubscribeProduct undefined method -------- cut ---------- |
@SGetovski I tried again on a 3.1 system and it worked just fine. I think that there is something wrong with your installation. |
@nadjaheitmann can you advise me how I could update to 3.1? Or maybe it would be better to re-install the whole server or just the foreman service? |
@SGetovski I don't think that the problem is about the Foreman version. If it is not too much effort for you, you can try to set up a new system. Here is also the upgrade manual: https://theforeman.org/manuals/3.1/index.html#3.6Upgradeto3.1 |
@nadjaheitmann I have tried creating an SCC account via API: [root@bgsofore001 ~]# curl -X POST -k -H 'Content-Type: application/json' -H 'Authorization: Basic YWRtaW46Y2hhbmdlbWU=' -i 'https://bgsofore001/api/v2/scc_accounts ' --data '{ "scc_account": { Also I have uninstalled tfm-rubygem-foreman_scc_manager. Then
For now I get the same error. |
@SGetovski You might need to run foreman-rake apipie:cache to get the API up-to-date. Although I would expect that either foreman-maintain or foreman-installer take care of this, automatically. We recommend
for installation (see https://github.com/ATIX-AG/foreman_scc_manager/blob/master/README.md) |
@nadjaheitmann I am running with katello 4.2.0.rc1 and when I use yum install tfm-rubygem-foreman_scc_manager it is going to install foreman_scc_manager 1.8.12 that is why I have installed it with then I have executed foreman-installer but again the issue is still there. I think I have to make a new installation fallowing these guide: |
@SGetovski You are right, the repo was not yet available in the repositories - should be by now, though. |
@nadjaheitmann thank you :) I am wondering if could be a database mismatch/corruption but I am not sure how to prove it. That is why I think to upgrade to 3.1 and then if I still have the same issue the only option would be to re-install the whole server. :) |
@SGetovski The new package is finally available: |
@nadjaheitmann, thanks a lot for this information and your help. I am going to install and try it. |
This fix breaks compatibility with Katello <4.2
fixes #77