netdisco / netdisco-docker

Docker images for App::Netdisco
BSD 3-Clause "New" or "Revised" License
49 stars 15 forks source link

Issues in perl5/lib/perl5/App/Netdisco/JobQueue/PostgreSQL.pm #39

Closed Xenon-777 closed 3 years ago

Xenon-777 commented 3 years ago

Expected Behavior

The String for the host is not correct.

  1. Log: ... DBI Connection failed: DBI connect('dbname=netdisco;host=netdisco-db.netdisco;5432','netdisco',...) failed: missing "=" after ...
  2. Log ... DBI Connection failed: DBI connect('dbname=netdisco;host=netdisco-db.netdisco;tpc://x.x.x.x:5432','netdisco',...) failed: missing "=" after ...

(/home/netdisco/perl5/lib/perl5/DBIx/Class/Storage/DBI.pm line 1639 or /home/netdisco/perl5/lib/perl5/App/Netdisco/JobQueue/PostgreSQL.pm line 50)

Current Behavior

-

Possible Solution

-

Steps to Reproduce (for bugs)

For 1. Log: Set Env NETDISCO_DB_HOST and NETDISCO_DB_PORT For 2. Log: Set Env NETDISCO_DB_HOST only

Context

no database connect

Your Environment

Config info (deployment.yml and docker env settings)

-

Device information

-

Xenon-777 commented 3 years ago

OK i have the Problem. If set in Kubernetes Services for Pod Links Kubernetes put in follow ENV in the Pods:

<Service>_PORT
<Service>_SERVICE_PORT
<Service>_SERVICE_HOST
<Service>_PORT_<Service Port>_TCP_ADDR
<Service>_PORT_<Service Port>_TCP_PORT
<Service>_PORT_<Service Port>_TCP_PROTO

If the Service Name netdisco-db and the Port 5432 in Service you have in Pod:

NETDISCO_DB_PORT
NETDISCO_DB_SERVICE_PORT
NETDISCO_DB_SERVICE_HOST
NETDISCO_DB_PORT_5432_TCP_ADDR
NETDISCO_DB_PORT_5432_TCP_PORT
NETDISCO_DB_PORT_5432_TCP_PROTO

Netdisco look for all ENV that starts with NETDISCO... and so it get to much Information

So don't start the name of Services with "netdisco...".