Skip to content

scalyr-agent-2-config --export-config should resolve symbol links #705

Open
@schra

Description

@schra

What

The instructions from https://app.scalyr.com/help/scalyr-agent-k8s#export-config don't work. scalyr-agent-2-config --export-config doesn't export the configuration such that I could customize it.

$ kubectl -n scalyr exec scalyr-84g88 -- scalyr-agent-2-config --export-config - | tail -n +2 | tar -xz
$ cat agent.d/agent.json
cat: agent.d/agent.json: No such file or directory

Why

Files under agent.d/ are symbol links to non-existent files (files that are not part of the tar archive):

$ find
.

$ kubectl -n scalyr exec scalyr-84g88 -- scalyr-agent-2-config --export-config - | tail -n +2 | tar -xz

$ find
.
./agent.json
./agent.d
./agent.d/scalyr-server.json
./agent.d/docker.json
./agent.d/k8s_events.json
./agent.d/agent.json

$ ls -lah
total 24K
drwxrwxr-x  3 andre andre 4,0K Jan 19 17:04 .
drwxrwxrwt 33 root  root   12K Jan 19 17:03 ..
drwxrwxr-x  2 andre andre 4,0K Jan 19 17:04 agent.d
-rw-rw-r--  1 andre andre  471 Aug 10 16:20 agent.json

$ ls -lah agent.d/
total 8,0K
drwxrwxr-x 2 andre andre 4,0K Jan 19 17:04 .
drwxrwxr-x 3 andre andre 4,0K Jan 19 17:04 ..
lrwxrwxrwx 1 andre andre   17 Jan 19 15:50 agent.json -> ..data/agent.json
lrwxrwxrwx 1 andre andre   18 Jan 19 15:50 docker.json -> ..data/docker.json
lrwxrwxrwx 1 andre andre   22 Jan 19 15:50 k8s_events.json -> ..data/k8s_events.json
lrwxrwxrwx 1 andre andre   25 Jan 19 15:50 scalyr-server.json -> ..data/scalyr-server.json

$ cat agent.d/*
cat: agent.d/agent.json: No such file or directory
cat: agent.d/docker.json: No such file or directory
cat: agent.d/k8s_events.json: No such file or directory
cat: agent.d/scalyr-server.json: No such file or directory

We are also using the official (unmodified) Docker image and only customize via ConfigMaps.

Docker image version: 2.1.15

Definition of done

Resolve symbol links when exporting the configuration files via scalyr-agent-2-config --export-config

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions