Skip to content

[packaging] Setup and installer report states that aren't true; extras build version not normalized #772

Open

Description

@guanzhousongmicrosoft

Setup and installer behaviour on the 1.0 RC2 native install that misleads the operator, plus one release-build problem.

Tested on release/1.0-RC2-v2 @ 40f86c0. Ubuntu 24.04 + PG18 debs were built from that commit and run in privileged systemd containers.

Items

  • build_extra_packages.sh --version 1.0-rc2 produces debs whose dependencies can't be satisfied
  • documentdb-setup --tls-cert/--tls-key under /root or /home: setup chowns the operator's files and the gateway still can't read them
  • A setup rerun silently resets the admin password; a different --admin-user silently adds a second admin
  • documentdb-setup --status reports healthy when it isn't
  • The gateway reports ready while bound to IPv6 only
  • Installer messages and side effects that don't match reality

1. Extras version not normalized

build_extra_packages.sh --version 1.0-rc2 writes Debian Version: 1.0-rc2 for tools, common, documentdb-18 and the meta package. Their dependency documentdb-gateway (>= 1.0-rc2) is not satisfied by the gateway's 1.0~rc2, because 1.0~rc2 < 1.0-rc2 in dpkg ordering. The extension and gateway builders normalize -rcN to ~rcN; the extras builder doesn't. Rebuilding with --version 1.0~rc2 works.

Separately, the extension and gateway builders both tag their build image documentdb-build-packages-$OS-pg$PG, so building both for the same OS/PG overwrites one with the other.

2. TLS files under /root or /home

documentdb-setup --tls-cert /root/c.pem --tls-key /root/k.pem:

  • Setup chowns the operator's own files in place to root:documentdb-gateway 0640.
  • The gateway unit has ProtectHome=yes, so the files are still invisible to it, and it panics with "Permission denied".
  • Setup fails after its 60 s readiness wait with a generic timeout.
  • The paths stay in gateway.env, so later reruns without TLS flags fail the same way.

Expected: refuse paths under /root, /home and /run/user up front, or copy the files into the gateway's state directory. Don't change the ownership of operator files.

3. Rerun changes credentials silently

  • Rerunning setup with a different password file resets the existing admin's password. The old password stops working, and the only output is a log line.
  • A rerun with a different --admin-user creates a second full admin; list-users then shows both.

Expected: confirm before resetting, or keep the existing password unless asked to reset it. Warn when a second admin is created.

4. --status false healthy

--status exits 0 in each of these cases while clients can't use the service:

  • The gateway unit is stopped and a foreign process holds 10260: it reports "active (nohup; no systemd)".
  • The admin user has been dropped, although --help says status checks that the admin user exists.
  • After a bad GUC or --restore, the target stays "active" while PostgreSQL fails (the target only Wants= its services).

Expected: status runs an authenticated command through the gateway.

Activity

  1. added
    documentdb-1.0
    1.0-blocker
    on Oct 5, 2026
  2. added this to the 1.0 milestone on Oct 6, 2026
  3. guanzhousongmicrosoft commented on Oct 6, 2026

    @guanzhousongmicrosoft
    MemberAuthor

    1.0 blocker: item 1 (RC extras built with an unnormalized version). The fix is in review. The other items don't block 1.0.

  4. guanzhousongmicrosoft commented on Nov 23, 2026

    @guanzhousongmicrosoft
    MemberAuthor

    Items 1, 2, 3 (as a rerun warning) and 6, plus the PostgreSQL-side check in item 4, are fixed on main (a92856b, 1e882d8). Item 5 (ready while bound to IPv6 only) and an authenticated --status probe through the gateway are still open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    1.0-blockerbugdocumentdb-1.0packaging

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions