61 Commits

Author SHA1 Message Date
Miguel Pires
06d4688ffd daemon: add migrate-home action to debug/ API endpoint
Signed-off-by: Miguel Pires <miguel.pires@canonical.com>
2022-06-21 15:49:01 +01:00
Ian Johnson
a6a0b8d91b daemon/api_debug.go: automatically set DiskVolume...Options.AllowImp...Data
This makes the debug endpoint work on UC18 and UC16 devices which have this
implicit system-data role.

Also add a small check to make sure the options are non-nil in
AllDiskVolumeDeviceTraits when we provide them to
DiskTraitsFromDeviceAndValidate.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2022-02-20 08:55:43 -06:00
Ian Johnson
1d1edde773 cmd/snap/debug, daemon: add debug command for getting gadget vol -> disk traits
This is useful in debugging gadget asset updates.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2022-02-01 14:30:18 -06:00
Ian Johnson
8084dd8b33 cmd/snap, daemon: add debug command for getting OnDiskVolume dump
Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2022-01-10 16:07:32 -06:00
Samuele Pedroni
716b13b5f9 daemon: simplify SyncResponse
it doesn't take Meta anymore
2021-06-03 13:49:26 +02:00
Samuele Pedroni
25e9e2e1f9 daemon: start coalescing resp into respJSON and evaporating Meta
the cleanliness gained by having two structures with almost
the same fields is probably not enough to justify both of them,
especially because daemon is where we are supposed to build
responses, we might as well deal with the details

Meta was a quick hack, also it hasn't really grown since so we can
try to remove it now

AsyncResponse never takes anything over the result but the change id
2021-05-28 19:48:19 +02:00
Paweł Stołowski
06f8fa7566 Merge branch 'master' into debug-stacktrace 2021-05-27 12:06:22 +02:00
Samuele Pedroni
f0e0f8077a tests/nested/core/core20-create-recovery: verify that recovery system can be created at runtime
Merge pull request #10255 from bboozzoo/bboozzoo/uc20-recovery-system-debug-create
2021-05-27 12:00:24 +02:00
Paweł Stołowski
7490eb74a1 Merge branch 'master' into debug-stacktrace 2021-05-27 10:24:39 +02:00
Maciej Borzecki
4af3a049f1 daemon: tweak name of debug endpoing action
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2021-05-27 09:42:44 +02:00
Maciej Borzecki
1dae2b5dcd Merge remote-tracking branch 'upstream/master' into bboozzoo/uc20-recovery-system-debug-create 2021-05-27 09:40:58 +02:00
Samuele Pedroni
50850d1846 daemon: tighten access to POST /v2/debug to only root
drop support for cases that have been for a long time available via
GET anyway
2021-05-26 16:17:21 +02:00
Paweł Stołowski
eac70e3598 Use plural "stacktraces". 2021-05-26 14:45:28 +02:00
Paweł Stołowski
c77ff29af1 Merge branch 'master' into debug-stacktrace 2021-05-26 12:58:21 +02:00
Paweł Stołowski
18cdd4e370 Revert "Restrict stacktrace for root, otherwise keep the rest of debug commands"
This reverts commit f901629b43.
2021-05-25 11:49:05 +02:00
Paweł Stołowski
9a73e6db2c Do not split stacktrace, just return text blob. 2021-05-25 11:21:03 +02:00
Paweł Stołowski
f901629b43 Restrict stacktrace for root, otherwise keep the rest of debug commands
with UserOK.
2021-05-25 11:18:59 +02:00
Paweł Stołowski
3416f0c87f Implement 'snap debug stacktrace command'. Restrict debug endpoint to
root only.
2021-05-25 10:40:15 +02:00
Maciej Borzecki
e65f1f2775 daemon: debug endpoint to create a recovery system
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2021-05-24 14:33:25 +02:00
James Henstridge
eebe1636b2 Merge remote-tracking branch 'upstream/master' into daemon-access-check 2021-04-07 17:02:42 +08:00
Samuele Pedroni
60410a2136 daemon: unexport some result objects for consistency 2021-03-16 11:42:38 +01:00
James Henstridge
6dca0bae80 daemon: reorder access checkers after method functions, to match struct layout 2020-08-27 13:48:57 +08:00
James Henstridge
ea3c3c4b6a daemon: don't export access checkers, and rename RootOnlyAccess to rootAccess 2020-08-07 08:42:36 +08:00
James Henstridge
14b9e7ec62 daemon: have each command list a ReadAccess and/or WriteAccess policy directly.
This is simpler than determining how the current set of flags
interoperate, and more closely matches how API access is documented to
work.
2020-08-07 08:32:56 +08:00
Ian Johnson
8632ea8370 daemon/api_debug: rename aspect=seeding-info to aspect=seeding
Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2020-07-23 07:24:57 -05:00