uc20 model does not verify modes: snap consistencies

Bug #1883970 reported by Ian Johnson on 2020-06-17
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
High
Samuele Pedroni

Bug Description

if I have a model.json snaps header like this:

    "snaps": [
        {
            "name": "pc",
            "type": "gadget",
            "default-channel": "20/edge",
            "id": "UqFziVZDHLSyO3TqSWgNBoAdHbLI4dAH"
        },
        {
            "name": "pc-kernel",
            "type": "kernel",
            "default-channel": "20/edge",
            "id": "pYVQrBcKmBa0mZ4CCN7ExT6jH8rY1hza"
        },
        {
            "name": "snapd",
            "type": "snapd",
            "default-channel": "latest/edge",
            "id": "PMrrV4ml8uWuEUDBT8dSGnKUYbevVhc4"
        },
        {
            "name": "core20",
            "type": "base",
            "default-channel": "latest/edge",
            "id": "DLqre5XGLbDqg9jPtiAhRRjDuPVa5X1q"
        },
        {
            "name": "core",
            "type": "core",
            "default-channel": "latest/edge",
            "id": "99T7MUlRhtI3U0QFgl5mXXESAiSwt776",
            "modes": [
                "run"
            ]
        },
        {
            "name": "http",
            "type": "app",
            "default-channel": "latest/edge",
            "id": "TJEfggNhgEJ4XKJ8o7ahsvRklz5kRK5w",
            "modes": [
                "run",
                "recover"
            ]
        }
    ]

when I go into recovery mode, it will fail to seed because for the http snap in recovery mode, I also need the core snap (the base of http) to be included in recovery mode, but signing this model is perfectly valid. We should add additional verification to the model for the various mode combinations.

tags: added: uc20
Changed in snapd:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Samuele Pedroni (pedronis)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers