Katello install is getting a bit long in the tooth, but before upgrading I’d like to solve this problem. Didn’t notice it previously and am still able to deploy new instances OK.
Problem:
Browsing to Infrastructure → Compute Resources → selecting an EC2 resource → SSH keys results in error “There was an error listing VMs: 500 Internal Server Error” ← yes its weird it says VMs but I’m on the SSH keys tab.
I am able to click on a different ec2 compute resource and able to retrieve the keys. Additionally in Cloudtrail I can see the request to list keypairs.
Expected outcome:
List keypairs in ec2
Foreman and Proxy versions:
Foreamn 2.2.3
Foreman and Proxy plugin versions:
foreman-installer-katello-2.2.3-1.el7.noarch
- foreman-proxy-2.2.3-1.el7.noarch
Distribution and version:
EL7
Other relevant data:
2023-01-09T14:57:17 [I|app|b95bfe68] Started GET "/compute_resources/4-aws-vpc-prod-us-west-2/key_pairs" for 127.0.0.1 at 2023-01-09 14:57:17 -0800
2023-01-09T14:57:17 [I|app|b95bfe68] Processing by KeyPairsController#index as HTML
2023-01-09T14:57:17 [I|app|b95bfe68] Parameters: {"compute_resource_id"=>"4-aws-vpc-prod-us-west-2"}
2023-01-09T14:57:17 [I|app|b95bfe68] Rendering key_pairs/index.html.erb within layouts/application
2023-01-09T14:57:17 [I|app|b95bfe68] Rendered key_pairs/index.html.erb within layouts/application (Duration: 6.2ms | Allocations: 4479)
2023-01-09T14:57:17 [W|app|b95bfe68] No route matches {:action=>"show", :compute_resource_id=>#<Foreman::Model::EC2 id: 4, name: "aws-vpc-prod-us-west-2", description: "", url: "us-west-2", user: "<SNIP>", password: [FILTERED], uuid: nil, type: "Foreman::Model::EC2", created_at: "2018-05-24 22:12:14", updated_at: "2018-05-24 22:13:50", attrs: {}, email: nil, caching_enabled: true, domain: nil, http_proxy_id: nil>, :controller=>"key_pairs", :id=>nil}, possible unmatched constraints: [:id]
2023-01-09T14:57:17 [I|app|b95bfe68] Backtrace for 'No route matches {:action=>"show", :compute_resource_id=>#<Foreman::Model::EC2 id: 4, name: "aws-vpc-prod-us-west-2", description: "", url: "us-west-2", user: "<SNIP>", password: [FILTERED], uuid: nil, type: "Foreman::Model::EC2", created_at: "2018-05-24 22:12:14", updated_at: "2018-05-24 22:13:50", attrs: {}, email: nil, caching_enabled: true, domain: nil, http_proxy_id: nil>, :controller=>"key_pairs", :id=>nil}, possible unmatched constraints: [:id]' error (ActionView::Template::Error): No route matches {:action=>"show", :compute_resource_id=>#<Foreman::Model::EC2 id: 4, name: "aws-vpc-prod-us-west-2", description: "", url: "us-west-2", user: "<SNIP>", password: [FILTERED], uuid: nil, type: "Foreman::Model::EC2", created_at: "2018-05-24 22:12:14", updated_at: "2018-05-24 22:13:50", attrs: {}, email: nil, caching_enabled: true, domain: nil, http_proxy_id: nil>, :controller=>"key_pairs", :id=>nil}, possible unmatched constraints: [:id]