Michael Hudson-Doyle
efed69ff7c
some asyncifying of network
2019-12-13 09:37:36 +13:00
Michael Hudson-Doyle
9a05653150
Tweak Controller API
...
* rename 'default' method to 'start_ui'
* add 'end_ui' hook
* add Application.cur_controller helper
2019-09-04 15:18:45 +12:00
Michael Hudson-Doyle
f85fb6aac7
Merge pull request #525 from mwhudson/outermost-pile
...
Make the outermost widget an instance of Pile rather than Frame
2019-08-16 14:51:32 +12:00
Michael Hudson-Doyle
9e40dcbad6
Make the outermost widget an instance of Pile rather than Frame
...
Current plans involve putting a focusable widget (a help button) in the
footer, and Pile's behaviour is much more what we want than Frame for
this.
2019-08-16 14:31:03 +12:00
Michael Hudson-Doyle
7096501a6d
reduce answers-related boilerplate
2019-08-15 13:34:10 +12:00
Michael Hudson-Doyle
81b9c883f3
do not copy so many things from app to controller in Controller.__init__
2019-08-15 13:34:09 +12:00
Michael Hudson-Doyle
98908e91b2
get rid of silly common dictionary that was passed around a bit everywhere
2019-08-15 13:33:38 +12:00
Michael Hudson-Doyle
6bbe02774f
assume a default route on a down link has gone away
...
it seems netlink routing table messages are more of a notifications of
changes being explicitly made vs notifications of all changes to
routing.
for https://bugs.launchpad.net/subiquity/+bug/1837822
2019-07-25 17:37:41 +12:00
Michael Hudson-Doyle
3e8bc81190
add some logging around moving between screens
...
my best guess at why CI is currently hanging sometimes is that the
'next-screen' signal is being sent too often / too early. add some
logging around this so that we will be able to confirm / deny this by
reading the logs.
2019-04-18 10:22:05 +12:00
Michael Hudson-Doyle
7cc56a8b58
trying to debug edge ci failures
...
* add a bit more logging
* wait for initial network apply to finish before moving on from
network screen
2019-04-04 12:06:41 +13:00
Michael Hudson-Doyle
3384eb5c84
small fixes
2019-03-26 11:32:02 +13:00
Michael Hudson-Doyle
b485cf487b
make the re-dhcp on entry to the network screen a little more discreet
2019-03-26 10:59:50 +13:00
Michael Hudson-Doyle
b571b3d1a9
track and display DHCP status
...
Mark all devices with DHCP enabled as pending when the config is
applied, and mark them as timed out ten seconds later if they have not
received any addresses.
2019-03-26 10:57:36 +13:00
Michael Hudson-Doyle
eae2497d41
auto disable inactive NICs
...
This disables any NIC that does not have a global address by the first
time the network screen is shown
2019-03-26 10:57:36 +13:00
Michael Hudson-Doyle
3bb9268974
apply network changes immediately, rather than when the "Done" is pressed
...
diff makes this change look more involved than really necessary :(
2019-03-26 10:57:33 +13:00
Michael Hudson-Doyle
594db86618
have DownNetworkDevices do its work in a background thread
...
not that it should block, but no reason not to
2019-03-26 10:57:13 +13:00
Michael Hudson-Doyle
680da7d299
rename/redefine default route waiter to watcher
...
the callbacks now get called whenever the set of default routes changes,
not just when one appears
2019-03-26 10:57:13 +13:00
Michael Hudson-Doyle
a888ed222c
kick off snap list when a default route appears, not at startup
...
of course in the common case these are more or less the same time. but
this is conceptually nicer
2019-03-07 15:46:40 +13:00
Michael Hudson-Doyle
a51f04b02c
start network probing after all signals have been connected
2019-03-07 15:31:39 +13:00
Michael Hudson-Doyle
756d923424
remove long disabled views for setting default route
...
as and when we add route configuration to subiquity, we will need new
views anyway.
2019-03-07 14:13:37 +13:00
Michael Hudson-Doyle
d0c41469a7
remove login model/controller/view from subiquitycore
...
long ago subsumed into other code
2019-03-07 14:01:52 +13:00
Michael Hudson-Doyle
b77aa9499e
make sure all delays during replaying answers repsect SUBIQUITY_REPLAY_TIMESCALE
2019-02-21 11:07:54 +01:00
Michael Hudson-Doyle
bc755cc953
fix a race condition in network answers support
2019-02-21 09:32:45 +01:00
Michael Hudson-Doyle
bee1109a2d
Much more fine grained answers support for networking.
2018-10-31 09:59:31 +13:00
Michael Hudson-Doyle
5f8e3dc2a4
do not call next-screen from a background thread
2018-10-31 09:58:58 +13:00
Michael Hudson-Doyle
09bbe3ff19
Do not call the default route waiter repeatedly.
...
This can crash when multiple interfaces get routes.
2018-10-31 09:58:58 +13:00
Michael Hudson-Doyle
15b6bb1114
Major refactor of network model
...
The main thrust of this is to not create virtual interfaces until
applying the config.
This meant that the network model has to change a bit to be able to
represent interfaces that do not yet exist on the system. I did this
by ripping out most of the existing network device code: now a
NetworkDev is really just a wrapper for the config for a device and (if
it exists) the netlink data too. A few places had to adjust to checking
if the netlink info is available before accessing it but all in all it
was not that painful.
There are a few other refactorings in this commit that perhaps should be
split out (how the bond parameters are handled, some stuff about
resizing the table rows when interfaces are edited) but it doesn't
really seem worth it.
2018-10-31 09:58:56 +13:00
Dimitri John Ledkov
87ef3749e6
Finish bond master/slaves.
2018-07-11 22:02:52 +12:00
Dimitri John Ledkov
e0d231f5d7
Create bond
2018-07-11 22:02:52 +12:00
Michael Hudson-Doyle
c21cec6fdc
fix logic around waiting for udev to settle to avoid busy loop
2018-07-11 09:41:56 +12:00
Michael Hudson-Doyle
53a14e30ad
make updates to network screen in response to netlink events more finegrained
2018-07-10 13:25:05 +12:00
Dimitri John Ledkov
8a0e94ccc7
Pacify flake8
2018-07-06 15:00:27 +01:00
Dimitri John Ledkov
92c53b29ae
Vlan ui
2018-07-06 14:31:42 +01:00
Michael Hudson-Doyle
2e281d00d4
delete gobs of old code
2018-07-06 13:36:53 +12:00
Michael Hudson-Doyle
90d580a57e
remove DummyView
2018-06-22 09:39:33 +12:00
Scott Moser
3e69673501
Fix writing of netplan configs
...
When user configures network with subiquity, it's rendered
netplan should be wholly definitive. So, we remove the other files
that may have config. This fixes a bug where running in an instance
when running on a system where cloud-init had rendered a 'match' with
'macaddress'.
When writing netplan we keep 'macaddress' match in place but drop
others. The others may just wildcard from the installer environment,
but macaddress are likely by cloud-init or otherwise intentionally
written.
Also add an atomic write in subiquitycore/file_util and move the
netplan code into subiquitycore/netplan.py, and add some unit test
helpers from cloud-init.
2018-06-07 11:46:34 -04:00
Ryan Harper
7dba257b3c
Drop mis-merged code from rebase
2018-05-24 16:59:31 -05:00
Ryan Harper
c4c614860a
pep8 fix drop commented code in subiquitycore/controllers/network.py
2018-05-24 16:54:02 -05:00
Ryan Harper
f2715a4735
pep8 fixes for subiquitycore.controllers.network
2018-05-24 16:51:51 -05:00
Michael Hudson-Doyle
626488e988
Merge pull request #334 from CanonicalLtd/mwhudson/move-excerpt-title-to-view
...
move excerpt, title and footer from controller to view
2018-05-22 22:38:39 +12:00
Michael Hudson-Doyle
f6f214125f
move TaskSequence somewhere more generic
...
I want to reuse it in my containerizing branch.
Improve API and docs a bit while I am looking at it.
2018-05-21 11:52:06 +12:00
Michael Hudson-Doyle
11708703c9
move titles, footers, excerpts from controller to view
...
read title and footer from the view instance, make views respsonsible for rendering
the excerpt
adapts infrastructure, welcome, keyboard, network views
2018-05-18 15:55:49 +12:00
Michael Hudson-Doyle
488802fc8b
update users of run_command (i thought there was more than this)
2018-05-18 13:11:15 +12:00
Michael Hudson-Doyle
ad9f10a9ac
try to ensure that functions run in the background have "_bg_" in their name
2018-05-18 12:29:42 +12:00
Michael Hudson-Doyle
1efa265fc5
remove calls to set_alarm_in that were only there so that exceptions raised would be propagated
2018-05-18 12:25:47 +12:00
Michael Hudson-Doyle
0a0af0842b
fix stupid crash
2018-05-04 10:31:36 +12:00
Michael Hudson-Doyle
fa8f8d32f5
down all network links that have changed config before applying it
...
this means that if you enter a broken config, it breaks as it should
2018-05-03 12:14:06 +12:00
Michael Hudson-Doyle
688a270c17
a round of marking strings as translatable and ensuring translations are actually displayed in the UI
2018-04-19 10:29:08 +12:00
Michael Hudson-Doyle
b215ceaf7d
do not log wifi password when an interface appears
...
This can happen in particular when netplan re-plugs an interface.
2018-02-26 22:29:41 +13:00
Michael Hudson-Doyle
94b4f550e3
update config to match probert changes
2017-11-27 09:54:11 +13:00
Michael Hudson-Doyle
484239c060
do not move on from network screen inside callback
...
things get super confusing when there is an exception
2017-11-21 11:27:26 +13:00
Michael Hudson-Doyle
6919e5ce68
minimal implementation of canned answers
...
this allows automation of the enter-enter-enter flow, not much more than that
2017-11-17 13:25:16 +13:00
Michael Hudson-Doyle
e7afa9b0b3
correct _data_ready call when udev is not settled
2017-11-17 13:24:30 +13:00
Michael Hudson-Doyle
8086d5df81
move to a unified model instance
...
and stop having the controllers construct each model instance for itself
2017-11-16 12:48:20 +13:00
Michael Hudson-Doyle
947a65a3bb
changes following changes in probert
...
the only really visible effect of all this is to make --dry-run
--machine-config foo show the network config from foo, not the machine
running subiquity. (The existing configs won't work, though)
2017-11-15 14:27:24 +13:00
Michael Hudson-Doyle
94e58a0aaa
reduce padding around overlays
2017-10-25 21:27:31 +13:00
Michael Hudson-Doyle
aa564b9f6a
ACTUALLY let udev queue settle rather than just pretending to
2017-09-29 08:37:31 -04:00
Michael Hudson-Doyle
3221599cb1
default routes can appear via CHANGE as well as NEW
2017-09-29 08:37:24 -04:00
Michael Hudson-Doyle
393055622c
always super-call route_change
2017-09-29 08:37:19 -04:00
Michael Hudson-Doyle
86ac32905b
change the progress bar to show x / y rather than a %age
...
Also make its progress more automatic.
2017-09-26 09:01:22 -04:00
Dimitri John Ledkov
693f3e7c7d
Barebones i18n setup.
2017-09-18 14:14:39 +01:00
Michael Hudson-Doyle
e0f75ba013
tweaks to network views
...
1) move the done / cancel buttons (and error display) out of scrolling region
2) focus done by default
3) update footer texts to make sense
4) use a bit more of the horizontal space to show interface information
2017-09-08 09:48:41 +12:00
Michael Hudson-Doyle
395b30451e
stop being clever in handling of escape in network screens
2017-04-05 14:36:46 +12:00
Michael Hudson-Doyle
32578fb35e
make sure waiting for the default route times out properly
...
see https://bugs.launchpad.net/ubuntu/+source/subiquity/+bug/1672803
2017-03-21 13:38:35 +13:00
Michael Hudson-Doyle
f1b97508fa
dry-run fix
2017-03-20 15:03:32 +13:00
Michael Hudson-Doyle
3f425c9e05
make the netplan file name and path depend (very slightly) on subiquity vs console-conf
2017-03-16 22:52:05 +13:00
Michael Hudson-Doyle
ff75b7a7fe
fix crash on disappearing network interface
...
By being more careful about accessing self.focus in FocusTrackingMixin.
Fixes https://bugs.launchpad.net/ubuntu/+source/subiquity/+bug/1667829
2017-03-02 21:34:12 +13:00
Michael Hudson-Doyle
404ca627da
use evilnick's wording on the network page
2017-03-02 13:52:20 +13:00
Michael Hudson-Doyle
65f9d1ef62
move show_overlay to BaseView
2017-02-14 16:16:19 +13:00
Michael Hudson-Doyle
a4d6682478
simpler api for doing stuff in a background thread
2017-01-18 12:03:56 +13:00
Michael Hudson-Doyle
fa95fb55ad
make callfromthread functionality more available, use it in installprogress
2017-01-18 12:02:34 +13:00
Michael Hudson-Doyle
e50ccb9c76
stop sharing WelcomeController
2017-01-17 11:34:32 +13:00
Michael Hudson-Doyle
4e726495c3
move BaseIdentityController to become subiquity's IdentityController
2017-01-17 11:34:32 +13:00
Michael Hudson-Doyle
17b943209e
remove subiquitycore/async.py
...
it was just a glorified global variable.
2017-01-13 15:08:31 +13:00
Mathieu Trudel-Lapierre
b9a990171c
identity: don't quit after subiquity/subiquitycore identity controller, it should be able to continue to the next screen.
2016-12-22 22:16:15 -05:00
Michael Hudson-Doyle
df800bf8b3
fix header of WIFI config screen
...
See https://bugs.launchpad.net/bugs/1651119
2016-12-22 12:16:39 +13:00
Mathieu Trudel-Lapierre
01c42205f0
Fix identity controller for subiquity; correctly process done signal and displaying local user info.
2016-12-20 15:40:28 -05:00
Michael Hudson-Doyle
2a716df0ad
add and use NetworkConfigureIPv6InterfaceView
2016-12-12 15:45:45 +13:00
Michael Hudson-Doyle
bd9046ae9c
squash some more trivial uses of signals
...
And move the @view decorator and associated methods used by the network
stuff somewhere more general.
2016-11-22 16:09:51 +13:00
Michael Hudson-Doyle
9ba1c8feff
get subiquity to the point where it at least starts
2016-11-21 13:32:58 +13:00
Michael Hudson-Doyle
19081d53bc
reparse netplan configs after writing config
...
'netplan apply' can re-plug network interfaces, so it looked like we
forgot how an interface had been configured
2016-11-09 12:21:06 +13:00
Michael Hudson-Doyle
a7bfef3646
show error message from netplan generate when it fails
2016-11-08 10:39:54 +13:00
Michael Hudson-Doyle
31b21799b7
remove dependency on netifaces
2016-11-07 16:56:36 +13:00
Michael Hudson-Doyle
c4fdf5cb72
allow choosing from visible networks when configuring wifi
2016-11-07 16:56:36 +13:00
Michael Hudson-Doyle
cacd456a6a
Adapt to netlink event driven version of probert.
2016-11-07 16:56:32 +13:00
Michael Hudson-Doyle
82b11dbd69
reorganize the network model and make the UI a bit more consistent
...
The main change here is to separate the state a network device is in and the
state we want it to be in. So it now parses the netplan config on a system as
well as probing the state of via probert.
The UI is changed to make this distintion too, and be IMO a bit more
consistent. Somewhere in this I've removed the display of whether the
probed address was found via DHCP or not, possibly that should be put
back if it doesn't make things too cluttered.
In dry-run mode, we now still write the config and feed it to netplan, but
in a way that doesn't affect the system we are running it on.
2016-11-07 15:15:46 +13:00
Michael Hudson-Doyle
d48a70973e
restore escape key behaviour
2016-11-02 12:44:04 +13:00
Michael Hudson-Doyle
91e42e37bd
Merge branch 'master' into mwhudson/kill-some-signals
2016-11-02 12:00:47 +13:00
Michael Hudson-Doyle
019b5c4b3e
make properly sure that the wifi password does not get logged
...
Two of these were properly stupid :(
LP: #1636421 (again)
2016-10-28 13:14:05 +13:00
Michael Hudson-Doyle
47af1de57e
remove setting of umask, redact wifi password from log file
...
The setting of umask was breaking configuring wifi :(
2016-10-26 11:02:23 +13:00
Michael Hudson-Doyle
d594b77f28
do not write the netplan config so the world can see it
2016-10-20 12:37:19 +13:00
Michael Hudson-Doyle
f603207d94
remove most trivial use of signals from console-conf's flow
2016-10-11 12:48:28 +13:00
Michael Hudson-Doyle
e348207597
Remove most use of signals from welcome and network views.
2016-10-10 16:47:42 +13:00
Michael Hudson-Doyle
2f8c1aa5cf
move logic from identity/login views into identity controller
...
This was what I wanted to do before I got distracted by the other things.
2016-09-27 21:56:48 +13:00
Michael Hudson-Doyle
d9095336e5
do not have controllers (or view code!!) know the order of the screens
2016-09-27 21:35:47 +13:00
Michael Hudson-Doyle
2373837269
make fake network actions in dry-run mode a lot quicker
2016-09-27 20:53:17 +13:00
Michael Hudson-Doyle
dad0e10912
completely separate menu -> signal and signal -> method mappings
...
and put the signal -> method mapping into the controller
this breaks the subiquity part even more than before, but it's pretty broken
already.
2016-09-27 20:53:17 +13:00
Michael Hudson-Doyle
e765538c95
address some UI comments from Mark
2016-09-20 14:13:31 +12:00
Michael Hudson-Doyle
fdd99e21f0
be more careful in BackgroundProcess.cancel
...
Someone sent me a traceback where cancel() was called before .proc was set. I
don't really understand how this happens, but there's no harm in being careful.
2016-09-15 21:35:48 +12:00
Michael Hudson-Doyle
60b4262b07
remove gratuitous delta a bit
2016-09-05 16:39:58 +12:00