Bug 2196242
| Summary: | Upgrade to Satellite 6.13 fails on db:seed step with error GraphQL::InvalidNameError: Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but 'RHEL OpenStack Platform' does not | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Sayan Das <saydas> |
| Component: | Upgrades | Assignee: | Evgeni Golov <egolov> |
| Status: | CLOSED ERRATA | QA Contact: | Lukas Pramuk <lpramuk> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 6.13.0 | CC: | ahumbe, egolov, jbhatia, lpramuk, pcreech |
| Target Milestone: | 6.13.1 | Keywords: | Triaged, Upgrades |
| Target Release: | Unused | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Fixed In Version: | foreman-3.5.1.17-1 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-05-31 15:28:22 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Sayan Das
2023-05-08 12:40:14 UTC
I would expect, but didn't test, this to also fail in Azure RM: https://github.com/theforeman/foreman_azure_rm/blob/master/app/models/foreman_azure_rm/azure_rm.rb#L84 Created redmine issue https://projects.theforeman.org/issues/36371 from this bug Upstream bug assigned to egolov Upstream bug assigned to egolov Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/36371 has been resolved. VERIFIED.
@Satellite 6.13.1 Snap3
foreman-3.5.1.17-1.el8sat.noarch
by the following (a bit artificial) reproducer:
1) Perform GraphQL query while monitoring production.log
# curl -X POST -H "Content-Type: application/json" -d '{"query": "{ computeResources \{totalCount, edges \{ node \{id, providerFriendlyName\} \}\} }"}' -u 'admin:changeme' https://$(hostname -f)/api/graphql
FIX:
{"data":{"computeResources":{"totalCount":0,"edges":[]}}}
vs.
REPRO:
{"error":"An error occurred."}
# tail -f /var/log/foreman/production.log
FIX:
2023-05-26T08:32:27 [I|app|6b4208dd] Started POST "/api/graphql" for <IP_ADDRESS> at 2023-05-26 08:32:27 -0400
2023-05-26T08:32:27 [I|app|6b4208dd] Processing by Api::GraphqlController#execute as JSON
2023-05-26T08:32:27 [I|app|6b4208dd] Parameters: {"query"=>"{ computeResources {totalCount, edges { node {id, providerFriendlyName} }} }", "graphql"=>{"query"=>"{ computeResources {totalCount, edges { node {id, providerFriendlyName} }} }"}}
2023-05-26T08:32:27 [I|app|6b4208dd] Authorized user admin(Admin User)
2023-05-26T08:32:27 [I|app|6b4208dd] Completed 200 OK in 114ms (Views: 0.2ms | ActiveRecord: 11.3ms | Allocations: 7972)
vs.
REPRO:
2023-05-26T08:30:44 [I|app|5253ec94] Started POST "/api/graphql" for <IP_ADDRESS> at 2023-05-26 08:30:44 -0400
2023-05-26T08:30:44 [I|app|5253ec94] Processing by Api::GraphqlController#execute as JSON
2023-05-26T08:30:44 [I|app|5253ec94] Parameters: {"query"=>"{ computeResources {totalCount, edges { node {id, providerFriendlyName} }} }", "graphql"=>{"query"=>"{ computeResources {totalCount, edges { node {id, providerFriendlyName} }} }"}}
2023-05-26T08:30:44 [I|app|5253ec94] Authorized user admin(Admin User)
2023-05-26T08:30:44 [W|app|5253ec94] Action failed
2023-05-26T08:30:44 [I|app|5253ec94] Backtrace for 'Action failed' error (Types::ProviderFriendlyNameEnum::UnresolvedValueError): `ComputeResource.providerFriendlyName` returned `"RHEL OpenStack Platform"` at `computeResources.edges.0.node.providerFriendlyName`, but this isn't a valid value for `ProviderFriendlyNameEnum`. Update the field or resolver to return one of `ProviderFriendlyNameEnum`'s values instead.
...
2023-05-26T08:30:44 [I|app|5253ec94] Completed 500 Internal Server Error in 146ms (Views: 0.4ms | ActiveRecord: 24.2ms | Allocations: 14904)
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: Satellite 6.13.1 Async Security Update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2023:3387 |