-
Notifications
You must be signed in to change notification settings - Fork 196
Update autoinstall-reference.rst #1933
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ben-ba
wants to merge
2
commits into
canonical:main
Choose a base branch
from
ben-ba:patch-1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change does not look right to me. The key called "primary" expects an array of elements, where each element can either be "country-mirror" or an object with a URI + optionally a set of architectures if applies to.
If we translate the YAML into JSON, we have:
equivalent to
{ "primary": [ { "arches": ["i386", "amd64"], "uri": "http://archive.ubuntu.com/ubuntu" } ] }and
equivalent to
{ "primary": [ { "arches": ["i386", "amd64"] }, { "uri": "http://archive.ubuntu.com/ubuntu" } ] }Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my user-data looks like following for apt;
working one
failed one, error see 1 comment
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it;
primary is an array of country-mirror and an object with two properties; uri and arches
so each list needs an hyphen, so when uri is needed, the documentation should switch to the following;
why? with the following example in the docuentation u couldn't get in trouble if you only use the necessary property of the list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, the issue in the proposed change is having
archeson its own line with a hyphen.and
are semantically equivalent. The
primarykey should be an array of items. Either containing the stringcountry-mirroror an object which has a string propertyuriand (optionally) an array of archesarcheswhich list the supported architectures for that uri.The reason your second example fails is because it's missing the hyphen. In the following example:
primaryis an object with some string propertyuri. Whereas in:primaryis an array of objects with one item. Where that one item has a string propertyuri.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hadn't refreshed and didn't see your comment, apologies! I also had to look at the code for this one. Perhaps we should update the docs to better reflect what's expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ben-ba I'd be happy to accept this as a doc improvement. Would you like to update this PR with the switched
arches/uristatements?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'd also need you to sign the CLA before merging the change. We have some instructions on how to do so:
https://github.com/canonical/subiquity/blob/main/CONTRIBUTING.md#contributor-license-agreement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR updated, CLA signed.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would be really helpfully to read something about the validation of a autoinstall configuration with
./scripts/validate-autoinstall-user-data.py ../autoinstall/simple/user-dataComplaining is to easy, so i made an PR for this.
#1941