Dimitri John Ledkov
e416dd39f0
Merge pull request #663 from mwhudson/autoinstall-snaps
...
handle the 'snaps' section of the autoinstall file
2020-03-31 09:32:53 +01:00
Dimitri John Ledkov
d69242b2ab
Merge pull request #660 from mwhudson/autoinstall-validation
...
validate autoinstall data against a schema
2020-03-31 09:15:15 +01:00
Michael Hudson-Doyle
75ee48be24
update NetworkModel.has_network when non-interactive
2020-03-31 19:47:04 +13:00
Michael Hudson-Doyle
a15858d934
handle the 'snaps' section of the autoinstall file
...
went through a few versions of this locally, this one is pleasingly
small in delta.
2020-03-31 17:09:47 +13:00
Michael Hudson-Doyle
d717375d9c
apply network autoinstall config
2020-03-31 15:58:18 +13:00
Michael Hudson-Doyle
3b76c4dc4a
lint
2020-03-30 11:07:26 +13:00
Michael Hudson-Doyle
170f44663e
actually validate version field, reduce indentation a bit
2020-03-30 11:05:51 +13:00
Michael Hudson-Doyle
32e79826ad
do data loading / validation in a context
2020-03-30 10:35:45 +13:00
Michael Hudson-Doyle
32817ac410
add an invalid autoinstall file
2020-03-30 10:29:01 +13:00
Michael Hudson-Doyle
07e985bbeb
more paranoia
2020-03-30 10:27:54 +13:00
Michael Hudson-Doyle
19bee4e8b6
tweak behaviour on failure slightly
2020-03-30 10:26:18 +13:00
Michael Hudson-Doyle
b1ab79989d
fixity
2020-03-30 10:17:26 +13:00
Michael Hudson-Doyle
0f53b9b1f6
do not capture errors applying autoinstall config
...
outer handling gets this closer to right now
2020-03-30 10:17:26 +13:00
Michael Hudson-Doyle
caf713d289
shuffle run loop around
2020-03-30 10:17:22 +13:00
Michael Hudson-Doyle
0012c5ff70
validate data on loading controllers
2020-03-30 10:15:09 +13:00
Michael Hudson-Doyle
57f0a869d3
validate schema, and fix some bits
2020-03-30 10:15:09 +13:00
Michael Hudson-Doyle
ac6d938ffa
add command to dump schema out
2020-03-30 10:15:09 +13:00
Michael Hudson-Doyle
716557df03
trivial fixes
2020-03-30 10:15:09 +13:00
Michael Hudson-Doyle
a9cb6c0770
type out some more schemas
2020-03-30 10:15:09 +13:00
Michael Hudson-Doyle
75f29cee70
type out some schema stuff
2020-03-30 10:15:09 +13:00
Michael Hudson-Doyle
c87e8a15d6
Merge pull request #659 from mwhudson/curtin-update
...
Curtin update
2020-03-27 14:37:09 +13:00
Michael Hudson-Doyle
7e69fe6d54
allow reformatting of raids
2020-03-27 14:17:37 +13:00
Michael Hudson-Doyle
6622121b4b
Merge pull request #658 from mwhudson/no-cloud-init-if-disabled
...
do not look at cloud config at all if cloud-init is disabled
2020-03-27 13:52:55 +13:00
Michael Hudson-Doyle
e7603d82c9
do not look at cloud config at all if cloud-init is disabled
2020-03-27 13:32:01 +13:00
Michael Hudson-Doyle
100661b60c
use wipe/preserve refactor commit from curtin
2020-03-27 13:23:10 +13:00
Michael Hudson-Doyle
ecb6f380ac
do not wait for cloud-init in dry run mode, fails on travis
2020-03-27 11:58:40 +13:00
Michael Hudson-Doyle
1e6c9c6468
Merge pull request #657 from CanonicalLtd/no-delete-virtual-all-the-time
...
Only delete virtual devices when config has changed
2020-03-27 11:07:52 +13:00
Dimitri John Ledkov
d97bf081ea
Only delete virtual devices when config has changed
2020-03-26 21:26:34 +00:00
Michael Hudson-Doyle
b799a873d7
Merge pull request #654 from mwhudson/cloud-init-wait
...
wait for cloud init & extract autoinstall config
2020-03-27 10:11:41 +13:00
Michael Hudson-Doyle
e82c6f939a
neuter cloud init access in dry-run mode
2020-03-26 12:49:51 +13:00
Michael Hudson-Doyle
c616012a39
use better code for getting stuff out of cloud-init
2020-03-26 12:46:54 +13:00
Michael Hudson-Doyle
0189965949
dump using safeyaml
2020-03-26 12:44:00 +13:00
Michael Hudson-Doyle
e3341d98bd
Merge pull request #656 from mwhudson/py36-cancelled-error
...
asyncio.CancelledError inherits from Exception in Python 3.6 :(
2020-03-25 15:14:57 +13:00
Michael Hudson-Doyle
50580caed4
asyncio.CancelledError inherits from Exception in Python 3.6 :(
2020-03-25 14:55:12 +13:00
Maciej Borzecki
a147c720ba
console_conf: run as recovery chooser when --recovery-chooser-mode is provided
...
Add support for --recover-chooser-mode command line argument. When provided, run
as a recovery chooser, rather than as a regular console-conf instance.
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2020-03-24 15:09:50 +01:00
Maciej Borzecki
f6ea3bc960
console_conf: add an app for the recovery chooser
...
Add an app and hook it up with the rest of elements.
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2020-03-24 15:09:50 +01:00
Maciej Borzecki
8d2f1f9a8b
console_conf/controllers: add recovery chooser controllers
...
Add controller used by the recovery chooser.
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2020-03-24 15:09:50 +01:00
Maciej Borzecki
5504a9aa91
console_conf/views: add recovery chooser views
...
Add views used by recovery chooser:
- welcome - recovery chooser specific message
- chooser - list of seed systems and actions
- confirm - where user confirms the selected action
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2020-03-24 15:09:50 +01:00
Maciej Borzecki
c328152fb8
console_conf/models: add models for recovery systems
...
Add models for recovery chooser systems, brand information, snapd models and
recovery actions.
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2020-03-24 15:09:50 +01:00
Maciej Borzecki
5d77d71499
subiquitycore: allow overriding input/output when creating screens
...
The interaction with snap-recovery-chooser happens over stdin/stdout. The early
setup code in console-conf will attempt to restore sys.stdin/sys.stdout and hook
them up to the current tty.
The patch allows passing input/output streams explicitly as parameters to the
constructors.
Also, default to sys.stdin/sys.stdout and pass both streams explicitly when
constructing urwid.raw_display.Screen(), to workaround the bug in their
constructor. THe constructor is defined as follows:
class Screen(BaseScreen, RealTerminal):
def __init__(self, input=sys.stdin, output=sys.stdout):
What means, that even if we override sys.stdout/sys.stdin globally in our setup
code, this will have no effect as `input` and `output` already got their values.
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2020-03-24 13:32:52 +01:00
Michael Hudson-Doyle
f0d6beba63
read autoinstall from cloud config
2020-03-20 15:40:04 +13:00
Michael Hudson-Doyle
defd3d7328
wait for cloud-init at startup
2020-03-20 15:39:06 +13:00
Michael Hudson-Doyle
aca4c513fd
add cloud-init to stage-packages
2020-03-20 14:48:16 +13:00
Michael Hudson-Doyle
9636b7a9ef
Merge pull request #653 from mwhudson/20.03.1-oopsies
...
20.03.1 oopsies
2020-03-20 10:54:12 +13:00
Michael Hudson-Doyle
31ce375a1d
display messages when no big disks and no disks are found
...
probably could do with wordsmithing but better than crashing
2020-03-20 10:25:27 +13:00
Michael Hudson-Doyle
470be04f46
don't offer tiny disks for the guided options
2020-03-20 10:12:48 +13:00
Michael Hudson-Doyle
3856a11186
fix deleting virtual network devices
2020-03-20 09:18:25 +13:00
Michael Hudson-Doyle
cc52bb62a5
fix enabling dhcp on a virtual interface
2020-03-20 09:17:29 +13:00
Michael Hudson-Doyle
ac587f9bf6
remove /target after unmounting it
2020-03-20 09:17:23 +13:00
Michael Hudson-Doyle
0967777a2d
increase block probe timeout
...
Seeing a few error reports with this timing out and they look sort of
real from the logs. Maybe probing is slow just after startup when so
much other stuff is going on? Let's just increase the timeout and see if
they go away.
2020-03-20 09:16:56 +13:00