Skip to content

Empty spec.resource.name falls back to metadata.name which is too long #1058

Open

Description

@barnes-c

Problem description

When spec.resource.name is empty, the value of metadata.name is used.

The problem with this is that metadata.name can be longer than most OpenStack services allow for a name.

For leases in Blazar this limit is 80, for Keystone projects/users/groups its 64.
metadata.name can be up to 253 chars.

Related: #991 (comment)

ORC version

main

Additional information

No response

Relevant log output

> k get project
NAME                                                                ID    AVAILABLE   MESSAGE
xo1yjslpzk5kmve94tkoc0bymm3u9dqcd7i2qsiahpcp2c4eh17teq9vylui0lypm         False       Expected HTTP response code [201 202] when accessing [POST http://10.0.79.110/identity/v3/projects], but got 400 instead: {"error":{"code":400,"message":"Invalid input for field/attribute name. Value: xo1yjslpzk5kmve94tkoc0bymm3u9dqcd7i2qsiahpcp2c4eh17teq9vylui0lypm. 'xo1yjslpzk5kmve94tkoc0bymm3u9dqcd7i2qsiahpcp2c4eh17teq9vylui0lypm' is too long","title":"Bad Request"}}

Activity

  1. added theissue type on Nov 12, 2026
  2. winiciusallan commented on Nov 12, 2026

    @winiciusallan
    Member

    This is database detail that I think it can't be discovered via services API. I think we could have a new option in the resource-generator or scaffolding-controller to enforce that at the API level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions