Skip to content

[Bug]: v2 schema omits system.ip although domain model, API, serializer, and UI support it #310

Description

@ReevesJustin

What happened?

RackPeek version

RackPeek-2.0.0
Docker image: aptacode/rackpeek:latest

Problem

The v2 JSON schema does not define an ip property for System, although
RackPeek's domain model and runtime support it.

SystemResource contains:

public string? Ip { get; set; }

The System UI also exposes an IP Address field.

However, schemas/v2/schema.v2.json defines System properties as:

  • kind
  • type
  • os
  • cores
  • ram
  • drives

and uses:

"unevaluatedProperties": false

This means a YAML/JSON document containing a valid System ip property is
rejected by external validation against the published schema.

Runtime behavior

I tested this against a running RackPeek 2.0 instance.

This inventory is accepted by POST /api/inventory:

- kind: System
  name: nas-os
  type: baremetal
  os: Debian GNU/Linux 13 (trixie)
  cores: 8
  ram: 30.9
  ip: 10.1.10.10

The server side dry-run returns ip in the serialized newYaml, and applying
it populates the System IP Address field in the UI.

Therefore the API/domain/UI behavior appears correct; the published v2 schema
is missing the property.

Expected behavior

schemas/v2/schema.v2.json should expose System.ip consistently with
SystemResource, serialization, API behavior, and the UI.

Ideally it should use the same IPv4 validation semantics used elsewhere in
the schema.

Impact

External schema validators reject inventory that RackPeek itself accepts.
Automated inventory generators cannot remain schema-compliant while
populating the System IP Address field.
Users may incorrectly place the address in labels instead, leaving the
first-class UI field blank.

Web UI exposes System.ip.
Domain model supports System.ip.
API accepts and serializes System.ip.
Published v2 schema omits it.
So, the bug isn't reall "UI-only or CLI only."

Where does this occur?

Both / Not sure

How do you run RackPeek?

Docker

RackPeek version

2.0.0

Steps to reproduce (optional)

  1. Run RackPeek 2.0 with the inventory API enabled.

  2. Create an inventory file containing a System resource with an IP address:

    version: 2
    resources:

    • kind: System
      name: test-system
      type: baremetal
      os: Debian GNU/Linux 13
      cores: 8
      ram: 32
      ip: 192.168.1.10
  3. Validate that document against:
    schemas/v2/schema.v2.json

  4. Observe that validation fails because System.ip is not defined and the
    schema uses unevaluatedProperties: false.

  5. Submit the same inventory to RackPeek using:

    POST /api/inventory

    with:

    • mode: Merge
    • dryRun: true
    • valid X-Api-Key header
  6. Observe that RackPeek accepts the inventory and returns ip: 192.168.1.10
    in the serialized newYaml.

  7. Apply the same inventory with dryRun: false.

  8. Open the Systems page in the Web UI.

  9. Observe that the System's "IP Address" field is populated with
    192.168.1.10.

Actual behavior

The published v2 schema rejects System.ip, but RackPeek's API, serializer,
domain model, and Web UI support it.

Expected behavior

The v2 schema should define System.ip so schema-valid inventory can populate
the existing System IP Address field.

Screenshots (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions