Michael Hudson-Doyle
9ff059eae7
put zdev rows directly in a listbox, not in a pile in a listbox
...
this required adding TableListRow.set_contents.
it fixes (partly by accident) a crash when a row becomes unselectable
after a refresh (https://bugs.launchpad.net/subiquity/+bug/1874114 ), it
also makes the home and end keys do something sane.
really this view should not rebuild every row on any change, but that's
something for another day.
2020-04-22 15:36:06 +12:00
Dimitri John Ledkov
760fbaa22f
Review comments
2020-04-16 00:22:52 +01:00
Dimitri John Ledkov
a70d309f6a
Use common palette.
...
Fixes header frindge colors in console-conf.
2020-04-09 12:20:16 +01:00
Dimitri John Ledkov
f3b1a70822
Merge pull request #692 from bboozzoo/bboozzoo/chooser-tweaks
...
console_conf: various recover chooser tweaks
2020-04-09 10:59:39 +01:00
Maciej Borzecki
a33a477324
subiquitycore/core: fix typo in comments
...
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2020-04-07 15:35:47 +02:00
Michael Hudson-Doyle
9a11e90719
attach a controller to most contexts
2020-04-07 21:51:11 +12:00
Michael Hudson-Doyle
246570314a
pass the context object to report_start_event / report_finish_event
2020-04-07 21:51:11 +12:00
Michael Hudson-Doyle
81b6f8a90a
if netplan apply fails show an error rather than crashing the ui
2020-04-07 12:16:53 +12:00
Michael Hudson-Doyle
00e33ae0e1
include ssh host key details in ssh help
2020-04-06 14:10:26 +12:00
Michael Hudson-Doyle
4101440814
a bigger hammer
2020-04-03 13:47:29 +13:00
Michael Hudson-Doyle
fa476d54cc
treat virtual network devices a bit more like physical ones
...
in particular: have subiquitycore.netplan understand them. The goal of
all this is to make the recent change to not delete virtual interfaces
if their configuration has not changed actually work.
2020-04-03 10:12:42 +13:00
Maciej Borzecki
9bcf507b7c
subiquitycore: do not assume that stdin is /proc/self/fd/0
...
The KeyCodesFilter assumed that /proc/self/fd/0 is actual stdin and proceeded to
toy with that fd. This broke the recovery mode chooser where console-conf is fed
a list of recovery systems over stdin. The `sys.stdin` is already correctly
updated to use the real tty and that should be used elsewhere instead of
hardcoding the fd number.
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2020-04-02 13:08:16 +02:00
Michael Hudson-Doyle
a03a336bd7
translate concurrent.futures.CancelledError to asyncio.CancelledError
...
apparently cancelling something that is running in a thread leads to a different
exception class being raised...
2020-04-02 12:15:06 +13:00
Dimitri John Ledkov
590b4b8f23
Merge pull request #655 from bboozzoo/bboozzoo/uc20-recovery-chooser
...
console_conf: implement UC20 recovery chooser
2020-04-01 22:05:30 +01:00
Michael Hudson-Doyle
cab565304a
write netplan directly to the target
...
rather than via curtin and then cloud-init
2020-04-01 19:37:02 +13:00
Maciej Borzecki
93ac6b94a3
Merge remote-tracking branch 'upstream/master' into bboozzoo/uc20-recovery-chooser
2020-03-31 17:14:28 +02:00
Michael Hudson-Doyle
d717375d9c
apply network autoinstall config
2020-03-31 15:58:18 +13:00
Dimitri John Ledkov
d97bf081ea
Only delete virtual devices when config has changed
2020-03-26 21:26:34 +00: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
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
7596e63a9f
pass **kw args to arun_command in run_command_in_foreground
...
this makes the debug shell run in / rather than /snap/subiquity/whatever
2020-03-17 12:23:06 +13:00
Michael Hudson-Doyle
b4ab4d8f1b
Only mark definitively seen screens as configured.
...
Mark a screen as configured if:
- last-screen is present
- the screen was before the screen last-screen indicates
2020-03-16 16:37:25 +13:00
Michael Hudson-Doyle
94611c58e2
remove last-screen file before restarting or exiting
...
unless we are restarting because of a snap refresh.
ths lead to all kinds of confusion after e.g. a ui crash after a snap refresh
2020-03-16 16:37:16 +13:00
Michael Hudson-Doyle
99218fbeb4
support early and late commands
2020-02-04 14:03:59 +13:00
Michael Hudson-Doyle
963cbaaafe
refactor how subiquity is exited after install
...
if we want to do things after install has completed (e.g.: run late
commands), we can't have the code that runs the install invoking
/sbin/reboot directly.
2019-12-20 13:54:34 +13:00
Michael Hudson-Doyle
f925c3fa2a
Merge pull request #622 from mwhudson/make_screen-method
...
make screen behaviour more configurable
2019-12-20 13:09:57 +13:00
Michael Hudson-Doyle
a40082a29b
Merge pull request #621 from mwhudson/controller-set-tweaks
...
tweak ControllerSet
2019-12-20 13:01:04 +13:00
Michael Hudson-Doyle
78d59de8c6
only call setraw if the screen is talking to a tty
2019-12-20 12:48:27 +13:00
Michael Hudson-Doyle
039b5313c4
move make_screen into a method
2019-12-20 12:47:37 +13:00
Michael Hudson-Doyle
ab6fdeb1b5
tweak ControllerSet
...
* add a way to load just one controller
* fetch the RepeatedController class from a projet specific location
neither used yet, but soon
2019-12-20 12:43:42 +13:00
Michael Hudson-Doyle
cb52ab75a2
use the asyncio loop object rather than the urwid loop almost everywhere
2019-12-20 12:04:38 +13:00
Michael Hudson-Doyle
cfc38e1c1b
make all subiquity controllers used inherit from SubiquityController
...
There is going to be a chunk of subiquity specific functionality coming
for autoinstalls, this gives us somewhere to put it.
2019-12-20 11:41:12 +13:00
Michael Hudson-Doyle
570472315d
Add SingleInstanceTask.wait
...
this can be called without having to worry about the task being
cancelled out from under you
2019-12-20 11:00:46 +13:00
Michael Hudson-Doyle
45478b68a4
add a way to change the default level of a context's children
2019-12-20 09:47:38 +13:00
Michael Hudson-Doyle
a91dff2b14
add a way to log a dialog open/close, use it for network dialogs
2019-12-20 09:47:38 +13:00
Michael Hudson-Doyle
4be25fc78f
log applying network config via context
2019-12-20 09:47:36 +13:00
Michael Hudson-Doyle
1f1937b03f
report progress through screens via context
2019-12-20 09:46:26 +13:00
Michael Hudson-Doyle
fa39f10651
fix answers
2019-12-20 09:46:26 +13:00
Michael Hudson-Doyle
5961b68b7d
introduce a Context object for logging start/stop events
2019-12-20 09:46:26 +13:00
Michael Hudson-Doyle
0c268f6c22
fix case where NIC does not get DHCP address
2019-12-19 16:06:56 +13:00
Dimitri John Ledkov
904c0e3179
Merge pull request #613 from mwhudson/model-events
...
stop using urwid signals to coordinate installation
2019-12-17 02:11:32 +00:00
Michael Hudson-Doyle
ca1635a1f9
a bit of refactoring
2019-12-17 15:05:17 +13:00
Dimitri John Ledkov
dce0f10c10
Merge guided method & disk selection into one screen. ( #588 )
...
Merge guided method & disk selection into one screen.
2019-12-17 12:59:03 +13:00
Michael Hudson-Doyle
29c9f0878b
indent a "raise" properly
2019-12-17 11:28:42 +13:00
Dimitri John Ledkov
4bcb0e5fd1
Merge pull request #609 from mwhudson/less-signalling
...
stop some pointless use of urwid signals
2019-12-16 19:38:45 +00:00
Dimitri John Ledkov
42343d665f
Merge pull request #601 from mwhudson/more-async-refresh
...
make the refresh view code use asyncio apis
2019-12-16 12:33:22 +00:00
Dimitri John Ledkov
c067e5e741
Merge pull request #606 from mwhudson/prober-fail-lower
...
push debug_flag block probe crashing into Prober
2019-12-16 12:27:16 +00:00
Michael Hudson-Doyle
33af65bde1
make --screen command line option do something again
2019-12-16 23:17:21 +13:00
Michael Hudson-Doyle
324dddac94
push debug_flag block probe crashing into Prober
2019-12-16 23:15:48 +13:00