Skip to content

Installed updates leave obsolete control wrapper after a rename #77

Description

@omry

Summary

Updating an installed deployment after its generated control-script name changes
creates the new wrapper but leaves the previous Reploy-generated wrapper behind.

This was observed while adopting the new appctl default from #68 / PR #74.

Reproduction

  1. Install a state-v1 system deployment whose blueprint explicitly sets:

    environment:
      id: arbiter
      control_script: arbiter
    
  2. Update the blueprint to omit control_script, so current Reploy resolves the
    default appctl name.

  3. Refresh the existing staging deployment. Staging correctly removes arbiter
    and creates appctl.

  4. Rebuild and update the existing system installation:

    sudo reploy install \
      --dir reploy-staging \
      --scope system \
      --to /opt/arbiter \
      --service arbiter
    
  5. Inspect the installation root.

Observed

Both wrappers remain:

/opt/arbiter/appctl
/opt/arbiter/arbiter

The old file is the previous generated wrapper and still embeds:

control_script='arbiter'

The new file embeds:

control_script='appctl'

Staging update behavior is correct: only reploy-staging/appctl remains.

Expected

When an installed deployment changes control-script names, Reploy should remove
the previous Reploy-managed wrapper after successfully installing the new one.
It must not remove an unrelated operator-owned file merely because it occupies
the previous path.

Add installed-update regression coverage matching the existing staged refresh
coverage for renamed wrappers.

Environment

  • Reploy: 0.7.0.dev1 at 08d1ee835c
  • System install target: /opt/arbiter
  • Previous control script: arbiter
  • Current control script: appctl

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions