Skip to content

An operator removes components Simlock installed #213

Description

@V3RON

Request: none

Problem

Simlock can install runtimes and system images but cannot remove them. An iOS runtime takes about 7 GB and an Android system image 1 GB or more. A machine that serves agents for months fills its disk. simlock simctl runtime delete is refused on purpose, so the operator has to work outside Simlock.

Safety rule 1 lets Simlock delete only what it created. Simlock keeps no record of which components it installed, so today it may not delete any.

Depends on #208, which is where Simlock starts to install components on request.

Who it is for

An operator of a long-lived machine that is running low on disk.

Outcome

  • The operator can see every installed component: how much disk it takes, whether Simlock installed it, and how many devices use it, Simlock's own and the user's.
  • One command removes a component that Simlock installed and that no Simlock device uses.
  • A dry run shows what would be removed and how much disk it frees, and removes nothing.
  • Whatever Simlock installed, Simlock can remove. That includes an iOS runtime that Xcode can also see.
  • A component Simlock did not install is never removed. The refusal says why. A component installed before Simlock kept a record counts as not Simlock's.
  • A component any device still uses is refused, whether the device is Simlock's or the user's own, booted or not. The refusal names how many of each use it.
  • A removal is refused while a download is running or waiting on that platform.
  • On iOS the runtime is unregistered. If its download stays on disk afterwards, the result says so and says how to reclaim it.
  • Removal is admin-only. The listing is open to any session.
  • Every removal is reported as an event that names the component and who asked.
  • The removed component leaves the catalog without a daemon restart.

Non-goals

  • Removing anything automatically. No cleanup rule, idle tier or disk-pressure reaction removes a component.
  • Removing a component Simlock did not install, with or without a force flag.
  • Removing through a gateway.
  • Seeing devices Simlock cannot see: those of another Simlock instance on the same machine, or a device the user creates while a removal runs.
  • Removing prerequisites: Xcode or Android SDK tools.

Completion conditions

  • After Simlock installs a component, the listing shows it as Simlock-installed with its size. A component that was already on the machine is shown as not Simlock's.
  • Removing a Simlock-installed, unused component succeeds, and simlock catalog no longer lists it.
  • Removing a component Simlock did not install fails and deletes nothing.
  • Removing a component that a Simlock device uses fails and deletes nothing.
  • Removing an iOS runtime that a simulator in the user's own device set uses fails and deletes nothing.
  • The dry run changes nothing on disk.
  • An agent session gets FORBIDDEN.
  • docs/CLI.md describes the commands and both refusals. docs/EVENTS.md lists the new event.

Open questions

Decisions

  • ADR 0010 — Components are installed, recorded and removed through one owner in the core: §5 is the record and the proof of ownership, §8 is listing and removal. Accepted — not yet implemented.

Tasks

  1. simlock component list shows every installed component, its size, and who installed it #220: simlock component list.
  2. simlock component remove removes a component Simlock installed #221: simlock component remove.
  3. component remove removes an iOS runtime whose only other simulators were never used #241: remove an iOS runtime whose only other simulators were never used.

Written by an agent.

Activity

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

    feature:plannedSplit into tasks. Never picked up itself.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions