Skip to content

Transmission properties overwritten even when env not used #2901

@csm10495

Description

@csm10495

Is there a pinned issue for this?

  • I have read the pinned issues and could not find my issue

Is there an existing or similar issue/discussion for this?

  • I have searched the existing issues
  • I have searched the existing discussions

Is there any comment in the documentation for this?

  • I have read the documentation, especially the FAQ and Troubleshooting parts

Is this related to a provider?

  • I have checked the provider repo for issues
  • My issue is NOT related to a provider

Are you using the latest release?

  • I am using the latest release

Have you tried using the dev branch latest?

  • I have tried using dev branch

Docker run config used

Try this docker-compose file:

services:
  transmission-openvpn:
    image: haugene/transmission-openvpn:5.3.1
    cap_add:
        - NET_ADMIN
    volumes:
        - 'config/:/config/transmission-home'
    environment:
        - OPENVPN_PROVIDER=PIA
        - OPENVPN_CONFIG=us_west,us_las_vegas,us_california
        - OPENVPN_USERNAME=REDACTED
        - OPENVPN_PASSWORD=REDACTED!
        - TZ=America/Los_Angeles
        - PGID=1000
        - PUID=1000
    ports:
        - '9091:9091'

Current Behavior

You'll see in the logs something like:

...
transmission-openvpn-1  | Overriding rpc-password because TRANSMISSION_RPC_PASSWORD is set to [REDACTED]
transmission-openvpn-1  | Overriding rpc-port because TRANSMISSION_RPC_PORT is set to 9091
transmission-openvpn-1  | Overriding rpc-username because TRANSMISSION_RPC_USERNAME is set to
...

This leads to my config in settings.json getting overwritten, even though I didn't set those env vars, so just wanted to use my settings.json as is without modifications.

Expected Behavior

There should be a way to just use settings.json as is without any modifications.

How have you tried to solve the problem?

I looked a bit at the code, in

env_value = os.environ.get(setting_env_name)
it just fetches the env var if its set.

In the dockerfile it sets these env vars to empty string:

TRANSMISSION_RPC_PASSWORD= \
. That seems a bit wrong though, shouldn't it just not set the ENV that the user doesn't set something? That may be tough, but maybe instead the python code could just ignore empty env vars or use an eyecatcher/sentinel?

Log output

transmission-openvpn-1 | Overriding rpc-password because TRANSMISSION_RPC_PASSWORD is set to [REDACTED]
transmission-openvpn-1 | Overriding rpc-port because TRANSMISSION_RPC_PORT is set to 9091
transmission-openvpn-1 | Overriding rpc-username because TRANSMISSION_RPC_USERNAME is set to

HW/SW Environment

- OS: Windows 10x64 
- Docker: Docker Desktop 27.1.1

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    inactivityUsed by Stale bot to mark issues that will be closed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions