Skip to content

[docs-scanner] Inconsistent socket paths in backend extension tutorial #25191

@github-actions

Description

@github-actions

File: content/manuals/extensions/extensions-sdk/build/backend-extension-tutorial.md

Issue

The Go code example and the Dockerfile CMD use different socket paths, which would cause the extension to fail.

In the Go code example (line 95):

flag.StringVar(&socketPath, "socket", "/run/guest/volumes-service.sock", "Unix domain socket to listen on")

But in the Dockerfile CMD (line 202):

CMD /service -socket /run/guest-services/extension-allthethings-extension.sock

The paths differ in two ways:

  • Directory: /run/guest/ vs /run/guest-services/
  • Filename: volumes-service.sock vs extension-allthethings-extension.sock

Why this matters

A developer following this tutorial would copy both code snippets, but the extension would fail to work because the backend service would listen on one socket path while the Dockerfile tries to start it with a different path. The default value in the Go code would be ignored because the Dockerfile explicitly passes a different socket path.

Suggested fix

Make the socket paths consistent. The Dockerfile CMD should match the default in the Go code, or vice versa. Based on the naming convention, the correct path is likely /run/guest-services/extension-<extension-name>.sock. Update the Go code default to match:

flag.StringVar(&socketPath, "socket", "/run/guest-services/extension-allthethings-extension.sock", "Unix domain socket to listen on")

Or update the Dockerfile to use a generic placeholder that developers should customize:

CMD /service -socket /run/guest-services/my-extension.sock

Found by nightly documentation quality scanner

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions