Patrick Wu
c934268813
system_setup: changes and fixes
...
1. rebase with main and update autoinstall-system-setup.yml
2. provide a more unified indent style
3. update get_userandgroups() to the dropped one
4. fix the problematic os action
5. simply asignments
6. assign default_loader a default value
7. provide a type-to-file dict in wsl_conf
8. provide stderr info when providing error in creating user
9. update schema and example files
2021-10-06 22:13:15 +08:00
Patrick Wu
1a7274dbba
system_setup: unify api names and simply WSLconfig class into function
2021-10-06 22:13:15 +08:00
Patrick Wu
5c0e64e78a
system_setup: address the run_command fail issue
2021-10-06 22:13:15 +08:00
Patrick Wu
9fbff87fe1
system_setup: changes to the get-usersandgroups
2021-10-06 22:13:15 +08:00
Patrick Wu
32a62748c9
system_setup: initial redesign of generic config handler
...
Also have to change the logic for default loader
2021-10-06 22:13:15 +08:00
Patrick Wu
f31e252436
system_setup: reduce code duplication in getting default value
2021-10-06 22:13:15 +08:00
Patrick Wu
225cb1bd37
system_setup: fixes for after rebasing
...
1. add extra logs
2. improve the answers file
3. await the self.configured in wslconf API
2021-10-06 22:13:15 +08:00
Patrick Wu
032412a938
system_setup: provide configuration calls
2021-10-06 22:13:15 +08:00
Patrick Wu
a211689e08
system_setup: update client_variant to variant
2021-10-06 22:13:15 +08:00
Patrick Wu
0a0c53a61b
system_setup: move all write file actions to configure controller
...
This completes 5. Move all “Commits/Write to file” in the configure controller.
2021-10-06 22:13:15 +08:00
Patrick Wu
2490befbd0
system_setup: remove unnecessary params in tui.py
2021-10-05 09:33:21 +08:00
Jean-Baptiste Lallement
6cc8c6169b
Fix crash with autoinstall on non-systemd env
...
On WSL and any system without systemd the server crashes becauses
the syslog id is always set (and never None) and systemd cat cannot
connect to the journal.
We cant set the id to None because the API expects a string, so the
check "is not None" is always true.
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-10-04 13:09:24 -07:00
Michael Hudson-Doyle
b144f234ac
install packages listed by check-language-support when locale_support == "langpack"
2021-09-30 12:09:57 +13:00
Jean-Baptiste Lallement
44b0b66531
Block shutdown controller on installation done
...
A race existed due to ~he shutdown controller not waiting for the
install task to be complete.
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-09-28 09:32:39 +02:00
Jean-Baptiste Lallement
fecd1cc68c
Remove empty "required" in schema
...
There are no required for WSLConf*, remove it instead of using empty
lists.
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-09-28 09:32:39 +02:00
Jean-Baptiste Lallement
4966173d6c
Test system setup autoinstall
...
It also adds an argument --ignore-tz to the schema comparison test to
not fail on system where the schema has no TZ like WSL.
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-09-28 09:32:39 +02:00
Jean-Baptiste Lallement
b81447c988
Added schema for system setup autoinstall
...
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-09-28 09:26:29 +02:00
Jean-Baptiste Lallement
f13bb1121f
Fix: use right identity controller for system setup
...
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-09-28 09:26:10 +02:00
Patrick Wu
65530cf3b3
system_setup: additional Base/Avanced changes and fixes
...
the fixes includes:
1. renamed helpers.py to wsl_utils.py
2. update several log strings
3. renamed LocaleController to WSLLocaleController
4. improving logic and warnings in get_windows_locale()
5. move config_ref to wsl_utils.py
5. fixes bool_converter()
6. fixes locale configured() getting stuck
2021-09-27 20:36:25 +08:00
Michael Hudson-Doyle
3b6436434c
remove server-state file when starting up dry-run system_setup
2021-09-27 22:10:07 +13:00
Michael Hudson-Doyle
2f9c22961e
Merge pull request #1042 from canonical/wsl_oobe_auto_reconf_mode
...
DE-98/DE-99 - system_setup: Wsl oobe auto reconf mode
2021-09-24 14:26:23 +12:00
Patrick Wu
ee3a3df893
sustem_setup: fixes according to Michael's feedback
2021-09-23 15:10:39 +08:00
Didier Roche
fa9957d27d
Merge pull request #1055 from canonical/wsl_oobe_no_dry_mode
...
WSL OOBE - no dry mode
2021-09-21 11:49:38 +02:00
Jean-Baptiste Lallement
0a5b8fcf46
Do not wait on cloud-init on system without cloud-init
...
On systems where cloud-init cannot run (ie WSL) we where waiting forever
on cloud-init
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-09-20 19:30:36 +02:00
Jean-Baptiste Lallement
eee1e9de6d
Start server if not socket activated
...
On systems without socket activation enabled, the client starts the
server manually.
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-09-20 19:29:10 +02:00
Patrick Wu
365769c365
system_setup: update Summary code
2021-09-20 21:58:16 +08:00
Patrick Wu
1aac580dfd
system_setup: update the detection logic
2021-09-20 21:58:16 +08:00
Patrick Wu
ceae8e9d19
system_setup: fixes according to the feedback
...
1. update client_variant comment
2. remove Welcome controller
3. remove a TODO
2021-09-20 19:54:27 +08:00
Patrick Wu
6303b5d6c5
system_setup: proper wsl_configuration UI setup
...
This fixes In wsl_configuration mode the UI shows ”base”/”advanced” screens.
2021-09-20 19:54:14 +08:00
Patrick Wu
018185af49
system_setup: system setup API for Flutter UI part
...
This completes TODO "provide an API for this for the flutter UI to know
about it"
API is at /meta/client_variant with GET method, returns a string
2021-09-20 19:39:20 +08:00
Patrick Wu
78221ebf25
system setup: auto reconf mode general completion
...
Mostly complete the second task except the API for GUI:
Implement an API in the server to know if we are in reconfigure or setup mode based on existing UID user >= 1000. Fetch that API from the client and set the variant to wsl_setup or wsl_configuration.
2021-09-20 19:39:20 +08:00
Michael Hudson-Doyle
9051a33c4f
make SubiquityController.configured async
2021-09-16 20:59:01 +12:00
Michael Hudson-Doyle
aa9c945674
Have SubiquityController.configured broadcast rather than set an event
...
This should make it cleaner to implement interdependencies between
controllers, like in-progress installation source selection needs to
know about locale changes.
2021-09-16 20:59:01 +12:00
Jean-Baptiste Lallement
717cb5b541
system-setup: finished removing duplicated fields
...
There was some remaining duplicated fields in the controllers and models
between base and advanced configuration, which made the code crash.
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-09-10 12:07:55 +02:00
Patrick Wu
e661b08905
system_setup: no longer inherits
2021-09-09 16:23:47 -06:00
Patrick Wu
43497a99cb
system setup: reduce WSLConfigurationAdvanced size
...
by inheriting WSLConfigurationBase
2021-09-09 16:23:47 -06:00
Jean-Baptiste Lallement
b47362ea2a
Fixed linting
...
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-09-03 10:18:18 +02:00
Jean-Baptiste Lallement
46eb52c9cb
Split system_identity controller from subiquity one
...
There is little inherited from it, let’s split them.
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-09-03 09:52:23 +02:00
Jean-Baptiste Lallement
039201949d
Remove uneeded confirmation handling in system_setup
...
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-09-03 09:52:08 +02:00
Jean-Baptiste Lallement
ea29709573
Fix typo and punctuation
...
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-09-03 09:45:37 +02:00
Jean-Baptiste Lallement
3cdaf76153
Mark as TODO adding a helper for future refactoring
...
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-09-03 09:44:51 +02:00
Jean-Baptiste Lallement
2a36e30812
Remove set conversion and explicitely init it
...
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-09-03 09:39:32 +02:00
Jean-Baptiste Lallement
4c83e4afde
Remove duplication in server execution code
...
Make command line and dry-run command line a class member.
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-09-03 09:38:50 +02:00
Jean-Baptiste Lallement
ab161250e1
Removed the progress view.
...
On non systemd systems (ie WSL) the progress view is always empty. Thus
this view is removed and the summary (formerly overview) view becomes
the last page of the setup with the reboot button. This button is
displayed dynamically when setup is complete.
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-09-01 19:06:50 +02:00
Jean-Baptiste Lallement
5b2e78a8a1
Ensure we always exit the server
...
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-09-01 17:42:19 +02:00
Jean-Baptiste Lallement
805a84ab76
Linter fixes
...
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-09-01 11:02:25 +02:00
Jean-Baptiste Lallement
5d318b2fbb
Rebase on new subiquity model.
...
Variants are set at the application level and impact the models.
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-09-01 10:55:06 +02:00
Jean-Baptiste Lallement
3eb5231fca
Only proceed for installation when ready.
...
Wait for models to be configured before proceeding with installation.
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-09-01 10:48:44 +02:00
Jean-Baptiste Lallement
da5c83d4f1
Set supported and current variant for WSL
...
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-09-01 10:44:37 +02:00
Jean-Baptiste Lallement
9b67591335
More linting fixes
...
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-08-31 15:56:08 +02:00