Skip to content

Pre-refresh hook fails on snap revision 1786 (7.13.5) due to stop_monngod in 00-adopt_version.sh #82

@Fiodin

Description

@Fiodin

Description
The pre-refresh migration script 00-adopt_version.sh in snap revision 1786 (Rocket.Chat 7.13.5) fails because of a typo: it calls stop_monngod (with double n) instead of stop_mongod. This causes every refresh attempt from rev 1785 → 1786 to abort.
Environment

  • Host OS: Debian 12
  • Channel: 7.x/stable
  • Currently installed: rev 1785
  • Failing target: rev 1786 (7.13.5, released 2026-04-27)

Error output

error: cannot perform the following tasks:

  • Run pre-refresh hook of "rocketchat-server" snap if present (run hook "pre-refresh":

[... mongod startup logs ...]
Killing process with pid: 788664
/snap/rocketchat-server/1785/migrations/pre_refresh/feature_compatibility/00-adopt_version.sh: line 8: stop_monngod: command not found
[ERROR] pre refresh migration script /snap/rocketchat-server/1785/migrations/pre_refresh/feature_compatibility/00-adopt_version.sh
-----)

Additional context
The MongoDB instance was already at the correct FCV before the refresh attempt:

$ sudo /snap/bin/rocketchat-server.mongosh --eval "db.adminCommand({getParameter: 1, featureCompatibilityVersion: 1})"
{ featureCompatibilityVersion: { version: '7.0' }, ok: 1, ... }

So the migration script's actual FCV-setting logic was a no-op for my install. The only thing standing in the way of a successful refresh is the typo in the final cleanup step (stop_monngod → stop_mongod).
The script in question follows the pattern documented in MONGO_UPDATE.md, where the correct function name stop_mongod is used.

Steps to reproduce

  1. Have rocketchat-server snap rev 1785 installed on 7.x/stable.
  2. Wait for auto-refresh, or run sudo snap refresh rocketchat-server.
  3. Refresh fails with the error above.

Suggested fix
Replace stop_monngod with stop_mongod on line 8 of migrations/pre_refresh/feature_compatibility/00-adopt_version.sh and re-publish the snap.

Workaround for affected users
sudo snap refresh --hold rocketchat-server
until a fixed revision is published.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions