splunk / splunk/docker-splunk

The error was: 'dict object' has no attribute 'path' during startup

Open
#523 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
549
Forks
277
Avg merge
3d 9h
Merged PRs (30d)
2

Description

When using the SPLUNK_APPS_URL= environment param, the startup stops with:

deploy1    | TASK [splunk_deployment_server : Infer app filepath] ***************************
deploy1    | fatal: [localhost]: FAILED! => {}
deploy1    |
deploy1    | MSG:
deploy1    |
deploy1    | The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'path'
deploy1    |
deploy1    | The error appears to be in '/opt/ansible/roles/splunk_common/tasks/install_apps.yml': line 45, column 5, but may
deploy1    | be elsewhere in the file depending on the exact syntax problem.
deploy1    |
deploy1    | The offending line appears to be:
deploy1    |
deploy1    |
deploy1    |   - name: Infer app filepath
deploy1    |     ^ here

The docker-compose.yml has the following excerpt:

deploy1:
    networks:
      splunknet:
        aliases:
          - deploy1
    image: ${SPLUNK_IMAGE:-splunk/splunk:latest}
    hostname: deploy1
    container_name: deploy1
    environment:
      - SPLUNK_START_ARGS=--accept-license
      - SPLUNK_ROLE=splunk_deployment_server
      - SPLUNK_APPS_URL=/home/matthew/docker/packages/myapp.tar.gz,/home/matthew/docker/packages/splunk-add-on-for-microsoft-windows_820.tgz,/home/matthew/docker/packages/splunk-add-on-for-unix-and-linux_830.tgz
      - SPLUNK_PASSWORD

Is there anything incorrect with the definition of the path/app locations specified here?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ansible/roles/splunk_common/tasks/install_apps.yml at the reported “Infer app filepath” task, then inspect how SPLUNK_APPS_URL is parsed from the docker-compose.yml environment value. Reproduce startup with the listed comma-separated paths and verify that valid app locations no longer cause the undefined path error.

Written by the indexing model from the issue text.

Assessment

Tech stack
ansible, docker
Domain
devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.