Skip to content
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

fixes #20888 - hostgroup create exception handling #7633

Closed

Conversation

amitkarsale
Copy link
Member

No description provided.

@theforeman-bot
Copy link

Issues: #20888

@amitkarsale
Copy link
Member Author

assets-precompile is failing, the changes are irrespective though. Any suggestions here?

@amitkarsale
Copy link
Member Author

@ares does the exception handling fits here and/or looks good?
can you review it please.

@ares
Copy link
Contributor

ares commented Aug 24, 2018

looks reasonable to me, though similar patch should also go to foreman core. I'll be offline next week.

@jlsherrill
Copy link
Member

Actually i don't think katello even needs to inlcude the create and update methods here. They were only there to include additional apipieparams iirc.

@amitkarsale
Copy link
Member Author

@jlsherrill you are right, the create and update methods are not needed in katello. Have created a related PR for this issue fix at : theforeman/foreman#6084

@ares

@xprazak2
Copy link
Member

xprazak2 commented Oct 2, 2018

[test katello]

1 similar comment
@johnsonm325
Copy link
Member

[test katello]

@jturel jturel assigned jturel and unassigned jturel Nov 29, 2018
@amitkarsale
Copy link
Member Author

@ares is it good to merge?

@johnsonm325
Copy link
Member

@amitkarsale I tested this a bit and got some errors around the repositories_controller:

2019-01-08T16:11:51 [I|app|0e624]   Rendering /home/vagrant/katello/app/views/katello/api/v2/repository_sets/index.json.rabl within katello/api/v2/layouts/collection
2019-01-08T16:11:51 [I|app|0e624]   Rendered /home/vagrant/katello/app/views/katello/api/v2/repository_sets/index.json.rabl within katello/api/v2/layouts/collection (37.8ms)
2019-01-08T16:11:51 [E|app|0e624] ActionView::Template::Error: PG::UndefinedColumn: ERROR:  column katello_repositories.product_id does not exist
 | LINE 1: ...lo_content_view_versions"."content_view_id" WHERE "katello_r...
 |                                                              ^
 | : SELECT "katello_repositories".* FROM "katello_repositories" INNER JOIN "katello_content_view_versions" ON "katello_content_view_versions"."id" = "katello_repositories"."content_view_version_id" INNER JOIN "katello_content_views" ON "katello_content_views"."id" = "katello_content_view_versions"."content_view_id" WHERE "katello_repositories"."product_id" = $1 AND "katello_content_views"."default" = $2 AND (url IS NOT NULL) AND "katello_repositories"."content_id" = $3

I'm going to suggest a rebase here if it hasn't already been done. You obviously didn't make changes to the repositories_controller, so I'm thinking/hoping the rebase may fix everything.

@amitkarsale
Copy link
Member Author

@johnsonm325 Rebased!

@jturel
Copy link
Member

jturel commented Jan 28, 2019

Tested in conjunction with theforeman/foreman#6084 and I get a better message:

Could not create the hostgroup:
  subnet_id with id 1 not found

@jturel jturel self-assigned this Jan 28, 2019
@jturel
Copy link
Member

jturel commented Jan 28, 2019

I'll merge once the foreman PR is merged

@jjeffers
Copy link
Member

jjeffers commented Feb 7, 2020

Closing this as the dependent foreman PR is also closed.

@jjeffers jjeffers closed this Feb 7, 2020
@amitkarsale amitkarsale deleted the 20888_hostgroup_create branch April 1, 2020 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants