Db2 On Premise and Cloud

 View Only
  • 1.  DMC container image defect - nginx config broken

    Posted Mon May 16, 2022 09:46 AM
    IBM Data Management Console at https://hub.docker.com/r/ibmcom/db2console has a defect in the embedded nginx configuration.

    File /nginx_data/defaults.d/console-server.conf on line 15 lists

          resolver kubernetes.default valid=60s ipv6=off;

    as a configuration entry. This basically guarantees that nginx will fail to start whenever "kubernetes.default" is not available. nginx not starting means that the web interface is not accessible, that the container at large is unusable.

    To use the image sucessfully, for instance for running in a local docker installation, make sure that host name kubernetes.default can be resolved and points to a functional DNS resolver. Adding
     
        --add-host=kubernetes.default:127.0.0.11

    to the instructive docker commands show on Docker hub will do that.

    ------------------------------
    Stefan Hoffmeister
    ------------------------------


  • 2.  RE: DMC container image defect - nginx config broken

    Posted Tue May 17, 2022 08:43 AM
    Thanks Stefan, we have logic in config-nginx.sh script to config nginx resolver. Image adopt both k8s env and docker runtime, so default value is `kubernetes.default` then script will replace it with real value.

    There is known issue that in some case get nameserver doesn't work well in 3.1.7 dmc docker image, issue already fix in latest build. So once next dmc version release, you will get this fix.

    For now you can use `-e NAMESERVER=${nameserver_value}` in the docker run command, this will workaround the issue.


    ------------------------------
    LONG SUN LI
    ------------------------------



  • 3.  RE: DMC container image defect - nginx config broken

    Posted Tue May 17, 2022 09:06 AM
    Many thanks for your response, Long Sun Li,

    in my case apparently the dynamic reconfiguration of the nginx configuration failed, because I was running on (rootless) docker on Fedora Linux 36, but still had the reference to the kubernetes resolver.

    My "hack" only aliased the kubernetes resolver to the Docker internal DNS (which works fine)

    I had not studied the scripts in detail, so I had missed that NAMESERVER could be passed as in the environment as an override.

    ------------------------------
    Stefan Hoffmeister
    ------------------------------