Michael Hudson-Doyle
26593f4c16
Merge pull request #924 from mwhudson/lp-1921820-2
...
more reliably restart client when server restarts
2021-03-31 13:30:56 +13:00
Michael Hudson-Doyle
132440451d
more reliably restart client when server restarts
...
Splitting subiquity into server and client means that in general
old versions of the client can still be running when the server is
updated (the client running on tty1 will be restarted by snapd/systemd
when the snap is updated but clients running via e.g. ssh will not). I
implemented a way for the client to detect this and restart itself: the
server sets a header in all responses that indicates if it has been
updated. So far so good. But the way it knows that it has been updated
is to check the presence of a file that is only created when subiquity
itself triggers the refresh, so it's not there in the case of manual
refresh, and as reported in https://bugs.launchpad.net/bugs/1921820 this
can lead to the client crashing because it cannot parse the new server's
response. This simply changes to creating the marker file in the snap
post-refresh hook, which will be executed for manual snap refreshes as
well.
While I'm at it, remove the rest of the post-install hook that restarted
subiquity clients running on the serial line as the generic machinery
will work for these too.
2021-03-31 13:15:06 +13:00
Michael Hudson-Doyle
64ac97aafe
make subiquity client use new API for guided disk usage
2021-03-30 14:22:28 +13:00
Michael Hudson-Doyle
e3361aa51c
do not set installer user password if it has password or authorized keys
...
dearie me making a nice UI can involve a lot of typing.
2021-03-25 14:26:49 +13:00
Michael Hudson-Doyle
6fa1d9bbd0
fix crash on refresh: change ids are strings in the snapd api
...
for https://bugs.launchpad.net/subiquity/+bug/1913417
2021-02-10 11:43:58 +13:00
Michael Hudson-Doyle
fac0eeed43
fix crash when trying to view nic info
...
fixes half of https://bugs.launchpad.net/subiquity/+bug/1912955
2021-01-27 09:35:09 +13:00
Michael Hudson-Doyle
53d06961cc
append, do not overwrite logs
...
The log file names have pids in now, but when subiquity re-execs itself
to fake a snap refresh the pid doesn't change. Having the pre "refresh"
logs get overwritten does not help anything and is sometimes very
annoying.
2020-12-18 12:18:40 +13:00
Michael Hudson-Doyle
007dd3e5ef
tidy up answers handling a bit and fix a race
2020-12-16 10:21:32 +13:00
Michael Hudson-Doyle
aad036d925
split subiquity.core into subiquity.client.client and subiquity.server.server
2020-11-04 10:57:22 +13:00
Michael Hudson-Doyle
93b8998af6
split NetworkController into non-ui and ui-focused classes
2020-10-12 12:05:56 +13:00
Michael Hudson-Doyle
d6f3f83622
run network answers in run_answers
2020-10-12 11:58:08 +13:00
Michael Hudson-Doyle
287b4492e8
start to factor out bits of networkcontroller that touch the view
2020-10-12 11:47:48 +13:00
Michael Hudson-Doyle
798a9da563
have answers code wait for nic creation/deletion to take effect
...
the UI will not be quite so synchronous in the client/server world
2020-10-12 11:25:50 +13:00
Michael Hudson-Doyle
8dc31a3c6b
change network answers processing to not reference model directly
2020-10-12 11:22:08 +13:00
Michael Hudson-Doyle
f89b9e692a
asyncioify "fine grained action" handling a bit
2020-10-12 11:16:38 +13:00
Michael Hudson-Doyle
673ade7f2a
make core interface a little simpler
2020-10-09 13:12:09 +13:00
Michael Hudson-Doyle
c03f6580fd
move more code that should never have been so generic
2020-10-09 13:08:15 +13:00
Michael Hudson-Doyle
2bf981ebb8
move "last-screen" handling out of generic code
2020-10-09 13:07:04 +13:00
Michael Hudson-Doyle
15ae0bf234
make NetDevInfo.is_connected a bool, as it is supposed to be
2020-09-25 14:33:53 +12:00
Michael Hudson-Doyle
edc43ff811
add a minimal server process
...
run it automatically in dry-run mode
2020-09-22 14:43:26 +12:00
Michael Hudson-Doyle
7d02ee17f6
make zdev view/controller interface more client/server friendly
2020-09-21 21:04:14 +12:00
Michael Hudson-Doyle
bc6c66efbb
give contexts an id and have progressview track them by id not identity
2020-09-21 14:01:40 +12:00
Michael Hudson-Doyle
219360d12d
fixes for how install failures are presented
...
some of these have been around for a while :/
2020-09-21 14:01:23 +12:00
Michael Hudson-Doyle
56441c6f97
small tidies
2020-09-18 22:01:36 +12:00
Michael Hudson-Doyle
9b414df0eb
add a helper to wait and show a dialog if needed
...
use this in snaplist view. cancellation with asyncio is mindbending!
2020-09-18 21:51:14 +12:00
Michael Hudson-Doyle
a7bcc7faf0
add a way to wait for something with notification after 0.1s
...
use this for moving between screens, removing some crummy code from subquity/core.py
2020-09-18 21:18:27 +12:00
Michael Hudson-Doyle
6c258d6da4
allow make_ui to be a coroutine
2020-09-18 11:52:19 +12:00
Michael Hudson-Doyle
f0082c2068
change controller api to return a view, rather than setting it
2020-09-18 11:44:00 +12:00
Michael Hudson-Doyle
eb5dba579e
handle answers in a separate method
2020-09-18 11:18:08 +12:00
Michael Hudson-Doyle
aa3bce4414
do not run the urwid loop at all when not interactive
2020-09-18 09:54:50 +12:00
Michael Hudson-Doyle
45009e3a12
refactor startup a little
...
the point of this is to have the event loop running while loading
autoinstall commands, which means we do not have to start and stop the
event loop inside load_autoinstall_config if there are early-commands to
run.
2020-09-18 09:54:50 +12:00
Michael Hudson-Doyle
88821f745c
Merge pull request #822 from mwhudson/network-simpler-types
...
make network view use a plain-old-data view of a nic
2020-09-18 09:54:13 +12:00
Michael Hudson-Doyle
85b35c9e87
steal contextlib from Python 3.8
...
Python 3.6's does not have asynccontextmanager.
2020-09-11 16:55:26 +12:00
Michael Hudson-Doyle
01e9c04ab5
Merge pull request #817 from mwhudson/tuiapplication
...
remove all UI code from "core" application object, add tuiapplication
2020-09-10 11:31:30 +12:00
Michael Hudson-Doyle
f4066d97d7
convert controller api methods to take strings and trigger updates for affected nics
...
this is going to work better in the client/server world
2020-09-03 22:52:31 +12:00
Michael Hudson-Doyle
f32c74c86d
address review comments
2020-09-03 12:31:25 +12:00
Michael Hudson-Doyle
04426cec15
make network view use a plain-old-data view of a nic
...
The network view code used to crawl all over the network model object,
which isn't really going to work with the upcoming client/server split.
So this adds a much better defined interface between the view and
controller.
2020-09-03 11:12:38 +12:00
Michael Hudson-Doyle
e367226f47
fix crash on renaming bond
2020-08-25 13:55:20 +12:00
Michael Hudson-Doyle
edc65dbbfb
make the base controller have no ui, add subclass for one that has ui
2020-08-23 23:18:28 +12:00
Michael Hudson-Doyle
f6757af8d1
fix restarting after refresh
2020-08-23 23:18:28 +12:00
Michael Hudson-Doyle
f5f8a8a75c
import the controllers module explicitly
2020-08-23 23:18:28 +12:00
Michael Hudson-Doyle
ccd8c2382e
split urwid-using bits out of subiquitycore.core.Application
2020-08-23 23:18:26 +12:00
Michael Hudson-Doyle
bc1060eefa
make ControllerSet more re-usable
2020-08-23 22:59:39 +12:00
Michael Hudson-Doyle
63f5f57f30
Merge pull request #804 from mwhudson/screen-refactor
...
Move the code for setting up the screen to its own file
2020-08-23 22:43:42 +12:00
Tsunghan Liu (Robert Liu)
e798451c27
Ignore CAN and unknown interfaces (LP: #1890397 )
...
Add CAN and unknown interfaces to NETDEV_IGNORED_IFACE_TYPES, otherwise rander_config() will throw a KeyError exception when a unsupported interface shows up.
2020-08-07 21:04:05 +08:00
Michael Hudson-Doyle
210cdcb51b
Move the code for setting up the screen to its own file
...
Looking at this code thinking about the coming client / server split
made me realise that we could start by at least moving this
functionality to a more encapsulated place.
2020-07-27 23:40:17 +12:00
Michael Hudson-Doyle
6b26b668be
fix formatting of error message
2020-07-22 12:27:04 +12:00
Michael Hudson-Doyle
9271f17dd2
move subiquity.snapd to subiquitycore.snapd
2020-07-02 12:56:49 +12:00
Michael Hudson-Doyle
97b5c64805
do not crash in NetworkController._data_ready if ui.body is not a widgetwrap
...
for https://bugs.launchpad.net/subiquity/+bug/1881887
2020-06-12 15:01:58 +12:00
Michael Hudson-Doyle
a9dd3757f1
Merge pull request #761 from mwhudson/still-better-i18n
...
more work towards being able to provide good translations
2020-05-21 12:38:51 +12:00