[RFC] add initial proposal for unattended questions#595
Conversation
Pull Request Test Coverage Report for Build 5153284815
💛 - Coveralls |
doc/questions.md
Outdated
| 1. each question has ID that is hierarchical so partial match can be used. Example `storage.luks.password` or | ||
| `software.repository.checksum` | ||
| 2. each question has defined default safe answer. | ||
| 3. questions can be up to 4 additional params that helps user to answer them. Example repository url and its checksum. |
There was a problem hiding this comment.
Why 4? What about using a single Hash as a parameter? That would also allow to name the parameters, like
{url: "https://example.com", checksum: "123456..."}
There was a problem hiding this comment.
well, I consider 4 as reasonable number..but it is true, that hash can be also helpful and more flexible.
doc/questions.md
Outdated
| 3. For questions without defined answer default answer will be used. | ||
| 4. All questions and answers ( together with source from where it comes ) | ||
| will be logged for later audit ( maybe own file? or maybe directly write | ||
| it as answers.yml? ) |
There was a problem hiding this comment.
I'm not sure if it is a good idea, you do not want to have your LUKS password to be stored in any file.
Even URLs might contain passwords, we have special URL::HidePassword() method in YaST for logging passwords.
There was a problem hiding this comment.
OK, I can add there that sensitive data is filtered out and replaced by some <sensitive> string?
There was a problem hiding this comment.
Yes, some filtering should be done.
RoR uses [FILTERED] IIRC...
doc/questions.md
Outdated
| 1. I run unattended installation for first time and want to see what questions appear to be able to | ||
| modify it to my needs for mass deployment. -> There is questions.log which writes down exact questions | ||
| with all its params, ids, etc and used answer with note if it is automatic answer or one comming from | ||
| file. |
There was a problem hiding this comment.
As written above, saving the user's answers might have security implications, that should only happen on explicit user request.
doc/questions.md
Outdated
| GPG key that I know in advance. -> use answers.yml file | ||
| 3. I do mass deployment in environment where previous requirement was to have luks encryption with some | ||
| random password and this partition should not be reused -> do nothing as default answer is to skip such partition | ||
| 4. I have my own vendor iso and I want to preconfigure installer using CLI before showing web UI. And some actions can/will |
There was a problem hiding this comment.
I'm not sure if we should support this scenario. I'd expect the vendors would only touch /etc/agama.yaml and possibly some branding files. I feel that this is rather abusing the answers for some different case. We could configure Agama to death.
If we want to have some default answers configurable I'd prefer to configure them via /etc/agama.yaml and do not mix manual and automatic installation to some hybrid solution. That would be difficult to test and maintain, I'd rather not open that box...
E.g. if you want to accept an additional GPG key from a custom repository let's define that together with the URL in the config file.
There was a problem hiding this comment.
well, basically question is if there is reason to have answers and interactive mode or not ( so basically answer only known questions and for rest ask user instead of using auto reply ).
mvidner
left a comment
There was a problem hiding this comment.
I'd like to know how this design affects the D-Bus API
Co-authored-by: Martin Vidner <mvidner@suse.cz>
@jreidinger very true, you still have to proofread what DeepL gave you to check that it didn't change the meaning. |
|
So again, I'd like to know how this design affects the D-Bus API. I can imagine a design, where all of the unattended handling just prevents some/all of the Questions from appearing on the bus so the API would stay the same. If the API does change, I think it is worthwhile specifying now in this PR |
|
My thoughts:
How do I envision it?
|
doc/questions.md
Outdated
| #### Unattended Installation Features | ||
|
|
||
| 1. Questions contain values in addition to ids that can be matched. To match | ||
| id and values, string, regexp or array can be used. Array lists all possible values and regexp is used for matching. |
There was a problem hiding this comment.
IMHO regexp (regular expressions) are overkill (incompatible dialects...) and I hope substrings or shell patterns will be enough
There was a problem hiding this comment.
that is good suggestion. Maybe for the first phase we can omit regexp completely and if needed, we can extend it ( so some string that start with some fancy character to support advanced matching ).
|
To avoid Mode in the service... |
Thanks for notes. I think there is a lot of agreement and just a few collisions. Just to clarify few notes:
@imobachgs how do you see it? Especially about requirements for unattended mode and possible blocked by question that is not specified in advance. |
| storage.* -> :skip. | ||
| 2. every question has a defined default secure answer. Why: it allows real unattended mode even if user does not specify all questions. | ||
| 3. questions can define additional params in map that help user to answer them. Example repository url and its checksum. | ||
| Partition identification for luks password. Why: Getting data only from question text is hard and very unreadable with regexp. |
There was a problem hiding this comment.
Not to mention translations...
It is of course possible and nothing prevents it. I just see some disadvantages:
|
|
About the "unattended mode", I see how it is useful but I also understand @joseivanlopez's concern. I am a little bit late to the discussion but, IMHO, the important thing is to set the default behavior when an answer is not defined (using an So you do not need to model the concept of mode, but just to set the fallback behavior. Does it make any sense? |
|
How I see it, auto-installation is exactly the same as the regular installation. The only two differences I see with auto and no auto are: a) Auto-install automatically sets the given config. What it is more, auto-install should not care about having user interaction or not. If we provide all the required info, then the auto-installation can proceed, otherwise it cannot. For example, if the "profile" does not contain user/root password, then the auto-installation cannot continue. I would do the same for questions/answers. If we don't want to emit questions, then we need to configure our answers mechanism to do something when an answer is unknow (as Imo pointed above). For example (the format is wrong, only as idea): With that approach, we would have a way to provide what to do in any case. And maybe we could also offer the answers mechanism with manual installation and CLI too. For example: And this make me think, should questions belong to the "profile" instead of a separate file? |
doc/questions.md
Outdated
| ## Questions | ||
|
|
||
| [Questions][] are a mechanism that allows the user to react to certain situations that occur in the installer. | ||
| [Questions][] are a mechanism that allows the installer to ask for additional data which are needed without knowing it in advance. |
Problem
With introduced questions mechanism it is impossible to have real unattended installation.
trello: https://trello.com/c/eMVlSQnU/3364-2-agama-research-design-a-mechanism-to-ask-questions-during-auto-installation
Solution
Create proposal how to modify questions and add support for unattanded installation to them.