Skip to content

Bosh deployment fails with "Unknown alias: xyz" #2385

@mvach

Description

@mvach

Describe the bug
Some of our deployments are facing an issue with yaml anchors. That fails the deployment at the very beginning while loading the manifest yaml with:

D, [2022-06-06T01:38:32.096112 #5838] [task:300244] DEBUG -- DirectorJobRunner: (0.000564s) (conn: 4320) BEGIN
D, [2022-06-06T01:38:32.097385 #5838] [task:300244] DEBUG -- DirectorJobRunner: (0.000708s) (conn: 4320) UPDATE "tasks" SET "event_output" = ("event_output" || '{"time":1654479512,"error":{"code":100,"message":"Unknown alias: ref_0"}}') WHERE ("id" = 300244)

Our current expectation is that

@manifest_hash = YAML.load(raw_manifest_text)
is missing the parameter aliases: true if it is called via REST API and not BOSH CLI

To Reproduce
This issue can be reproduced by creating a deployment via REST API and providing a deployment manifest that uses yaml anchors.

Here a manifest snippet:

stemcell-alias: &cell-alias "ubuntu"
stemcells:
- alias: *cell-alias
  os: "ubuntu-bionic"
  version: "latest"

And the REST API invocation:

bosh -e bosh curl -X POST /deployments -H 'Content-Type: text/yaml' --body=service-fabrik-mongodb.yml

We expect that this issue was introduces with v272.1.0

Additional context
To mitigate the problem we rolled back to our last known good bosh version v271.16.0

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions