Skip to content

Recent MSSQL changes cause healthcheck to fail #36

@sdunham

Description

@sdunham

Lando version: v3.21.2
Lando mssql plugin version: 1.2.0

I'd open a PR for these updates, but I'm not 100% sure what the best way to address the first one is, so I figured I'd start with an issue.

  1. Recent updates to MSSQL have changed the path of the sqlcmd bin. Instead of being available at /opt/mssql-tools/bin, it's now available at /opt/mssql-tools18/bin. I'm unsure if it makes sense to just replace that path in the service's path config or include both for backward compatibility.
  2. They also recently added a new option to sqlcmd for setting the encryption mode. It's set to mandatory by default, which throws an error because of the use of a self-signed cert.

Here's a reduced test case which illustrates the first issue:

name: mssql-test
services:
  myservice:
    type: mssql

This one fixes the first issue via an override of the path config data and shows the second:

name: mssql-test
services:
  myservice:
    type: mssql
    path:
      - '/usr/local/sbin'
      - '/usr/local/bin'
      - '/usr/sbin'
      - '/usr/bin'
      - '/sbin'
      - '/bin'
      - '/opt/mssql-tools18/bin'

And this one addresses both issues:

name: mssql-test
services:
  myservice:
    type: mssql
    healthcheck: "sqlcmd -U sa -H myservice -P he11oTHERE -Q quit -N o"
    path:
      - '/usr/local/sbin'
      - '/usr/local/bin'
      - '/usr/sbin'
      - '/usr/bin'
      - '/sbin'
      - '/bin'
      - '/opt/mssql-tools18/bin'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions